[sim] Content BBCode

[sim] Content BBCode 2.0.2

没有下载权限
XF 兼容性
  1. 2.3.x
  2. 2.2.x
摘要
A comprehensive addon for XenForo 2.0+ with support for various BBCodes including thread, post, search, media, tags, and more. Perfect for migrating content from vBulletin or enhancing forum functionality. No data loss upon upgrade; PHP 5.4+ required.
v2.0 of this addon is a re-release of my existing "[thread] and [post] BBCode" addon with a new addon ID. If you previously used this addon, it should automatically upgrade when installing this new version - but otherwise, just uninstall the old addon before installing this new one - no data will be lost.

This addon creates additional BBCodes for linking to various content found on XenForo forums:
  • thread
  • post
  • search (see below for details)
  • tag
  • xfmg
    • media
    • category
    • album
    • image
    • thumbnail
  • forum (node)
  • prefix
    • thread
    • resource
  • resource
The search tag has options allowing you to link to searches across multiple content types:
  • forums
  • threads
  • posts
  • resources
  • media
  • media comments
  • user profiles
  • tags
  • Google
    • site search
    • web search
    • image search
    • map search
    • video search
    • news search
This addon was originally created to replicate the [THREAD] and [POST] BBCodes which were used in vBulletin and may be present in post content after migration.

I've basically aimed to reproduce the original vBulletin (v3.8.x) functionality of simply rendering a link to a thread or post with the user supplied link text - if the user does not have permission to access the thread or post, they'll find out when they click the link! Thread titles are not rendered automatically, so there is no risk of information leakage.

The main reason you'd want to use this addon is if you have migrated content from vBulletin or another forum which uses [thread] and [post] BBCodes.

The additional BBCode tags were added primarily to support some forum statistics scripts I had written for my sites as I needed a way of programmatically generating links which were also independent of the site URL.

If you just want to use the thread and post tags, you can always disable the other custom bbcode tags in the admin UI.

Requirements

This addon requires PHP 5.4 or higher and has been tested on XF v2.0, v2.1 and v2.2

The [thread] and [post] component of this addon basically does the same job as @Xon's Thread & Post BB Code for XF2 addon - but mine is (deliberately) much less sophisticated and does no permission checking or thread/post lookups. You should not install both addons!

Usage

In post content (or anywhere that BBCode is allowed), the following substitutions will occur:
THREAD

Rich (BB code):
[thread=1]see this thread[/thread]
[/CODE]
... will be rendered as:

HTML:
<span><span><span>&lt;</span>a</span> <span>href</span><span><span>=</span><span>"</span>http://www.example.com/threads/1/<span>"</span></span><span>&gt;</span></span>see this thread<span><span><span>&lt;/</span>a</span><span>&gt;</span></span>
Alternative syntax:

富文本(BB代码):
[thread]1[/thread]
... will be rendered as:

HTML:
<span><span><span>&lt;</span>a</span> <span>href</span><span><span>=</span><span>"</span>http://www.example.com/threads/1/<span>"</span></span><span>&gt;</span></span>http://www.example.com/threads/1/<span><span><span>&lt;/</span>a</span><span>&gt;</span></span>
POST

富文本(BB代码):
[post=2]see this post[/post]
... will be rendered as:

HTML:
<span><span><span>&lt;</span>a</span> <span>href</span><span><span>=</span><span>"</span>http://www.example.com/posts/2/<span>"</span></span><span>&gt;</span></span>see this post<span><span><span>&lt;/</span>a</span><span>&gt;</span></span>
SEARCH

Examples:

富文本(BB代码):
[search]foo[/search] (default is to search entire forum - search term between tags)<br>[search=forum]foo[/search] (general forum search - search term between tags)<br>[search=forum,foo]search the forums for 'foo'[/search] (general forum search - search term as option)<br><br>[search=thread,foo]search threads for 'foo'[/search]<br>[search=post,foo]search posts for 'foo'[/search]<br>[search=resource,foo]search resources for 'foo'[/search]<br>[search=media,foo]search media uploads for 'foo'[/search]<br>[search=comments,foo]search media comments for 'foo'[/search]<br>[search=tag,foo]search tags for 'foo'[/search]<br><br>[search=site,foo]Google site search for 'foo'[/search] (search google with 'site:example.com' tag to perform a Google search of your site<br>[search=web,foo]Google web search for 'foo'[/search]<br>[search=image,foo]Google image search for 'foo'[/search]<br>[search=map,foo]Google map search for 'foo'[/search]<br>[search=video,foo]Google video search for 'foo'[/search]<br>[search=news,foo]Google new search for 'foo'[/search]
TAG

Examples:

富文本(BB代码):
[tag=foo bar]link to the tag 'foo bar'[/tag]
... will be rendered as:

HTML:
<span><span><span>&lt;</span>a</span> <span>href</span><span><span>=</span><span>"</span>http://www.example.com/tags/foo-bar/<span>"</span></span><span>&gt;</span></span>link to the tag 'foo bar'<span><span><span>&lt;/</span>a</span><span>&gt;</span></span>
XFMG

Examples:

富文本(BB代码):
[xfmg=media,1]link to media item with id = 1[/xfmg]<br>[xfmg=album,1]link to album with id = 1[/xfmg]<br>[xfmg=category,1]link to category with id = 1[/xfmg]
... will be rendered as:

HTML:
<span><span><span>&lt;</span>a</span> <span>href</span><span><span>=</span><span>"</span>http://www.example.com/media/1/<span>"</span></span><span>&gt;</span></span>link to media item with id = 1<span><span><span>&lt;/</span>a</span><span>&gt;</span></span><br><span><span><span>&lt;</span>a</span> <span>href</span><span><span>=</span><span>"</span>http://www.example.com/media/albums/1/<span>"</span></span><span>&gt;</span></span>link to album with id = 1<span><span><span>&lt;/</span>a</span><span>&gt;</span></span><br><span><span><span>&lt;</span>a</span> <span>href</span><span><span>=</span><span>"</span>http://www.example.com/media/categories/1/<span>"</span></span><span>&gt;</span></span>link to category with id = 1<span><span><span>&lt;/</span>a</span><span>&gt;</span></span>
You can also display full sized images:

富文本(BB代码):
[xfmg=img,1][/xfmg]
... will be rendered as:

HTML:
<span><span><span>&lt;</span>img</span> <span>src</span><span><span>=</span><span>"</span>http://example.com/media/1/full<span>"</span></span> <span>data-url</span><span><span>=</span><span>"</span>http://example.com/media/1/full<span>"</span></span> <span>class</span><span><span>=</span><span>"</span>bbImage<span>"</span></span> <span>data-zoom-target</span><span><span>=</span><span>"</span>1<span>"</span></span> <span>alt</span><span><span>=</span><span>"</span><span>"</span></span><span>&gt;</span></span>
Note that if lightbox is enabled for images - the image will be rendered using the standard lightbox template in the same way that the IMG bbcode tag works.

Similarly, you may display a thumbnail as follows:

富文本(BB代码):
[xfmg=thumb,1][/xfmg]
Unlike other links, images and thumbnails will only display if the user has permission to view them.


FORUM

Examples:

富文本(BB代码):
[forum=1]link to this forum node[/forum]
... will be rendered as:

HTML:
<span><span><span>&lt;</span>a</span> <span>href</span><span><span>=</span><span>"</span>http://www.example.com/forums/1<span>"</span></span><span>&gt;</span></span>link to this forum node<span><span><span>&lt;/</span>a</span><span>&gt;</span></span>
PREFIX

Examples:

富文本(BB代码):
[prefix=forum,1,2]link to this prefix for a node[/prefix] (ie show all threads from node_id = 1 using prefix_id = 2)<br>[prefix=resource,0,1]link to this prefix for a resource[/prefix] (ie show all resources using prefix_id = 1)<br>[prefix=resource,2,3]link to this prefix for a resource category[/prefix] (ie show all resources from category_id = 2 using prefix_id = 3)
... will be rendered as:

HTML:
<span><span><span>&lt;</span>a</span> <span>href</span><span><span>=</span><span>"</span>http://www.example.com/forums/1/?prefix_id=2<span>"</span></span><span>&gt;</span></span>link to this prefix for a node<span><span><span>&lt;/</span>a</span><span>&gt;</span></span><br><span><span><span>&lt;</span>a</span> <span>href</span><span><span>=</span><span>"</span>http://www.example.com/resources/?prefix_id=1<span>"</span></span><span>&gt;</span></span>link to this prefix for a resource<span><span><span>&lt;/</span>a</span><span>&gt;</span></span><br><span><span><span>&lt;</span>a</span> <span>href</span><span><span>=</span><span>"</span>http://www.example.com/resources/categories/2/?prefix_id=3<span>"</span></span><span>&gt;</span></span>link to this prefix for a resource category<span><span><span>&lt;/</span>a</span><span>&gt;</span></span>
RESOURCE

富文本(BB代码):

... will be rendered as:

HTML:
<span><span><span>&lt;</span>a</span> <span>href</span><span><span>=</span><span>"</span>http://www.example.com/resources/1<span>"</span></span><span>&gt;</span></span>link to this resource<span><span><span>&lt;/</span>a</span><span>&gt;</span></span>
作者
axtona
浏览
261
扩展类型
zip
文件大小
22.7 KB
首次发布
上次更新
评分 0.00 星 0 个评分
链接失效了吗? 发送消息 给 NP 团队,我们会尽快为您处理!
支持开发者 如果您对测试满意或项目已成功盈利,可点击「更多信息」按钮,通过购买来支持开发者!

来自 axtona 的更多资源

4seo PRO - joomla SEO插件 A
自动化所有可以自动化的SEO工作,但让你能够轻松地自定义一切。
 核心 A
核心 1.4.2
核心插件,从现在开始,几乎所有的插件都将需要。
 信件索引 A
这个AddOn为选中的论坛添加了带字母的TabIndex。

相似的资源

[AndyB] Search bbcode content A
Allows searching for specific characters contained in bbcodes.
浏览
440
已更新
[MMO] Hide BbCode Buy Content N
allows content creators to hide specific content behind a purchase requirement.
浏览
257
已更新
[安迪B] BBCode解析器 A
去除消息中的 undesired BBCode 标签。
浏览
636
已更新
返回
顶部