Resource icon

[bd] Tag Me for XenForo 1.3 3.2.0

No permission to download
I just installed this. This is what happens when I attempt to tag @Admins
Code:
[SIZE=13px][FONT=Trebuchet MS][COLOR=#000000]Undefined index:[/COLOR][/FONT][/SIZE]
[LIST=1]
[*][B][COLOR=#b45050]XenForo_Application::handlePhpError()[/COLOR][/B] [COLOR=#808080]in[/COLOR] [B]bdTagMe/Engine.php[/B] [COLOR=#808080]at line[/COLOR] [B]159[/B]
[*][B][COLOR=#b45050]bdTagMe_Engine->searchTextForTagged()[/COLOR][/B] [COLOR=#808080]in[/COLOR] [B]bdTagMe/XenForo/DataWriter/DiscussionMessage/Post.php[/B] [COLOR=#808080]at line[/COLOR] [B]18[/B]
[*][B][COLOR=#b45050]bdTagMe_XenForo_DataWriter_DiscussionMessage_Post->set()[/COLOR][/B] [COLOR=#808080]in[/COLOR] [B]XenForo/ControllerPublic/Post.php[/B] [COLOR=#808080]at line[/COLOR] [B]205[/B]
[*][B][COLOR=#b45050]XenForo_ControllerPublic_Post->actionSaveInline()[/COLOR][/B] [COLOR=#808080]in[/COLOR] [B]XenForo/FrontController.php[/B] [COLOR=#808080]at line[/COLOR] [B]310[/B]
[*][B][COLOR=#b45050]XenForo_FrontController->dispatch()[/COLOR][/B] [COLOR=#808080]in[/COLOR] [B]XenForo/FrontController.php[/B] [COLOR=#808080]at line[/COLOR] [B]132[/B]
[*][B][COLOR=#b45050]XenForo_FrontController->run()[/COLOR][/B] [COLOR=#808080]in[/COLOR] [B]/var/www/vhosts/herocraftonline.com/httpdocs/main/index.php[/B] [COLOR=#808080]at line[/COLOR] [B]13[/B]
[/LIST]
 
Sorry, I wasn't having a go at you! Tag works great on the forum and the addition of usergroups is a fantastic idea. Already tested and works just as you said it would.
 
I just installed this. This is what happens when I attempt to tag @Admins
Code:
[SIZE=13px][FONT=Trebuchet MS][COLOR=#000000]Undefined index:[/COLOR][/FONT][/SIZE]
[LIST=1]
[*][B][COLOR=#b45050]XenForo_Application::handlePhpError()[/COLOR][/B] [COLOR=#808080]in[/COLOR] [B]bdTagMe/Engine.php[/B] [COLOR=#808080]at line[/COLOR] [B]159[/B]
[*][B][COLOR=#b45050]bdTagMe_Engine->searchTextForTagged()[/COLOR][/B] [COLOR=#808080]in[/COLOR] [B]bdTagMe/XenForo/DataWriter/DiscussionMessage/Post.php[/B] [COLOR=#808080]at line[/COLOR] [B]18[/B]
[*][B][COLOR=#b45050]bdTagMe_XenForo_DataWriter_DiscussionMessage_Post->set()[/COLOR][/B] [COLOR=#808080]in[/COLOR] [B]XenForo/ControllerPublic/Post.php[/B] [COLOR=#808080]at line[/COLOR] [B]205[/B]
[*][B][COLOR=#b45050]XenForo_ControllerPublic_Post->actionSaveInline()[/COLOR][/B] [COLOR=#808080]in[/COLOR] [B]XenForo/FrontController.php[/B] [COLOR=#808080]at line[/COLOR] [B]310[/B]
[*][B][COLOR=#b45050]XenForo_FrontController->dispatch()[/COLOR][/B] [COLOR=#808080]in[/COLOR] [B]XenForo/FrontController.php[/B] [COLOR=#808080]at line[/COLOR] [B]132[/B]
[*][B][COLOR=#b45050]XenForo_FrontController->run()[/COLOR][/B] [COLOR=#808080]in[/COLOR] [B]/var/www/vhosts/herocraftonline.com/httpdocs/main/index.php[/B] [COLOR=#808080]at line[/COLOR] [B]13[/B]
[/LIST]

I think only @administrators works
 
Edit: Looks like that bug already got fixed, that was fast, you can ignore that part.
Found a couple small bugs. You get an undefined index error if you try to tag a non-existent user group.

In the rare case that you have a user whose name is the same as a user group, the user group seems to take preference and the user won't be alerted, unless the user happens to be in that user group as well. Heh, not sure what can be done about this, you'd have to get input from the user whether they intended to tag the user or the user group. Pretty rare case, so probably not worth wasting time on, but just thought I'd throw it out there...

May I also make a suggestion on the URL? For example changing a URL like:
/members/tagged/user_group/6

To:
/members/tagged/user-groups/6

XF tends to use plurals for the URL actions and dashes instead of underscores. Personally I think the dash looks better too. If the user has content titles enabled as well maybe you could also place the user group title like:
/members/tagged/user-groups/random-group.6

If you don't really care about those things, no worries. :p
 
Found a couple small bugs. You get an undefined index error if you try to tag a non-existent user group.

In the rare case that you have a user whose name is the same as a user group, the user group seems to take preference and the user won't be alerted, unless the user happens to be in that user group as well. Heh, not sure what can be done about this, you'd have to get input from the user whether they intended to tag the user or the user group. Pretty rare case, so probably not worth wasting time on, but just thought I'd throw it out there...

May I also make a suggestion on the URL? For example changing a URL like:
/members/tagged/user_group/6

To:
/members/tagged/user-groups/6

XF tends to use plurals for the URL actions and dashes instead of underscores. Personally I think the dash looks better too. If the user has content titles enabled as well maybe you could also place the user group title like:
/members/tagged/user-groups/random-group.6

If you don't really care about those things, no worries. :p

Yes, the non existent tagging bug has been fixed in 1.6.3.

In the case of duplicated name between a user and a group, the suggestion box and the parsing system will both detect the user group. An average Joe should notice a different avatar in the suggestion box when he tries to tag Registered (a user).

The user_group part in the url is the code name used internally so it's not easy to switch to use dash instead of underscore. The link structure is designed to be easy to support other type of tagging in the future so readability is an important factor. I will think more about this :)
 
In the case of duplicated name between a user and a group, the suggestion box and the parsing system will both detect the user group. An average Joe should notice a different avatar in the suggestion box when he tries to tag Registered (a user).
Oops, I didn't even get the autocomplete popup at all. Apparently I had a conflict with another addon. Sorry about that, great that this is already dealt with then.

Although is it just me or does the autocomplete box float at the very bottom of the editor? I assume it has to do with the editor being in an iframe, trying to place on top of a textarea is already hard enough. Did you ever have a try with some z-index and absolute positioning? Not sure if it can be done though.

The user_group part in the url is the code name used internally so it's not easy to switch to use dash instead of underscore. The link structure is designed to be easy to support other type of tagging in the future so readability is an important factor. I will think more about this :)
No biggie, up to you if it makes things easier. I'm just picky about these kind of things and prefer things to be more consistent with the way XF does stuff. :eek:
 
Although is it just me or does the autocomplete box float at the very bottom of the editor? I assume it has to do with the editor being in an iframe, trying to place on top of a textarea is already hard enough. Did you ever have a try with some z-index and absolute positioning? Not sure if it can be done though.
The suggestion box is designed to be at the bottom of the editor. There are suggestion to move it to the cursor position :D
 
Yes, only @Administrative will work. However, Kainzo encountered a bug and it has been fixed in 1.6.3. Please upgrade (again).
I just updated to 1.6.2 - groups now tag properly for @Admins @mods, etc... but when I do @t8 (a VIP rank)
it gives this message.

The following error occurred:

Undefined index:
  1. XenForo_Application::handlePhpError() in bdTagMe/Engine.php at line 153
  2. bdTagMe_Engine->searchTextForTagged() in bdTagMe/XenForo/DataWriter/DiscussionMessage/Post.php at line 18
  3. bdTagMe_XenForo_DataWriter_DiscussionMessage_Post->set() in XenForo/ControllerPublic/Post.php at line 205
  4. XenForo_ControllerPublic_Post->actionSaveInline() in XenForo/FrontController.php at line 310
  5. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
  6. XenForo_FrontController->run() in /var/www/vhosts/herocraftonline.com/httpdocs/main/index.php at line 13
 
I updated to 1.6.3, but now when I tag anyone...

Code:
mb_strripos() [function.mb-strripos]: Offset not contained in string.
XenForo_Application::handlePhpError()
mb_strripos() in bdTagMe/Engine.php at line 612
bdTagMe_Engine::utf8_strripos() in bdTagMe/Engine.php at line 297
bdTagMe_Engine->_isBetweenUrlTags() in bdTagMe/Engine.php at line 222
bdTagMe_Engine->_searchTextForPortions() in bdTagMe/Engine.php at line 139
bdTagMe_Engine->searchTextForTagged() in bdTagMe/XenForo/DataWriter/DiscussionMessage/Post.php at line 18
bdTagMe_XenForo_DataWriter_DiscussionMessage_Post->set() in XenForo/ControllerPublic/Thread.php at line 492
XenForo_ControllerPublic_Thread->actionAddReply() in XenForo/FrontController.php at line 310
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
XenForo_FrontController->run() in /var/www/vhosts/ffgarden.it/httpdocs/index.php at line 13
 
I updated to 1.6.3, but now when I tag anyone...
I assume you are trying to post a message like this

Code:
@username, something something

Is that correct? Can you try posting this way

Code:
Something something @username

And tell me the result? Thank you.
Also, in which language are you posting? English or else?
 
Php 5.2.6
That version is quite old, you should contact your server admin to upgrade to at least 5.3. Anyway, as a workaround until your server is upgraded, you can do a manual edit

File xenforo/library/bdTagMe/Engine.php
Line 297
PHP:
$posOpen = self::utf8_strripos($message, '[URL', $position - utf8_strlen($message));

Change it to
PHP:
$posOpen = self::utf8_strripos(utf8_substr($message, 0, $position), '[URL', 0);

Also, on the same file
Line 323
PHP:
$posOpen = self::utf8_strripos($message, '[PLAIN', $position - utf8_strlen($message));

Change it to
PHP:
$posOpen = self::utf8_strripos(utf8_substr($message, 0, $position), '[PLAIN', 0);
 
Top Bottom