PDA

View Full Version : BB Code Enhancements - Import / Export BBCodes as XML files (updated by BOP5)


BirdOPrey5
09-24-2011, 10:00 PM
This mod is based on an original mod released way back in 2005 by Dream. Original mod thread: https://vborg.vbsupport.ru/showthread.php?t=91435 (Marked Re-usable code.)

The purpose of this mod is to give vBulletin the much needed ability to quickly import and export BB Codes as .xml files. Imagine importing a single file rather than going through all the steps of copying & pasting code to install a new BB Code.

The original mod was a good start but it needed serious updating for vBulletin 3.8 & 4.x.

Some changes from the original mod:


Had to change a variable name due to a conflict
Had to add support for additional BBCode options
Had to have the mod refresh the BBCode Cache upon upload of a new BBCode


This mod does not have any product/install XML file.

To install simply upload the two files and refresh/reload your Admin CP page. You will see the new option "Import/Export BBCodes" under "Custom BB Codes" on the side menu.

To upgrade simply overwrite the two files.

To uninstall simply delete the two files.

bbcodes_impex.php - Goes in your admincp directory
cpnav_ieb.xml - Goes in your includes/xml directory

Once installed importing and exporting of BBCodes is fairly self-explanitory.

You can only upload BBCodes saved in this specific XML style.

You can download more BBCodes in this format from:
http://www.qapla.com/mods/forumdisplay.php/11-Qapla-BBCodes

Many more wll be added soon.

Tested and working with vBulletin 3.8.7. 4.0.8, and 4.1.5. Expected to work on all vB 3.7, 3.8, and 4.x versions.

Please Mark as Installed if you use this. :)

BirdOPrey5
09-25-2011, 02:49 PM
Reserved

Sunka
09-25-2011, 07:41 PM
Installed!
Nice session of small but useful tweaks/Mods birdoprey.

Thanks

Boofo
09-25-2011, 08:07 PM
Can you add multiple bbcodes from one xml file?

BirdOPrey5
09-25-2011, 08:34 PM
It is something I will be looking into.

sulasno
09-25-2011, 10:38 PM
tagged and thanks

Dr.osamA
09-25-2011, 10:40 PM
Great work as usually
installed + 5 stars + translated to arabic

thank you bro you are great man keep it up

Sayid
09-26-2011, 01:42 PM
It really saves the time and effort

Sforums
09-27-2011, 12:53 AM
I am getting error when importing the product:

XML Error: Not well-formed (invalid token) at Line 78

Any ideas what could be the problem? Using 4.1.0 Patch Level 2

Dr.osamA
09-27-2011, 08:47 AM
I am getting error when importing the product:

XML Error: Not well-formed (invalid token) at Line 78

Any ideas what could be the problem? Using 4.1.0 Patch Level 2

bro you dont need to import any product
there are no product for importing just uploade files to your forum root as it

BirdOPrey5
09-27-2011, 05:23 PM
I am getting error when importing the product:

XML Error: Not well-formed (invalid token) at Line 78

Any ideas what could be the problem? Using 4.1.0 Patch Level 2

As was said there is nothing to import. Please read the instructions.

Sforums
09-27-2011, 06:25 PM
Thanks guys. I must have been half asleep while reading those instructions.

BirdOPrey5
09-27-2011, 08:28 PM
Thanks guys. I must have been half asleep while reading those instructions.

No prob. Please Mark as Installed if you are using this.

OldSchoolDSL
11-18-2011, 07:20 AM
Can't imagine why this isn't getting more attention. A much needed time saver.

Installed and working 4.1.8

Sarab
03-08-2012, 04:30 AM
Hello,

Great work, thank you =)

I have a question, when I was in vbulletin 3.8 I was using a background bbcode where I put image URL and it make the thread background the image, but since I upgrade to vbulletin 4 it don't work =\

And I'm tired from searching everywhere for anything concern this bbcode but can't find any clue about it =.=

Anyway the replacement code was:
<div style="width:100%; background-image:url({param});">

And still the old thread with it showing the background, anyway I hope if you can spend minutes to guide me how to fix it ^^"

Best Regards,
Sarab

BirdOPrey5
03-08-2012, 10:30 AM
Sarab,

That replacement code has no closing <div> tag... It is not valid HTML, I can't imagine it ever worked right as it is written- if it did it was probably just some browsers rendering it improperly.

However if you modified the bbcode like this-

<div style="width:100%; background-image:url({option});">{param}</div>

That would be valid/working code... You would use it like:

div contents here...

You would need to set "Use Option" to YES in the BBCode settings.

Sarab
03-08-2012, 11:00 PM
BirdOPrey5,

I will cry of happiness T.T

It did work more then just perfect =)
but little note, the wallpaper don't show its full height unless the post contain enough lines, so can I make it independent to the lines?

I see, then maybe when it did not worked we try to fix it and ruin it more and leave it there xD

Really big thanks and I'm really grateful for helping me :D

Best Regards,
Sarab

BirdOPrey5
03-08-2012, 11:13 PM
You're welcome...

If the background images are all the same height you can try this code- but if they are different heights I'm not sure if that is possible with this type of code.

<div style="width:100%; height:600px; background-image:url({option});">{param}</div>


That example should make the div 600 pixels high, you can change "600" as necessary.

Sarab
03-10-2012, 04:37 AM
Thanks again =)

I see, no the height differ too much because the majority of user use random image for the background xD

But it's not a big problem since only user who wright a long post use this bbcode usually =)

Very thank you for your super help =D

Best Regards
Sarab