Mutt
Well-known member
thank youI'll look into it as soon as I possibly can.
thank youI'll look into it as soon as I possibly can.
$userid = XenForo_Model_User::getUserIdFromUser( $userModel->getUserByName($tag['children'][0]) );
if (!is_array($tag['children'][0]))
$userinfo = $userModel->getUserByName($tag['children'][0]);
else
$tag['children'][0] = '';
if (is_array($userinfo))
$userid = XenForo_Model_User::getUserIdFromUser($userinfo);
else
$userid = 0;
There is a small bug in the user tag code. It appears that XF's bbcode parser passes $tag['children'][0] as array if it finds mismatched tags. This causes getUserIdFromUser() and getUserByName() to throw exceptions, however XenForo_BbCode_TextWrapper::__toString() can't throw exceptions so the page dies with a fatal error.
I don't fully understand the code, so there is probably a better fix than this, but this seems to solve the problem.
Replace:
PHP:$userid = XenForo_Model_User::getUserIdFromUser( $userModel->getUserByName($tag['children'][0]) );
with:
PHP:if (!is_array($tag['children'][0])) $userinfo = $userModel->getUserByName($tag['children'][0]); else $tag['children'][0] = ''; if (is_array($userinfo)) $userid = XenForo_Model_User::getUserIdFromUser($userinfo); else $userid = 0;
<img class="alignleft" border="0" alt="" src="
" />
any ideas ?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
yodawn, you're right - but BB Code is all about converting to HTML so theoretically what A.Chakery is trying to do is correct.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
<div class="alignleft">
</div>
Yorick, anything for this?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?
It worked thank you ...yodawn, you're right - but BB Code is all about converting to HTML so theoretically what A.Chakery is trying to do is correct.
Technically, though this won't work.
How I would do this is the following.
Simple Replacement Start
Code:<div class="alignleft">
Simple Replacement End
Code:</div>
So if your tag was called ALIGNLEFT you would use it like so:
[ALIGNLEFT][IMG]http://www.domain.com/path/to/image.png[/IMG][/ALIGNLEFT]
Anything for this?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?
We use essential cookies to make this site work, and optional cookies to enhance your experience.