Topic: Tag User

Is there an extension available to tag a user?

Example - @user

It would need to have a notification somewhere in the navigation bar to let users know they have been tagged.

Re: Tag User

I do not understand, what does it do? Describe in more detail.

Re: Tag User

PanBB.Ru wrote:

I do not understand, what does it do? Describe in more detail.

Basically, user A could mention user B in a thread and it would put a notification up for user B so that they would know about the conversation

Example -

"I read this story the other day and it made me think of @somebody."

Now the user 'somebody' would get a notification (same as a reply in one of the posts or a post quote) in the navigation bar.

Re: Tag User

It turns out, the extension shall inform the mention of a given user.
If me or someone said , I'll get a notification.

In general, it is interesting , but not sure that the expansion will pay off.

I think it is more important for women's forums , where they like to gossip. wink

Re: Tag User

PanBB.Ru wrote:

It turns out, the extension shall inform the mention of a given user.
If me or someone said , I'll get a notification.

In general, it is interesting , but not sure that the expansion will pay off.

I think it is more important for women's forums , where they like to gossip. wink

lol, maybe so.

It's starting to become a staple of other forum software because of how social media tags people to bring in more conversation and clicks.

Re: Tag User

Ок. Is there any example in which a forum?
I need to see a clearer picture...

Re: Tag User

I have kind of that feature as a plugin, although maybe not 100% what you're looking for:

Plugin-Download

The plugin won't set every @... as notification (because sometimes people might not want to notify somebody), but add the new bb tag [notify]username[/notify].
In the textarea for writing a new message, you can just type @user and you'll get a little popup recommending users starting with user* (those always come first) or containing *user*. Only the first 5 matches are shown to reduce loading time (obviously the database connection still shouldn't be too slow). If you click on one of the results, the "@user" will be replaced by [notify]username[/notify].
The feature only runs when the @ is at the beginning of the post or after some whitespace / line feed, so e-mail addresses won't be tagged.

The usernames offered for completion are only those users who have access to the current forum - just be aware that the php script which performs the search can be called separately by anybody, so people could test which users have access to which forums.
Guests never get any search results for safety reasons, so only logged in users get a result list.

In admin options (Settings -> Features) you can choose what kind of notification you'd like to have: Sending an e-mail to the user and/or showing a list of notifications on top of the forum.
Notifications are removed when the user opens the page of the thread containing the post. If you're tagged on page 3 of a post but open page 2, the notification will be kept active.

Re: Tag User

Screenshots:
http://www.danielrathjen.de/punbb/bbnotify1.png (writing a post using the extension)
http://www.danielrathjen.de/punbb/bbnotify2.png (notification showing up)
http://www.danielrathjen.de/punbb/bbnotify3.png (admin options)

Re: Tag User

Just in case you already tried / downloaded: I just put another version online which allows the use of arrow keys and enter to select a user from the search result list. Before you had to click on it.

Furthermore it might be good to know that when you quote a post, all notify tags are removed to prevent users being accidentally notified again.

Re: Tag User

Chaosmaker wrote:

Just in case you already tried / downloaded: I just put another version online which allows the use of arrow keys and enter to select a user from the search result list. Before you had to click on it.

Furthermore it might be good to know that when you quote a post, all notify tags are removed to prevent users being accidentally notified again.

Yes, I have installed , but have not figured out how it works. ((
What I should do?

Re: Tag User

You write a message and when writing the text, you just type @ and the beginning of a name. For example, if I want to tag you, I write @pan and a box will show "PanBB.Ru" (and maybe more users). Then you klick on the name. In the textbox it will show [notify]PanBB.Ru[/notify].
Then send the post.
In the post, it will show @PanBB.Ru as a link to your profile. Furthermore, you will get an e-mail with link to the post and you will see a red box on top of the forum showing the notification to you.

Maybe you tried to tag yourself, that doesn't work, you can just tag other users.

Re: Tag User

Oh thanks. Understood . Only when I type the @ symbol then the list is not displayed.

But if you enter [notify]@NameUser[/notify] everything works.

Everything is working. What would you like to change / add ? Something is missing?

Re: Tag User

The javascript code needs the extension pun_jquery to be running - but it's in the manifest file, so I guess you have it installed.

Did you type anything after @? Just @ shows nothing, you need at least one more character, like @r

Do you get any javascript error?

Re: Tag User

Probably a problem with the connection of the Script Library.
Tomorrow I will understand.
See you!

15 (edited by PanBB.Ru 2016-03-07 08:27)

Re: Tag User

I finally found the problem!

Extension only works with Default url scheme.
In other cases, the user does not appear, and the page may not load completely.
Probably because not the correct path to the file bbnotify_search.php.

So what's the problem? Extension works. The scheme is not difficult to fix.
Do I need a revision or correction?

I think you can still be simplified. Add a button to the @ symbol on the panel bbcode. Users do not need to be entered manually.

Also add the TITLE attribute to hover tooltips for beginners. That is what this symbol is not to be confused with e-mail and for what purpose it is intended .

16 (edited by Chaosmaker 2016-03-08 00:21)

Re: Tag User

Thanks for the feedback and good ideas.

I just uploaded the new version 1.1.0.

Changes:

  • Fixed the link to bbnotify_search.php for name suggestions (now uses $ext_info['url'] to make sure the path will work), so typing @p should work now (to find usernames containing p in this example)

  • Fixed cursor position after inserting a name from suggestion list

  • Added BB code button (just works with plugin pun_bbcode enabled, otherwise no effect), icon is "@", title is "notify"

  • Added information on BBCode help page

  • Some general cleanup

Hope it works well now. As the version number changed, after uploading you can just choose the "upgrade" option in admin menu.

Re: Tag User

Just perfect! I later try to install. Thanks you!
This software is free?

Re: Tag User

Yes, of course it's free. I just put the GPL reference in the header which I also found in another extension.
For the javascript part I use two additional small libraries (see the subfolders inside the js folder), both are also free to use, one with MIT license, the other one without specific license. Licenses are inside the folders.

Re: Tag User

Excellent work and thank you very much!

It's good to see the punbb community still getting after it.

20 (edited by PanBB.Ru 2016-03-14 12:38)

Re: Tag User

Chaosmaker, you can also add a dependency in the expansion.
In manifest.xml add strings

    <dependencies>
        <dependency>pun_jquery</dependency>
        <dependency>pun_bbcode</dependency>
    </dependencies>

Thus, only after installing all of these extensions will work correctly.

And also to the @ symbol was also inserted into the message

[notify]@[/notify]

Today, people have become lazy to do extra movements ))

Re: Tag User

The @ is wrong in there. wink

You can type @PanBB.Ru, but it will become [notify]PanBB.Ru[/notify] without the @.

The extension already has a dependency to pun_jquery in the manifest. The extension pun_bbcode is not needed, the notify works well without, so I don't want to set that dependency.

Re: Tag User

Chaosmaker wrote:

The @ is wrong in there. wink

You can type @PanBB.Ru, but it will become [notify]PanBB.Ru[/notify] without the @.

The extension already has a dependency to pun_jquery in the manifest. The extension pun_bbcode is not needed, the notify works well without, so I don't want to set that dependency.

then everything just fine )

23 (edited by PanBB.Ru 2017-04-01 21:16)

Re: Tag User

Hello!
error
[16-Mar-2016 02:42:07 Europe/Moscow] PHP Notice:  Array to string conversion in /home/f/punbb.info/public_html/forum/header.php(191) : eval()'d code on line 22

See function bbnotify_print_notifications()

I think the problem in this

if ($forum_user['is_guest']) return array();

Re: Tag User

Thanks for the report, you're right, that must be

if ($forum_user['is_guest']) return '';

The same a few lines later (should be return ''; instead of return;).

Updated version

Changed are just the bbnotify_functions.php (bugfix) and the manifest.xml (new version 1.1.1).

Re: Tag User

The @ on the BB bar does this inside the post

[notify]user[/notify]

It should convert it to

@user

When I manually insert @user it posts as @user

When I use the BBCode it shows up on the board as [notify]user[/notify]

It still works but looks very odd so for now I used css to remove the @ bbcode button.
I would love to have it work from the bb bar if possible.