The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
Let's say i wrote my bbcode through a bbcode_create.
All fine, but if i post a link, like [mybb]http://somelink.com/[mybb], link will be parsed after reload page (if it was ajax). And after reload page posted link not will be trimmed. That doesn't happen, if before of link will be exist a whitespace or a new line, like Code:
[mybb] http://somelink.com/[mybb] [mybb] http://somelink.com/[mybb] ![]() PS A similar situation can be replicated in the hack BB Code [table]. |
#2
|
||||
|
||||
![]()
You shouldn't need to be creating BB codes themselves in bbcode_create. You should be creating them in bbcode_fetch_tags. Please provide code as to what you're doing currently.
|
#3
|
||||
|
||||
![]()
Should... I tried different ways, include bbcode_fetch_tags, but nothing changes.
I talk about only url bbcode, other bbcodes (inside custom bbcode) normally spend this situation. |
#4
|
||||
|
||||
![]()
So what are you trying to do again - you are not very clear about that.
|
#5
|
||||
|
||||
![]()
Ok, this example
Code:
<hookname>bbcode_create</hookname> <phpcode><![CDATA[if (!function_exists('handle_bbcode_custom')) { function handle_bbcode_custom(&$parser, $code, $options) { $code = 'code'; return $code; } }]]></phpcode> <hookname>bbcode_fetch_tags</hookname> <phpcode><![CDATA[$tag_list['no_option']['custom'] = array( 'callback' => 'handle_external', 'external_callback' => 'handle_bbcode_custom', 'strip_empty' => true ); $tag_list['option']['custom'] = array( 'callback' => 'handle_external', 'external_callback' => 'handle_bbcode_custom', 'strip_empty' => true );]]></phpcode> |
#6
|
||||
|
||||
![]()
Another example in images on custom bbcode "spoiler".
First attach: we open the post in ajax editor and add couple links into bbcode spoiler Second attach: we save the edited post Third attach: we refresh the page So, how can we see the first link isn't processed as needed. |
#7
|
||||
|
||||
![]()
So, i found out, this is a bag of function convert_url_to_bbcode, precisely convert_url_to_bbcode_callback.
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|