Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons

Reply
 
Thread Tools
Optimize BBCodes and BBCodeImages in Editor Details »»
Optimize BBCodes and BBCodeImages in Editor
Version: 1.1, by Coroner Coroner is offline
Developer Last Online: Dec 2011 Show Printable Version Email this Page

Category: BB Code Enhancements - Version: 3.8.1 Rating:
Released: 03-04-2009 Last Update: 03-04-2009 Installs: 56
DB Changes
Code Changes Translations  
No support by the author.

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

Download Now

File Type: xml product-bbcode_optimize.xml (2.2 KB, 390 views)
File Type: txt READ.ME.txt (20.5 KB, 473 views)

Screenshots

File Type: gif normal_editor.gif (11.1 KB, 0 views)
File Type: gif normal_editor_with_bb.gif (14.9 KB, 0 views)
File Type: gif optimized_editor.gif (16.7 KB, 0 views)
File Type: gif optimized_editor_with_sep.gif (24.8 KB, 0 views)
File Type: jpg admincp.jpg (118.1 KB, 0 views)
File Type: jpg admincp_bbcode.jpg (52.5 KB, 0 views)
File Type: jpg sortorder.jpg (76.9 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 03-05-2009, 11:06 AM
Coroner Coroner is offline
 
Join Date: Feb 2008
Location: Germany
Posts: 797
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #3  
Old 03-05-2009, 01:04 PM
Coroner Coroner is offline
 
Join Date: Feb 2008
Location: Germany
Posts: 797
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Another very very quick edit:
BB Codes can have a sort order. Usefull for arranging the icons inside the editor
Reply With Quote
  #4  
Old 03-05-2009, 01:17 PM
shadowevil shadowevil is offline
 
Join Date: Apr 2006
Posts: 172
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great mod .... *installed*
Reply With Quote
  #5  
Old 03-05-2009, 05:09 PM
Jasem's Avatar
Jasem Jasem is offline
 
Join Date: Feb 2006
Location: www.menokia.com
Posts: 594
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good work, thank you :up:

installed
Reply With Quote
  #6  
Old 03-06-2009, 06:49 AM
Coroner Coroner is offline
 
Join Date: Feb 2008
Location: Germany
Posts: 797
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #7  
Old 03-09-2009, 04:17 PM
powersilie powersilie is offline
 
Join Date: Dec 2008
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #8  
Old 03-09-2009, 05:18 PM
Coroner Coroner is offline
 
Join Date: Feb 2008
Location: Germany
Posts: 797
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #9  
Old 03-09-2009, 06:37 PM
Raptor Raptor is offline
 
Join Date: Nov 2001
Posts: 499
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Attached Images
File Type: gif sep_space.gif (4.6 KB, 0 views)
Reply With Quote
  #10  
Old 03-09-2009, 07:02 PM
powersilie powersilie is offline
 
Join Date: Dec 2008
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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).



Greetings
Karin
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:38 AM.


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.06788 seconds
  • Memory Usage 2,328KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete