vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   BB Code Enhancements - Optimize BBCodes and BBCodeImages in Editor (https://vborg.vbsupport.ru/showthread.php?t=207423)

Coroner 03-04-2009 10:00 PM

Optimize BBCodes and BBCodeImages in Editor
 
1 Attachment(s)
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 Codes
See 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)
  1. shows a normal editor (there are no custom BB Codes inside)
  2. I've added twelve BB Codes - see what happend.
  3. the same editor, with the modification (functions_editor) - but without separators after an image.
  4. and again, I placed the separators and added again 7 dummy-BB Codes
  5. a new option inside "BBCode settings"
  6. 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:
Code:

$bbcodes = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "bbcode");
and replace with:
Code:

$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:
Code:

$bbcodes = $db->query_read_slave("SELECT * FROM " . TABLE_PREFIX . "bbcode ORDER BY bbcodetag, twoparams");
and replace with:
Code:

$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

PHP Code:

if ($x >= $vbulletin->options['bbimagewrap']) 

Where "$vbulletin->options['bbimagewrap']" is the value coming from the settings.

You also can say:
PHP Code:

if ($x >= 9

Then an "image wrap" is after 9 images.

Raptor 03-09-2009 06:37 PM

1 Attachment(s)
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


All times are GMT. The time now is 03:10 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01259 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete