• Register
    • Help

    striker  0 Items
    Currently Supporting
    • Home
    • News
    • Forum
      • Try XenForo Demo
      • New Posts
      • FAQ
      • Calendar
      • Community
        • Groups
        • Albums
        • Member List
      • Forum Actions
        • Mark Forums Read
      • Quick Links
        • Today's Posts
        • Who's Online
      • Sponsor
        • Sponsor a Feature
        • List of Donors
    • Wiki
    • Support
    • What's New?
    • Buy Now
    • Manual
    • 
    • Forum
    • VaultWiki How-Tos
    • VaultWiki Questions
    • Template embed bb code shortcut for pages with a particular prefix... possible?

    1. Welcome to VaultWiki.org, home of the wiki add-on for vBulletin and XenForo!

      VaultWiki allows your existing forum users to collaborate on creating and managing a site's content pages. VaultWiki is a fully-featured and fully-supported wiki solution for vBulletin and XenForo.

      The VaultWiki Team encourages you to join our community of forum administrators and check out VaultWiki for yourself.

    Results 1 to 5 of 5

    Thread: Template embed bb code shortcut for pages with a particular prefix... possible?

    • Thread Tools
      • Show Printable Version
    1. September 13, 2019 #1
      ACL
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • View Articles
      ACL is offline
      Regular Member
      Join Date
      January 30, 2017
      Posts
      72
      Rep Power
      92

      Question Template embed bb code shortcut for pages with a particular prefix... possible?

      Looking at the help page on the VW.org XF demo, I noticed that there are some extra bbcodes defined there for particular prefixes. Are these extras just shortcuts for [WIKI] bb code, e.g. [INFO]page[/INFO] = [wiki]info:page[/wiki]? Is it currently possible to configure something like this for template embedding?

      I have area rules configured on my site such that Template pages require a Template prefix. This is to clearly identify a template from a regular page and also to allow templates and pages to use the same name if appropriate (sans the Template prefix).

      Currently, embedding a template requires people on my site to use [TEMPLATE]Template:Page[/TEMPLATE]. This is a lot to type. Can I simplify this via a custom bb code? E.g. [TEMPLATES]Page[/TEMPLATES] = [template]Template:Page[/template].

      Thank you
      Last edited by ACL; September 13, 2019 at 11:50 AM.
      Reply With Quote Reply With Quote

    2. September 14, 2019 #2
      pegasus
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • Visit Homepage
      • View Articles
      pegasus is offline
      VaultWiki Team
      Join Date
      March 28, 2004
      Location
      New York, NY
      Posts
      2,934
      Blog Entries
      18
      Rep Power
      659
      Edit your Template: prefix and set its custom BB-Code to TEMPLATE.

      Note that this will cause issues if you allow templates to have (No Prefix), because then it cannot tell the difference between a template called "Page" and a template called "Template:Page" when you want to include them (although it will try to guess). If you allow both, it might be best to make sure that such names are synonyms of each other rather than distinct templates.
      - lead developer for VaultWiki
      Reply With Quote Reply With Quote

    3. September 14, 2019 #3
      ACL
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • View Articles
      ACL is offline
      Regular Member
      Join Date
      January 30, 2017
      Posts
      72
      Rep Power
      92
      Thanks for the reply, I'll give this a shot on my test site and see what happens.

      Having read your reply, I only just now realise that double clicking "BB-Code Example Usage" reveals a "BB-Code Tag Name" form row that I've not seen before !
      Reply With Quote Reply With Quote

    4. September 14, 2019 #4
      ACL
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • View Articles
      ACL is offline
      Regular Member
      Join Date
      January 30, 2017
      Posts
      72
      Rep Power
      92
      Looks like this might not be possible under XF. Setting the Template: prefix to custom bbcode TEMPLATE causes XF's entity system to kick in:
      BB code tags must be unique. The specified tag is already in use. src/XF/Mvc/Entity/Entity.php

      With a unique value (e.g. TEMPLATES), the bbcode behaves like WIKI (wiki link, without template embedding).

      Not to worry! This might've been a cool shortcut had it been possible to omit the template prefix from the bbcode, but it really isn't a big deal at the end of the day.
      Reply With Quote Reply With Quote

    5. September 16, 2019 #5
      pegasus
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • Visit Homepage
      • View Articles
      pegasus is offline
      VaultWiki Team
      Join Date
      March 28, 2004
      Location
      New York, NY
      Posts
      2,934
      Blog Entries
      18
      Rep Power
      659
      Fixed in the next build. If the custom BB-Code tag was already set to a unique value, changing the value attempts to rename the tag (a rename only occurs if the tag was created specifically for the prefix). Since the new tag already existed, it is not possible to rename the old tag to it since they would both have the same tag name.

      The working way in the current build is to first set the tag to a blank value, Save, then enter the desired value that matches an already-existing tag, as this would avoid trying to rename the prefix-tag.

      In the next build, it will check if the new tag already exists when renaming the tag. In this case, it will just point to that existing tag and delete the previous tag.

      See: https://www.vaultwiki.org/issues/5863/
      - lead developer for VaultWiki
      Reply With Quote Reply With Quote

    Similar Threads

    1. Rendering Templates on Template Pages
      By SurferJon in forum VaultWiki Questions
      Replies: 1
      Last Post: January 20, 2017, 8:44 AM
    2. Video bb-code not working on VW pages
      By DragonSigh in forum General Discussion
      Replies: 1
      Last Post: August 30, 2014, 5:24 PM
    3. remove prefix from URL
      By cosy in forum General Discussion
      Replies: 3
      Last Post: May 5, 2012, 2:07 AM
    4. Template section for group pages
      By Morrus in forum VaultWiki Questions
      Replies: 4
      Last Post: April 12, 2012, 9:24 AM
    5. Convert Legacy Code to BB-Code
      By Rik Brown in forum VaultWiki Questions
      Replies: 8
      Last Post: August 3, 2010, 2:29 PM

    Tags for this Thread

    bbcode, page, pages, prefix, template

    View Tag Cloud

    Bookmarks

    Bookmarks
    • Submit to Digg Digg
    • Submit to del.icio.us del.icio.us
    • Submit to StumbleUpon StumbleUpon
    • Submit to Google Google

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •  
    • BB code is On
    • Smilies are On
    • [IMG] code is Off
    • [VIDEO] code is
    • HTML code is Off

    Forum Rules

    • Contact Us
    • License Agreement
    • Privacy
    • Terms
    • Top
    All times are GMT -4. The time now is 10:57 AM.
    This site uses cookies to help personalize content, to tailor your experience, and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Learn more… Accept Remind me later
  • striker
    Powered by vBulletin® Version 4.2.5 Beta 2
    Copyright © 2023 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2023 DragonByte Technologies Ltd.
    Copyright © 2008 - 2013 VaultWiki Team, Cracked Egg Studios, LLC.