Theme editor

Content BBCode

Content BBCode

Content BBCode 2.0.2

💲XF 2.3 Add-ons · by Staraddons
0 Downloads 5 Views 0 Version
This addon creates additional BBCodes for linking to various content found on XenForo forums
Price
Free
There are no downloadable versions available for this resource yet.

Overview Version (0) Discussion (1) License

  • Content BBCode
    Content BBCode
    This addon creates additional BBCodes for linking to various content found on XenForo forums
    About this resource
    Note: 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
    Code:
    Expand Collapse Copy
    [thread=1]see this thread[/thread]

    ... will be rendered as:

    HTML:
    Expand Collapse Copy
    <a href="http://www.example.com/threads/1/">see this thread</a>

    Alternative syntax:

    Code:
    Expand Collapse Copy
    [thread]1[/thread]

    ... will be rendered as:

    HTML:
    Expand Collapse Copy
    <a href="http://www.example.com/threads/1/">http://www.example.com/threads/1/</a>

    POST
    Code:
    Expand Collapse Copy
    [post=2]see this post[/post]

    ... will be rendered as:

    HTML:
    Expand Collapse Copy
    <a href="http://www.example.com/posts/2/">see this post</a>

    SEARCH
    Examples:

    Code:
    Expand Collapse Copy
    [search]foo[/search] (default is to search entire forum - search term between tags)
    [search=forum]foo[/search] (general forum search - search term between tags)
    [search=forum,foo]search the forums for 'foo'[/search] (general forum search - search term as option)
    
    [search=thread,foo]search threads for 'foo'[/search]
    [search=post,foo]search posts for 'foo'[/search]
    [search=resource,foo]search resources for 'foo'[/search]
    [search=media,foo]search media uploads for 'foo'[/search]
    [search=comments,foo]search media comments for 'foo'[/search]
    [search=tag,foo]search tags for 'foo'[/search]
    
    [search=site,foo]Google site search for 'foo'[/search] (search google with 'site:example.com' tag to perform a Google search of your site
    [search=web,foo]Google web search for 'foo'[/search]
    [search=image,foo]Google image search for 'foo'[/search]
    [search=map,foo]Google map search for 'foo'[/search]
    [search=video,foo]Google video search for 'foo'[/search]
    [search=news,foo]Google new search for 'foo'[/search]

    TAG
    Examples:

    Code:
    Expand Collapse Copy
    [tag=foo bar]link to the tag 'foo bar'[/tag]

    ... will be rendered as:

    HTML:
    Expand Collapse Copy
    <a href="http://www.example.com/tags/foo-bar/">link to the tag 'foo bar'</a>

    XFMG
    Examples:

    Code:
    Expand Collapse Copy
    [xfmg=media,1]link to media item with id = 1[/xfmg]
    [xfmg=album,1]link to album with id = 1[/xfmg]
    [xfmg=category,1]link to category with id = 1[/xfmg]

    ... will be rendered as:

    HTML:
    Expand Collapse Copy
    <a href="http://www.example.com/media/1/">link to media item with id = 1</a>
    <a href="http://www.example.com/media/albums/1/">link to album with id = 1</a>
    <a href="http://www.example.com/media/categories/1/">link to category with id = 1</a>

    You can also display full sized images:

    Code:
    Expand Collapse Copy
    [xfmg=img,1][/xfmg]

    ... will be rendered as:

    HTML:
    Expand Collapse Copy
    <img src="http://example.com/media/1/full" data-url="http://example.com/media/1/full" class="bbImage" data-zoom-target="1" alt="">

    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:

    Code:
    Expand Collapse Copy
    [xfmg=thumb,1][/xfmg]

    Unlike other links, images and thumbnails will only display if the user has permission to view them.


    FORUM
    Examples:

    Code:
    Expand Collapse Copy
    [forum=1]link to this forum node[/forum]

    ... will be rendered as:

    HTML:
    Expand Collapse Copy
    <a href="http://www.example.com/forums/1">link to this forum node</a>

    PREFIX
    Examples:

    Code:
    Expand Collapse Copy
    [prefix=forum,1,2]link to this prefix for a node[/prefix] (ie show all threads from node_id = 1 using prefix_id = 2)
    [prefix=resource,0,1]link to this prefix for a resource[/prefix] (ie show all resources using prefix_id = 1)
    [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:
    Expand Collapse Copy
    <a href="http://www.example.com/forums/1/?prefix_id=2">link to this prefix for a node</a>
    <a href="http://www.example.com/resources/?prefix_id=1">link to this prefix for a resource</a>
    <a href="http://www.example.com/resources/categories/2/?prefix_id=3">link to this prefix for a resource category</a>

    RESOURCE
    Code:
    Expand Collapse Copy
    [resource=1]link to this resource[/resource]

    ... will be rendered as:

    HTML:
    Expand Collapse Copy
    <a href="http://www.example.com/resources/1">link to this resource</a>
  • Version
    There are no downloadable versions available for this resource yet.
  • Discussion

    This resource has a discussion thread on the forum where you can ask questions, report issues, and talk with the author and other users.

    Join the discussion (1)

  • License Terms

    By purchasing this resource, you are granted a license to use it on one (1) site, for as long as your license remains valid. You are not purchasing ownership of the underlying code.

    How your license works
    • Your license is checked automatically in the background. This never affects your site's visitors.
    • As long as your license is valid, this resource keeps working normally — even if our license server is briefly unreachable, a temporary network issue will never disable it.
    • Your license is bound to your site's domain the first time it's used.

    Moving to a new domain?
    Contact us and we'll move your license for you.

    What's included
    Updates and support for the period stated on this resource's page (see the Version tab for the current release).

    What's not allowed
    • Sharing your license with others, or using it on more than one site at a time
    • Removing or bypassing the license check in the code
Resource information
Category 💲XF 2.3 Add-ons
Author Staraddons
Date Jan 29, 2026
Latest version 2.0.2
Statistics
Views 5
Downloads 0
Version 0
Developer
Staraddons
Resource author
More resources
Back
Top