PDA

View Full Version : BB Code Enhancements - Optimize BBCodes and BBCodeImages in Editor


Coroner
03-04-2009, 10:00 PM
What does vBulletin do with BB Codes ?
vB simply adds any BBCode that used an image to the standard images inside the editor.
What happend, when I have a lot of BB Codes ?
My Editor width, grows wider and wider *g

What does this mod do ?
It allows you to optimize your custom BBCodes.


That means:
add a separator after an image (if the BB Code used it)
enable/disable a custom BBCode
arranges the BB Code Images inside the editor
new in v1.1 enter a sortorder for BB CodesSee Images for what I mean.
I've added three fields to the database table "bbcode".
They called: "active", "separator" and "sortorder".

After installing the Product, all avaible custom BB Codes will become active.

Attention:
You need to edit 3 files (there are no HOOKs to do that).
After editing the files, go into the AdminCP, click on BB Codes, click on edit and save it. That's only for caching the BBCodes.

For editing the files, rename the READ.ME.txt into READ.ME.html.
And follow the instructions.

Edit changes for v1.1 are marked with red color in the READ.ME

Coroner
03-05-2009, 11:06 AM
A small explanation 'bout the Images (left -> right)

shows a normal editor (there are no custom BB Codes inside)
I've added twelve BB Codes - see what happend.
the same editor, with the modification (functions_editor) - but without separators after an image.
and again, I placed the separators and added again 7 dummy-BB Codes
a new option inside "BBCode settings"
the options itself in a BB Code

Coroner
03-05-2009, 01:04 PM
Another very very quick edit:
BB Codes can have a sort order. Usefull for arranging the icons inside the editor

shadowevil
03-05-2009, 01:17 PM
great mod .... *installed*

Jasem
03-05-2009, 05:09 PM
Good work, thank you :up:

installed

Coroner
03-06-2009, 06:49 AM
I forgott a changing in the READ.ME.

This will show the BB Codes (do='modify') in your sortorder.
search for:
$bbcodes = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "bbcode");
and replace with:
$bbcodes = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "bbcode ORDER BY sortorder ASC");

For everyone, who doesn't want that inactive BB Codes will shown on the misc.php=bbcode, he needs to edit the misc.php, too.
search for:
$bbcodes = $db->query_read_slave("SELECT * FROM " . TABLE_PREFIX . "bbcode ORDER BY bbcodetag, twoparams");
and replace with:
$bbcodes = $db->query_read_slave("SELECT * FROM " . TABLE_PREFIX . "bbcode WHERE active=1 ORDER BY bbcodetag, twoparams");

Hope that Jelsoft will integrade it in a further version.

powersilie
03-09-2009, 04:17 PM
Thank You so much, it's a great mod! *Installed*

The only thing is, first after install I wanted 16 icons in one row. But then I changed to 18, but it doesn't change any more. Now there are 16 icons in one row and it will not change to 18 or something else....
I don't know which mistake I did.

Greetings
Karin

Coroner
03-09-2009, 05:18 PM
Umm, the function to do an "image wrap" is in the functions_editor.php

if ($x >= $vbulletin->options['bbimagewrap'])
Where "$vbulletin->options['bbimagewrap']" is the value coming from the settings.

You also can say:
if ($x >= 9)
Then an "image wrap" is after 9 images.

Raptor
03-09-2009, 06:37 PM
seems to work fine however the seperator option adds a large blank space after the seperator. Other than that wotrks great - just what I needed

Thanks in advance

powersilie
03-09-2009, 07:02 PM
Hallo Coroner!

I'm sorry, it doesn't work for me. I tried it with "20"and "18", but the wrap ist after 16 images (my first decision).

https://vborg.vbsupport.ru/external/2009/03/43.png

Greetings
Karin

Coroner
03-10-2009, 07:44 AM
@powersilie:
You only have 5 custom BBCodes. The custom BBCodes starts now in the 3rd line (your 1st is the "think" BBCode. For testing set it to 3 and you will see, that it works.
1st and 2nd line are the vBulletin BBCodes.

@Raptor:
The seperator is a vB images (6x20 px), the editor images should have a dimension of (21x20 px). Take a look at the first vB BBCodes (B, I, U). the Seperator is after underline. you placed a seperator after you fist one (better do it after the third, too).

Cheers
Coroner

powersilie
03-10-2009, 09:08 AM
Hi Coroner!

Silly me! It was a logical error of mine :o

Thanks a lot, of course it works!

Greetings
Karin

Fulmega
04-10-2009, 08:18 PM
Thanks Coroner, installed and working perfectly

Installed

dvbusuario
04-10-2009, 09:07 PM
Install, very good hack!

Nominated!

Thank you.

11Uriel11
05-15-2009, 03:20 PM
great mod, Installed, but now I need bbcode for my forum.

powersilie
06-30-2009, 09:27 AM
seems to work fine however the seperator option adds a large blank space after the seperator. Other than that wotrks great - just what I needed

Thanks in advance


I also have this problem. I place the separator after the second and the fourth too, but it looks like this pic.

greez
Karin

Coroner
06-30-2009, 12:45 PM
Could you pls post a picture ?

powersilie
07-01-2009, 12:01 PM
Hallo!

It's exactly the same pic like that from "Raptor" in posting nr. 9 ->

https://vborg.vbsupport.ru/showpost.php?p=1764247&postcount=9

A separator after each image is not possible. And if I do not place any separator, they are very close.

greetings
Karin

Coroner
07-02-2009, 04:50 PM
Ok, In the line above, find the seperators. I think, when all seperators blocking each other, this looks better

Sayid
07-02-2009, 10:42 PM
I was looking for this :)

It should already be a default option in vb script..

installed and nominated ;)

accludetuner
07-03-2009, 05:34 PM
I noticed a small discrepancy.

Install instructions say:

search for: (function: upgrade bbcode database)
twoparams = '" . $db->escape_string($vbulletin->GPC['twoparams']) . "',

add below:
`separator` = " . intval ($vbulletin->GPC['bbcode_separator']) . ",
`active` = " . intval ($vbulletin->GPC['bbcode_active']) . ",

but I don't have that line. Closest matching line is:
if ($db->query_first("SELECT * FROM " . TABLE_PREFIX . "bbcode WHERE (bbcodetag = '" . $db->escape_string($vbulletin->GPC['bbcodetag']) . "' AND twoparams = " . $vbulletin->GPC['twoparams'] . ") AND bbcodeid <> " . $vbulletin->GPC['bbcodeid']))



A few other small discrepancies, but that's the biggest one and it's keeping me from installing right now :(

V3.8.2

Coroner
07-03-2009, 06:07 PM
in vB3.8.1 there is only one line starting with:

twoparams = '"

xyzmary2001
09-03-2009, 08:03 AM
Wonderfully mod. Installed and nominated. I was looking for a very long time for this. Just great, and the instructions are so clear that even I, who never tried to edit a php, managed to do it without troubles.

arauf
09-05-2009, 08:32 PM
Hi , im using version 3.8.4 ,i have edited all files installed product but

1- I cant see any "Optimizing BB Codes" anywhere in admin CP.
2- cant understand these steps under instalion.

---------------------------------------------------------------------------------------------------
3. If you are using more than one Language, follow the next Step
4. Languages & Phrases -> Download / Upload Languages
Now choose the Languagefile Add Language (choose Language) -> import
----------------------------------------------------------------------------------------------------

what im importing in language ? and what files in include folder as it mentioned in

How to start:
# Upack the ZIP/RAR File into a folder on your Harddisc.
# Upload all Files of the Folder "upload" incl. all Subfolders onto your Server.
# Now, enter your AdminCP.


I am all confused , any help ?

Coroner
09-06-2009, 07:44 AM
1.) You can't ! See under BB Codes

2. + 3. + 4.) Only if you have a multilanguage Forum. That means, more than one language

EidolonAH
09-06-2009, 10:36 AM
Does exactly what it says on the box, nice one, thank you for the share.

nomoreturn
09-06-2009, 02:35 PM
Where is the zip file in download there is only xml and read me file where is the zip/rar file
How to start:

Upack the ZIP/RAR File into a folder on your Harddisc.
Upload all Files of the Folder "upload" incl. all Subfolders onto your Server.
Now, enter your AdminCP.

Coroner
09-06-2009, 03:29 PM
Sorry,'bout this. It's my standard text :)

Ignore it.

RedHacker
10-06-2009, 09:33 PM
It is hard to install

piratarg
11-01-2009, 11:44 AM
Very thanks for the mod! :)

bravoesdotcom
02-21-2010, 02:20 AM
this work thx...
installed

Eduardo Leon
03-06-2011, 07:55 PM
Aqui esta la traduccion del "las instrucciones " de este Add on :

https://vborg.vbsupport.ru/attachment.php?attachmentid=127208&stc=1&d=1299448505

Saludos sukubis (: !

Thelonius Beck
03-22-2011, 11:12 PM
Rather involved Install, but well worth the time. This really should be standard in vBulletin.

BirdOPrey5
03-27-2011, 04:48 PM
Definitely would have liked to see these options in vBulletin by default. Tagging for now, will install after I upgrade to 3.8.7 since I won't have to worry about any more upgrades after that. :) Ever.

Fluke667
02-12-2012, 05:11 PM
works on 3.8.2 but not on 3.8.7