The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
justify bbcode for vb.4.2
hi guys
i need to add justify bbcode, but not as a custom bbcode. I found the code in class_bbcode.php --> line 3542. and added this code PHP Code:
|
#2
|
||||
|
||||
Hmmm. Why revise the actual class_bbcode.php file?!
Don't you think the purpose of the default custom bbcode functionality is to... add custom bbcodes easily and without the need of modifying the vB script...? As for what you should do? Really haven't a clue. Good luck with it though. J. |
Благодарность от: | ||
aminp30 |
#3
|
|||
|
|||
Quote:
I need put justify button next to left align or right align. by adding custom bbcode it's not posible |
#4
|
||||
|
||||
Quote:
If you use the built-in custom bbcode functionality though - there's a formfield that allows you to easily use the justify button/image of your choice. There's really no need to edit the class_bbcode.php for what you're trying to accomplish. J. |
Благодарность от: | ||
tbworld |
#5
|
|||
|
|||
There is a fix for those that want justify by altering the relative code, that way all post are automatically justified, it also works in the blog.
**EDIT** See this post https://vborg.vbsupport.ru/showthrea...t=justify+text This tell you how to do it for the Forum and for Blogs |
Благодарность от: | ||
aminp30 |
#6
|
|||
|
|||
Quote:
I need to add justify button next to other justify buttons. |
#7
|
|||
|
|||
Is there any idea?
|
#8
|
|||
|
|||
Quote:
1.) In "bbcode.php" remove your 'justify' tag or rename it to 'justifyold'. This is hindering you, more then you know. 2.) Create a 'justify' bbcode using your HTML and include an icon. - Make sure it has been added it to the CKEDITOR before proceeding. -- Yes, I know it is in the wrong position, please continue. - Note: There is no justify icon in the sprite, thus the need to add one. 3.) In '/vb/ckeditor.php': Find: Code:
$justify = (vB::$vbulletin->stylevars['textdirection']['string'] == 'ltr' ? array('JustifyLeft', 'JustifyCenter', 'JustifyRight') : array('JustifyRight', 'JustifyCenter', 'JustifyLeft')); Replace: Code:
$justify = (vB::$vbulletin->stylevars['textdirection']['string'] == 'ltr' ? array('JustifyLeft', 'JustifyCenter', 'JustifyRight', 'justify') : array('JustifyRight', 'JustifyCenter', 'JustifyLeft', 'justify')); 4.) Create a plugin at hook "editor_custom_toolbar_loop": Code:
// Hook: editor_custom_toolbar_loop // Desc: Editor - Remove 'BBCODE' icon from the end of the toolbar chain. if ($title === 'justify') unset($title); |
Благодарность от: | ||
aminp30 |
#9
|
|||
|
|||
nice tutorial tbworld, but I think there is a little problem.
I created a custom bbcode correctly.(it worked perfect) but the replace code in '/vb/ckeditor.php' does not work and the plugin works perfect and remove justify from the end I think your 3rd step needs a bit change. would you please check it out? |
#10
|
|||
|
|||
Quote:
--------------- Added [DATE]1405978076[/DATE] at [TIME]1405978076[/TIME] --------------- If you find a descent justify icon for the ckeditor, you might want to attach it to the post -- for others. --------------- Added [DATE]1405980722[/DATE] at [TIME]1405980722[/TIME] --------------- Comment -- This really needs a full JavaScript plugin to handle exceptions. Image placement and spacing is not handled correctly with just a simple HTML solution. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|