![]() |
Plugin based CKeditor friendly BBcode in vB4.1.8+ - howto
1 Attachment(s)
Plugin based CKeditor friendly BBcode in vB4.1.8+ - howto
I've put all the Ausphotography (AP) custom BBcodes into a plugin. Here is a skeleton example (with detailed comments) of how to do it. Skills needed: Intermediate PHP and vBulletin admin. Tutorial In the example the BBcode is 'w' which allows a warning to be posted in a thread. Make sure you BBcode does not conflict with the standard BBcodes or any other product BBcodes you have on your system. You can add multiple BBcodes using one plugin, just code a call back function for each and set the tags for each BBcode following the example. The syntax is (no option and option to change the Warning text): Code:
[w]Warning Message[/w] If you want an icon for your BBcode create and copy a small icon (say) APwarning.png (18x18) to your ./images/editor directory, the record insert will need the icon path in the buttonimage field. Attachment 134799 Product xml file Write a small product xml file that looks like the example below. Name it 'product_my_bbcodes.xml' You will need to write a call back function and set the tag list entries. Install the product via AdminCP. You will need to adjust the insert records. The options are a bit field based on: - strip_empty - 1 - stop_parse - 2 - disable_smilies - 4 - disable_wordwrap - 8 - disable_urlconversion - 16 Call back function Each BBcode will require a call back function as shown in the example and the tag_list definitions. The return function is what is put in the parsed post. You can implement database accesses in the BBcode processor (you need global $vbulletin; enabled per normal. Note this code is CKeditor friendly in that it tells CKeditor to ignore your BBcode in WYSIWYG mode. Tag list The tag list defines which options are active on the BBcode tag and should match the options of the insert record. Enjoy! Kym __________________________________________________ Code:
<?xml version="1.0" encoding="ISO-8859-1"?> |
1 Attachment(s)
|
Looks confusing, but good. ;)
|
Quote:
The main issues that you need to deal with are:
|
Hello snoopytas
my join date is 12 Aug 2006 and it's first time to say thanks thanks Very much the most tip i searched for was wysiwyg_no_parse vbulletin api are sucks --------------- Added [DATE]1331220081[/DATE] at [TIME]1331220081[/TIME] --------------- could you tell me how can i fin iformation like this wysiwyg_no_parse --------------- Added [DATE]1331220205[/DATE] at [TIME]1331220205[/TIME] --------------- also how could i ask editor for coustome view for user but use the bbcode on save |
@miiax6
-- I find the information by looking at the vB code. The vB API etc. is very powerful, but there is not a lot of deep documentation. >also how could i ask editor for coustome view for user but use the bbcode on save This is very hard as you have to know the internals of CKeditor. |
All times are GMT. The time now is 10:31 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|