[GOTO=anchorname]link text[/GOTO]
<a href="#%s">link text</a>
<a href="#anchorname">link text</a>
I need it too. Have you requested xenforo command?I'm trying to create bbcode to use html anchors in a page.
Hi! I've just started to use the addon and have some suggestions:
Now every tag-render generates db query, so if my post will have 100 tags there will be 100 queries.
It is possible to store tags in simpleCache or get them in pre_view event by one query.
Other suggestion is to automatically or optionally add buttons to editor when bbcode is created.
BTW, do you have github?
I am using the "Double Post Merge" addon by Syndol, and for every double post merged, this addon creates 2 queries. Besides this, every spoiler creates one DB query. The Addon itself has 2 queries already, the number ofqueies is just baffling, any solution to this?
First thank you for sharing this add-on ...
I tired to create a custom BB code to align images left and right ... but it didn't work ..
Here is the codes that I used :
Simple Replacement Start:
Simple Replacement End:Code:<img class="alignleft" border="0" alt="" src="
but it didn't work ..Code:" />
any help is appreciated to sort it out .. thank you
You have to create a bbcode with a PHP Callback. Then you should do what you want to do using php.I'm trying to create bbcode to use html anchors in a page. The problem is when creating the link to the ancor, the bbcode is like this:
Code:[GOTO=anchorname]link text[/GOTO]
and is replaced this way:
Code:<a href="#%s">link text</a>
It works because in the post the html code result is:
The problem is that xenforo parses the url and when you click redirects you to this url: http://xenforourl/#anchorname
I had this working in vb and it's very annoying because we have several articles that use this bbcode.
There is an issue when using this addon with this:http://xenforo.com/community/resources/automatic-url-aliases-automatic-url-conversion.493/.
Here is the error: http://xenforo.com/community/attachments/30706/
Using the addon with any of the XF BBCodes, there is no error.
Any solution?
\library\Ragtek\PLEL\Formatter\BbCodeAutolink.php
$link = XenForo_Helper_String::prepareAutoLinkedUrl($url);
$link['url'] = preg_replace('#\[.*?\]#', '', $link['url'] );
\library\Ragtek\PLEL\Formatter\BbCodeAutolink.php
$link = XenForo_Helper_String::prepareAutoLinkedUrl($url);
$link = XenForo_Helper_String::prepareAutoLinkedUrl($url);
$closingTag = '';
if(preg_match('#\[/.*?\]#', $link['url'], $capture))
{
$closingTag = $capture[0];
$link['url'] = str_replace($closingTag, '', $link['url']);
$link['linkText'] = str_replace($closingTag, '', $link['linkText']);
}
return $tag . $link['suffixText'];
return $tag . $link['suffixText'] . $closingTag;
could you explain this?*g* what's the deal with the closingLet's do it again. It's not the cleanest way to do it, but it's the easier way for editing ^^
Search:
Replace:Code:$link = XenForo_Helper_String::prepareAutoLinkedUrl($url);
Code:$link = XenForo_Helper_String::prepareAutoLinkedUrl($url); $closingTag = ''; if(preg_match('#\[/.*?\]#', $link['url'], $capture)) { $closingTag = $capture[0]; $link['url'] = str_replace($closingTag, '', $link['url']); $link['linkText'] = str_replace($closingTag, '', $link['linkText']); }
Search:
Replace:Code:return $tag . $link['suffixText'];
Code:return $tag . $link['suffixText'] . $closingTag;
We use essential cookies to make this site work, and optional cookies to enhance your experience.