• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

BB Code Manager

Status
Not open for further replies.
Hello,

how can i add bbcodes with multiple {param}s like vB it does:

bsp:
HTML:
<table border="1" cellspacing="0" cellpadding="0">
  <tr>
    <td><a href="http://www.amazon.de/exec/obidos/ASIN/{param}/myamazonID" target="_blank"><img src="http://images-eu.amazon.com/images/P/{param}.03.MZZZZZZZ.jpg" border="0"></a>
    </td>
  </tr>
  <tr>
    <td><strong>&copy;Amazon</strong>: <a href="http://www.amazon.de/exec/obidos/ASIN/{param}/partner">{param}</a>
    </td>
  </tr>
</table>
in this bsp. it is with 4x {param}. How can i make this with your bbcode manager?
 
You have to do a PHP callback function because it only supports one param for simple replacement. See the spoiler tag for how to do it.
 
Yılmaz was kind enought to look into my custom BB Codes request for a Download Box BB Code and Traileraddict BB Code. He made one which works with the latest BBCode Manager Plugin.

How to install:

1. Make sure BB Code Manager v1.1.x is installed.
2. Download the BB-Code-Manager-custom.zip archive and transfer it to your host.
3. Click on the "BB Code Manager" in your admin area.
4. Click on "Create New BB Code" button.
5. Fill the forms as it is described below.

Download Box BB Code

BB Code Title: Download Box
BB Code Description: Wraps a download box arrount the links, when used.
BB Code Tag: down
Sample: [DOWN]Links goes here[/DOWN]
Activate BB Code: x (mark)
Require Option: empty
Simple Replacement Start: empty
Simple Replacement End: empty
PHP Callback: KingK_BbCodeManager_BbCode_Formatter_Default :: parseTagDown

Click "Save"

Trailer Addict (traileraddict.com) BB Code

BB Code Title: Trailer Addict
BB Code Description: Shows the trailer when used the Trailer ID with the TAG
BB Code Tag: trailer
Sample: [trailer]9319[/trailer]
Activate BB Code: x (mark)
Require Option: empty
Simple Replacement Start: empty
Simple Replacement End: empty
PHP Callback: KingK_BbCodeManager_BbCode_Formatter_Default :: parseTagTrailer

Click "Save"

Important Note: The Download Box is problematic with IE, doesn't show it right and it doesn't transform links to urls either. If someone could figure out a solution, you can post it here :)

Originally Posted here: http://www.xen-tr.com/threads/traileraddict-fragman-download-kutusu-bbcode-eklemek.189/
 

Attachments

It would be great to have it built-in, but in the meantime can someone create a BBCode to have images align left or align right with the text wrapped? Makes things look a lot nicer with posts :)
 
That's already included in the add-on - it's the float left/right.

It wasn't working properly when I tested it but it will be fixed in v1.1.1.
 
Yılmaz was kind enought to look into my custom BB Codes request for a Download Box BB Code and Traileraddict BB Code. He made one which works with the latest BBCode Manager Plugin.

How to install:

1. Make sure BB Code Manager v1.1.x is installed.
2. Download the BB-Code-Manager-custom.zip archive and transfer it to your host.
3. Click on the "BB Code Manager" in your admin area.
4. Click on "Create New BB Code" button.
5. Fill the forms as it is described below.

Download Box BB Code

BB Code Title: Download Box
BB Code Description: Wraps a download box arrount the links, when used.
BB Code Tag: down
Sample: [DOWN]Links goes here[/DOWN]
Activate BB Code: x (mark)
Require Option: empty
Simple Replacement Start: empty
Simple Replacement End: empty
PHP Callback: KingK_BbCodeManager_BbCode_Formatter_Default :: parseTagDown

Click "Save"

Trailer Addict (traileraddict.com) BB Code

BB Code Title: Trailer Addict
BB Code Description: Shows the trailer when used the Trailer ID with the TAG
BB Code Tag: trailer
Sample: [trailer]9319[/trailer]
Activate BB Code: x (mark)
Require Option: empty
Simple Replacement Start: empty
Simple Replacement End: empty
PHP Callback: KingK_BbCodeManager_BbCode_Formatter_Default :: parseTagTrailer

Click "Save"

Important Note: The Download Box is problematic with IE, doesn't show it right and it doesn't transform links to urls either. If someone could figure out a solution, you can post it here :)

Originally Posted here: http://www.xen-tr.com/threads/traileraddict-fragman-download-kutusu-bbcode-eklemek.189/

Also (and please send this along to Yilmaz, it is highly problematic for you to edit any of my files (they WILL get overwritten). As long as you have it installed already, the one file doesn't matter, because my code in an update won't touch anything, but the PHP won't work correctly. Download the attached file, and upload it to /library/KingK/BbCodeManager/BbCode/Formatter/Laztrix.php. Edit the BB Codes after you did and change the class to: KingK_BbCodeManager_BbCodeFormatter_Laztrix. Doing so will ensure that you keep them through upgrades (you'll need to make sure this file is not over written when uploading the new one). I also fixed 2 bugs in his code as it will return ill-formatted code if an option is specified, the src never gets set, so I return the code it attempted to evaluate (plain BB Code). If you wanted it to work like the way he had it, I can easily modify it back.
 

Attachments

Quick fix! If you are looking for a fix to the floating code utilize the following replacements:
(simple replacement begin)
HTML:
<span style="float: %s;">

and
(simple replacement ends)
HTML:
</span>

Edit:
I'm deep in a geeky programming marathon with a focus on this add-on... so, I'm happy to announce the features I am adding into the next version:
  • Bug Fixes
    • Modifies the FLOAT BB Code to allow for an image / other things to be floated and have surrounding items go around it.
    • Disallows overwriting of default BB Codes, as of right now, if you do a "html" BB Code, it'll change the default behavior.
  • Importing / Exporting of BB Codes
    • This is the 1 thing I haven't started on, but it'll have an XML import / export option to improve the ease of sharing BB Codes.
    • Will fail if the BB Code you are attempting to import is already within your system.
    • Allows for multiple BB Codes within a single import / xml file. (Maybe)
  • Support for multiple use parameters
    • The new version will allow for "advanced" option handling where you may use {1} and have the same option used in every single place. -- The Spoiler BB Code will be modified to utilize this system.
  • Support for an arbitrary number of options, separated by ", ".
    • The same system that powers the above is used here, but it'll allow you to use any number of options (as of right now, if you don't provide a BB Code with the correct number of options, it just returns the original set up) by using the same set up as above and using {1}, {2}, {3}, etc.
  • Support for advanced options.
    • Many BB Codes may want more and more options within them, such as the ability to not parse anything inside of, or to ignore tags. Its now possible through BB CM with a new "Advanced Options" section within the add / edit BB Code page.
OK, that's all I can think of what I'm including right now, but its pretty major. :)
 
Status
Not open for further replies.
Top Bottom