Resource icon

Custom BB Code Manager v1.3.4

No permission to download
Thank you Cédric that worked. However I just noticed the SIZE Bb Code is no longer working. Also the custom Bb Codes are being listed twice in Help -> BB Codes
 
Thank you Cédric that worked. However I just noticed the SIZE Bb Code is no longer working. Also the custom Bb Codes are being listed twice in Help -> BB Codes
  1. The size Bb Code problem is confirmed. Actually it's a stupid mistake when I was testing a function.
  2. For the help, you need to reverse a manual template edit you've done with the version 1.2 of Bbcm.
 
Version 1.3.6.6 - Change Log:
link to download
  • Fix a stupid mistake that prevents the size Bb Code to work
    @Thanks to owls8521 & sorry for this
    Explanation: a debug line of code had been forgotten to be deleted
To upgrade:use the Chris AutoInstaller addon or upload files
 
A number of people within this thread have asked about setting up a BBCode to make a named anchor and link to it. I thought I'd share my progress. I found it pretty easy to make a named anchor. The key was to put <a name=" in as the Simple Replacement Start and "></a> as the simple replacement end. (There are other steps, but a persistent newbie like myself can figure them out just by exploring.)

Making a special BBCode to link to a named anchor was harder. Jake Bunce offered some helpful advice, but I don't know BBCM well enough to implement them. In the end, I decided that I didn't need it. I just used the regular link BBCode and linked to the full URL. While in some circumstances this might lead to undesirable behavior, I'm not sure what ideal code would do. Should it, for example assume that the anchor is on the same web page as the post being edited? The code being discussed in the following thread seems to assume this, but that would only be robust if you are linking to an anchor in the same post:
http://xenforo.com/community/threads/using-anchors-in-a-post.15314/

Anyhoo, if anyone figures this out, I'd love to see what they come up with, but that's it for me for now.
 
Version 1.3.6.6 - Change Log:
link to download
  • Fix a stupid mistake that prevents the size Bb Code to work
    @Thanks to owls8521 & sorry for this
    Explanation: a debug line of code had been forgotten to be deleted
To upgrade:use the Chris AutoInstaller addon or upload files

**sigh** Why am I watching this resource when changes are being posted to the discussion thread instead of the Resource Manager? I shouldn't have to be paying attention to the discussion in order to find out about updates.
 
get this error when trying to install it

Server Error

Mysqli statement execute error : Duplicate entry '1' for key 'PRIMARY'
  1. Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 297
  2. Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 479
  3. Zend_Db_Adapter_Abstract->query() in KingK/BbCodeManager/BbCodeManager.php at line 115
  4. KingK_BbCodeManager_BbCodeManager::install() in XenForo/Model/AddOn.php at line 214
  5. XenForo_Model_AddOn->installAddOnXml() in XenForo/Model/AddOn.php at line 169
  6. XenForo_Model_AddOn->installAddOnXmlFromFile() in AddOnInstaller/ControllerAdmin/AddOn.php at line 42
  7. AddOnInstaller_ControllerAdmin_AddOn->actionInstallUpgrade() in XenForo/FrontController.php at line 310
  8. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
  9. XenForo_FrontController->run() in /home/user/public_html/forum/admin.php at line 13
 
A number of people within this thread have asked about setting up a BBCode to make a named anchor and link to it. I thought I'd share my progress. I found it pretty easy to make a named anchor. The key was to put <a name=" in as the Simple Replacement Start and "></a> as the simple replacement end. (There are other steps, but a persistent newbie like myself can figure them out just by exploring.)

Making a special BBCode to link to a named anchor was harder. Jake Bunce offered some helpful advice, but I don't know BBCM well enough to implement them. In the end, I decided that I didn't need it. I just used the regular link BBCode and linked to the full URL. While in some circumstances this might lead to undesirable behavior, I'm not sure what ideal code would do. Should it, for example assume that the anchor is on the same web page as the post being edited? The code being discussed in the following thread seems to assume this, but that would only be robust if you are linking to an anchor in the same post:
http://xenforo.com/community/threads/using-anchors-in-a-post.15314/

Anyhoo, if anyone figures this out, I'd love to see what they come up with, but that's it for me for now.
Use the template method replacement (read parser methods options when creating a Bb Code) and test the code Jake gave you here. If you still don't understand how it works, just check the Highlight Bb Code (available in extras directory of the archive).


get this error when trying to install it

Server Error

Mysqli statement execute error : Duplicate entry '1' for key 'PRIMARY'

  1. Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 297
  2. Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 479
  3. Zend_Db_Adapter_Abstract->query() in KingK/BbCodeManager/BbCodeManager.php at line 115
  4. KingK_BbCodeManager_BbCodeManager::install() in XenForo/Model/AddOn.php at line 214
  5. XenForo_Model_AddOn->installAddOnXml() in XenForo/Model/AddOn.php at line 169
  6. XenForo_Model_AddOn->installAddOnXmlFromFile() in AddOnInstaller/ControllerAdmin/AddOn.php at line 42
  7. AddOnInstaller_ControllerAdmin_AddOn->actionInstallUpgrade() in XenForo/FrontController.php at line 310
  8. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
  9. XenForo_FrontController->run() in /home/user/public_html/forum/admin.php at line 13
Use a recent version. The installer has been rewritten.
 
same error =)
There is no query at the line 115 and if you install the addon and not update it all previous installation in the database should be erased.

Nevertheless If the problem persists, just use phpmyadmin and manually executes these queries:
Code:
DROP TABLE IF EXISTS kingk_bbcm
Code:
DROP TABLE IF EXISTS kingk_bbcm_buttons
Code:
ALTER TABLE xf_forum DROP bbcm_bm_editor
If you have a sql error message saying the table/field was not find, this is normal.

If the problem continues, the problem doesn't come from this addon and I have no idea of what it could be.
 
thanks
its work now
i didnt know there was another thing in xf_forum
to be droped =)
+
y u didnt update the zip file in the resources ?

and thanks again
 
Use the template method replacement (read parser methods options when creating a Bb Code) and test the code Jake gave you here. If you still don't understand how it works, just check the Highlight Bb Code (available in extras directory of the archive).
Thanks, Cédric. I think that this solves the issue of how to make a. I made a template with the following text:
<a href="{$requestPaths.requestUri}#{xen:raw $options.1}">{xen:raw $content}</a>​
Then I called it using your instructions. When you first add the tag, reload the page before testing it or you might get a temporary and inconsequential 'This action is available via POST only. Please press the back button and try again' error.

I used the BBCode to make a table of contents for our forum FAQ:
www.mydomain.org/forum/threads/forum-faqs-frequently-asked-questions.1618/
I run a wiki about TMS (Tension Myositis Syndrome), with some Google-fu, you can probably figure out what "mydomain.org" is.

The syntax is [anchor="anchortext"]Display Text[/anchor] and [goto="anchortext"]Display Text[/goto]. It's quite a useful little BBCode.

Edit:
I've received questions on how to do this. I was going to make a video or even figure out how to export things, but I'm having software problems and can't seem to get in.

To create a template, you should probably Google XenForo Template to learn how to do this. If you're feeling courageous, you could go to the Admin section, the Appearance, then Templates, then + Create New Template. Paste the above text in and save.

However, making the template is just the first step. You also have to go into the BBCodes and Buttons manager to add a new BBCode. To do that, you just go to the Admin section, then BB Codes Manager, then + Create New BB Code.

Once you get there, y
 
Last edited:
Thanks, Cédric. I think that this solves the issue of how to make a. I made a template with the following text:
<a href="{$requestPaths.requestUri}#{xen:raw $options.1}">{xen:raw $content}</a>​
Then I called it using your instructions.

I used the BBCode to make a table of contents for our forum FAQ:
www.tmswiki.org/forum/threads/forum-faqs-frequently-asked-questions.1618/

The syntax is [anchor="anchortext"]Display Text[/anchor] and [goto="anchortext"]Display Text[/goto]. It's quite a useful little BBCode.
So it works, nice ! I will steal it from you for my websites ;) Actually the one to thank is Jake.
 
I don't know if this would be a major upgrade, but one thing I've noticed is that the BBCodes don't render fully in content preview tooltips. See the following screenshot, for example:
Content Preview Tooltip.webp

Is there anything that can be done about that?
 
I don't know if this would be a major upgrade, but one thing I've noticed is that the BBCodes don't render fully in content preview tooltips. See the following screenshot, for example:
View attachment 43593

Is there anything that can be done about that?
That's a normal behaviour their: the parser is not called here. It should be possible to update the code to only render the content without the tags, but this requires further checks.
 
Version 1.3.7 - Change Log:
link to download
  • New option to hide tags in the thread fast preview window
    demo_1.webp
  • New callback to configure XenForo Tags Wrapping Options
    => See archive "extras" directory and have a look to "Demo - XenWrapper Callback"
    demo_2.webp
  • New function for developers (relative to the wrapper)
    1. $parentClass->addWrapper('wrappingTag', 'wrapping Tag Options');
    2. $parentClass->removeWrapper();
  • Internal: new way to load class for callbacks via the autoloader (avoid to load them several times - no idea if it's better for performance, it just seems more logical)
To upgrade:use the Chris AutoInstaller addon or upload files
 
Version 1.3.7.1 - Change Log:
link to download
  • Fix a typo mistake which hidded tags not only in the fast preview window but in all pages using json (when the option was activated)
To upgrade:use the Chris AutoInstaller addon or upload files
 
Top Bottom