![]() |
|
Thread Tools |
#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
it works great by typing but I can't add button for it next to left align button. what should i do? ![]() No members have liked this post.
|
#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.
__________________
▌█▐ Call For Submissions. Come share your poetry & writing at JPiC Forum.
▌█▐ JPiC Forum For Writers | Celebrating Diversity With The Typed Word The following members like this post: aminp30
|
#3
|
|||
|
|||
Originally Posted by JacquiiDesigns
thanks for reply dear Jacquii![]()
I need put justify button next to left align or right align. by adding custom bbcode it's not posible No members have liked this post.
|
#4
|
||||
|
||||
Originally Posted by aminp30
I really have no idea how you'd add that code into actual .php files.![]()
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.
__________________
▌█▐ Call For Submissions. Come share your poetry & writing at JPiC Forum.
▌█▐ JPiC Forum For Writers | Celebrating Diversity With The Typed Word The following members like this post: 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 http://www.vbulletin.org/forum/showt...t=justify+text This tell you how to do it for the Forum and for Blogs The following members like this post: aminp30
Last edited by Spangle; 07 Jun 2014 at 15:13. |
#6
|
|||
|
|||
Originally Posted by Spangle
Thank you but this is not what exactly I'm looking for.![]()
I need to add justify button next to other justify buttons. No members have liked this post.
|
#7
|
|||
|
|||
Is there any idea?
No members have liked this post.
|
#8
|
||||||||||||||||
|
||||||||||||||||
Originally Posted by aminp30
![]()
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:
Replace:
(You can also do this in the php hook "editor_toolbar_set". It is just a bit more envolved.) 4.) Create a plugin at hook "editor_custom_toolbar_loop":
Make sure your bbcode name is correct in all locations. The following members like this post: aminp30
Last edited by tbworld; 21 Jul 2014 at 22:18. |
#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? No members have liked this post.
|
#10
|
|||
|
|||
Originally Posted by aminp30
Oops ... corrected above. Thanks.![]()
--------------- Added 21 Jul 2014 at 22:27 --------------- If you find a descent justify icon for the ckeditor, you might want to attach it to the post -- for others. --------------- Added 21 Jul 2014 at 23:12 --------------- 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. No members have liked this post.
|
#11
|
|||
|
|||
Originally Posted by tbworld
Great!![]()
It works perfect. thanks a lot dear tbworld Yes of course I have two justify icon and also edited sprite.png and added justify and rtl and ltr. Excuse me but I have another question. is there any way to use this bbcode as like as right and left and center? I mean it just affect on Source mode with no interface in normal mode? Let's me thank you again for your tutorial. No members have liked this post.
|
#12
|
|||
|
|||
Originally Posted by aminp30
Glad your up and running... ![]()
![]() Unfortunately, I cannot understand the next question. Could you clarify? Thanks. ![]() No members have liked this post.
|
#13
|
|||
|
|||
Originally Posted by tbworld
![]()
ummmm! when you click on center button for example, in normal mode there is no tag but in source mode you can see [ center ] tag. now if you click on justify button you can see [ justify ] tag both in normal and source mode. is there any way to hide this tag in normal mode as like as other justify buttons? was it clear? No members have liked this post.
|
#14
|
|||
|
|||
Thank you for restating. Let me look at it a bit, and the answer is yes. I just didn't notice it was there. I am a little surprised it is not stripped by default, but obviously I overlooked something.
Quick fixes are never quick ![]() I will take a look at it later today, thanks for pointing it out. If I have time I will rewrite the plugin in JavaScript and fix the image positioning problems. No members have liked this post.
|
#15
|
||||
|
||||
Originally Posted by tbworld
nice sentence! ![]()
![]() thanks a lot, :flower: I taked a look at plugin.js in justify folder in "clientscript\ckeditor\plugins". Justify completely defined there. look at this codes:
I think these codes are OK. the problem is somewhere else. No members have liked this post.
|
![]() |
«
Previous Thread
|
Next Thread
»
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
|
|
New To Site? | Need Help? |
All times are GMT. The time now is 13:38.