Firefox PHP

Module: User Tagging

Posted by Maurice Makaay 
All files from this thread

File Name File Size   Posted by Date  
user_tagging-1.0.7.tar.gz 14.8 KB open | download Maurice Makaay 06/19/2010 Read message
user_tagging-1.0.7.zip 21.2 KB open | download Maurice Makaay 06/19/2010 Read message
ninja belts.jpg 35.3 KB open | download Joe Curia 08/07/2008 Read message
belts.png 35.3 KB open | download SecretNinjaMan Maker 08/10/2008 Read message
Module: User Tagging
February 03, 2008 08:37PM
This module allows you to setup rules for creating custom template variables, based on a user's state / properties. This can for example be used to add some custom user status (e.g. "rookie", "regular", "veteran") to the users, based on their post count and/or registration date. Assignments can be done to authors on the read pages, to the user on the profile pages and to the logged in Phorum user on every page.

You can setup user tags, based on the following parameters:

* The total number of posts that a user made
* The number of posts that a user made in a vroot
* The number of posts that a user made in a forum
* The registration date for the user
* The date of last activity for the user
* The type of user (user, moderator, admin)
* The user status (active or deactivated)
* The user id or username (a list of user ids or usernames is possible too)
* Whether a user is in a certain group
* Whether the user is on a ban list or not

Info about post count based tagging:

For post count tagging, the module will keep track of message post counts
at various levels. It will keep track of the global post count, the post
count per vroot and the post count per forum. In the rules that you setup,
you can specify what level the module should consider for that rule. Using
this, it is for example possible to define a rule that will only look at the
number of messages that the user posted in the active forum.

If you have forums that you do not want to include in the post counts,
then you can configure these in the module settings. This might be useful
if you have something like a sandbox forum, that your users can use for
testing out forum features. Since this is not a serious forum, counting
the messages as real posts might not be appropriate.


A detailed hands-on example of how to use this module is provided in the README file in the package.

Changelog:
----------

2010-06-19 v1.0.7

    - Implemented ban list checking as a user matching criterium. Thanks
      to Phil Connolly for the idea and for writing up the patch.

2009-10-21 v1.0.6

    - Updated the module to be compatible with the new CSRF protection
      features in Phorum 5.2.

2008-10-17 v1.0.5

    - Always show the group criterium, so we can show users that there
      is such option available. Thanks to Ulf Dunkel for the suggestion.

2008-08-09 v1.0.4

    - Fixed the greater-than-or-equal comparisons. They were implemented
      as greater-then in the code.

2008-07-31 v1.0.3

    - Added an option for tagging the authors and recent authors that
      are shown on the message list pages.

2008-06-11 v1.0.2

    - Moved the tagging for the active Phorum user to the
      common_post_user hook. This way, the template variables
      can be setup early enough to give other modules access
      to them.

    - Added a new user matching option, to match users by their group.

    - Improved some wordings on the settings page to make the
      options easier to understand.

2008-02-05 v1.0.1

    - Removed some stale code which resulted in undefined index warnings
      on the read page.

2008-02-03 v1.0.0

    - Initial release


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce



Edited 9 time(s). Last edit at 06/19/2010 11:35AM by Maurice Makaay.
Attachments:
open | download - user_tagging-1.0.7.tar.gz (14.8 KB)
open | download - user_tagging-1.0.7.zip (21.2 KB)
Re: Module: User Tagging
February 05, 2008 10:04AM
I uploaded version 1.0.1 of the module. There was some stale code left from the Post Count Tagging -> User Tagging transition, which caused undefined index warnings on the read page. If you don't have troubles with this, there is no direct need to upgrade to this version.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: User Tagging
February 28, 2008 11:33PM
Any help in setting this up? I am using a custom theme based off the classic theme. You can see it here

Core 2 Quad 3.0Ghz w/ Apache 2.1 & MySQL & PgSQL on Arch Linux
Re: Module: User Tagging
February 29, 2008 12:48AM
Did you read the README file? I don't think I can start explaining things out of the blue here any better than I did in the README. There I provide a hands-on example of what you can do with it. The template that you use doesn't really matter for the module.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: User Tagging
February 29, 2008 02:38AM
Alright I figured it out. You should know that in 5.2.6a, you edit the cc-start.tpl and not the profile.tpl file. That fixed my primary problem.
Re: Module: User Tagging
February 29, 2008 07:38AM
Those are two totally different template files and they always have been. One is the user profile view, the other is from the user control center. So you still can edit them both, since they both represent data for users.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: User Tagging
June 11, 2008 11:26PM
I uploaded version 1.0.2 of the module.
This one implements a new group based match.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: User Tagging
July 01, 2008 03:33PM
I have a question about this module that occurred whilst reading the documentation.
Am I right in thinking a user can only have one status at a time on any given forum?
I ask because I initially thought it might be possible to use the module to assign users multiple icons / badges / medals etc.
In other words, each time a rule was met, the module could output a block of HTML within the template.

What do you think? Possible? Not possible? Good idea for an extension? Should be a completely new module?

For an example of how these icons could work, please see BoardGameGeek.com, eg this page: [www.boardgamegeek.com] (hover over the icons beneath each username to see the popups). On that site the call them "microbadges".

I guess if this was implemented, it would be best added to the site template so as to allow future expansion. So, for example, another module could be written to assign unique or specific icons to a particular username.
In other words, I see this User Tagging module as a dynamic way of tagging users - but perhaps a separate module could manually tag users as well. The resulting HTML output could then appear in the same area of the template, or different areas depending on webmaster preference.

Cheers,

/\dam

--
My notable Phorum sites:
Movie Deaths Database - "review comments" system mostly powered by Phorum
Learn Chinese! - integrated forum quiz
Re: Module: User Tagging
July 01, 2008 03:37PM
I'm looking at the module settings screen in more detail now, and I'm thinking maybe this could sort of do what I say above.
If the template contained placeholders for every type of icon in the system, then this module could presumably populate each one whose criteria was met?

It wouldn't be a very flexible way of doing it of course, as each time an icon was added, it would require a template change...

/\dam

--
My notable Phorum sites:
Movie Deaths Database - "review comments" system mostly powered by Phorum
Learn Chinese! - integrated forum quiz
Re: Module: User Tagging
July 01, 2008 05:05PM
This system is mainly meant for tagging the users and not 100% with a badge system in mind, as you already found out. It can be used for it, but like you say, the template needs adjustments for every badge that is added.

You can use the module to add several tags to the user, based on various criteria. After tagging the user (for example with tag value "1" to simply enable them), you could then use a different module for formatting the tags to output in the pages. That module's output could be put in a single template variable, so you don't have to update the templates over and over again.

Either way, you'd still have to update the module if new badges are added to make the process as friendly as possible. A slightly more heavy way could be to handle them dynamically. E.g., you could create user tags "BADGE_APE", "BADGE_CAT" and "BADGE_BIRD". The module could go over all user fields in the user records and check if any of them match "BADGE_*". You could then asume that badges "ape.png", "cat.png" and "bird.png" exist in some directory. But still, the method where you define what badges are available is better. It would allow for badge descriptions along with the badges as well. And you could build it on top of standard user properties like "admin = 1", so you don't need a user tagging rule to enable some admin badge.

I hope these ideas help.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Sorry, only registered users may post in this forum.

Click here to login