Firefox PHP

Real Name Module (5.1 and 5.2 ready)

All files from this thread

File Name File Size   Posted by Date  
real_name-1.3.0.zip 6.9 KB open | download Oliver Riesen-Mallmann 11/30/2006 Read message
real_name_stripper-1.0.0.zip 3.3 KB open | download Maurice Makaay 07/24/2006 Read message
real_name-2.1.0.tar.gz 11.6 KB open | download Maurice Makaay 01/30/2007 Read message
real_name-2.1.0.zip 14.3 KB open | download Maurice Makaay 01/30/2007 Read message
real_name-2.1.1.zip 14.2 KB open | download iamback 03/18/2007 Read message
Real Name Module (5.1 and 5.2 ready)
May 14, 2006 10:55AM
Real Name Module 1.3 (5.1 and 5.2 ready)

Why there are two maintained versions of this module?
At the moment there are two different versions of this module:
version 1 by Oliver Riesen 
Version 2 by Maurice Makaay.

Both versions offers (nearly) the same functionality, but the latter is more
sophisticated. It offers for example options to modify and extend its
behaviour through custom module hooks, a simple rewrite language which
can be used for easy writing of extra rewrite rules without having to write
loads of PHP code and functionality to let other modules which introduce new
occurances of the username on a page provide their own rewrite rules, without
having to add support for them to the Real Name module itself.

Currently, Oliver is still using version 1 on his own server and therefore
will keep maintaining the code. So if you are running version 1 of the mod,
you might choose for keeping that version. For new installations however,
we recommend installing version 2 of the module.

-- Maurice

Replaces all occurrences of user name in the whole Phorum-system by the real name also handling search by author. The user name is only used to log in. The user name is not shown anymore to other users. This is the behavior of the old version 3.3. Optional you can strip text components from the real names like e.g. webmaster or moderator.

Supports the following modules and add-ons:

- "Topusers in a templated Phorum-Page" add-on
- "Search by User ID" module
- "Search Unanswered Topics" module
- "Search Hot Topics" module
- "Search Most Read" module
- "Search Most Followed Topics" module

This module replaces completely the (now) deprecated "Real Names in Userlist" and "real_name in Post" modules.

Tested on version 5.1.17 and CVS (till revision 1468)

License:

Free to use, modify, or redistribute this code so long as I am given credit for the original development somewhere. This code comes with absolutely no warranty.

Installation:

1. Unpack the archive.

2. Move the directory "real_name" to the directory "mods" within your Phorum installation. Don't change the directory name!

3. If you want to use also the "Topusers in a templated Phorum-Page" add-on, you have to add the following line of code in topusers.php after the initial comment block:

define('phorum_page','topusers');

4. Login as administrator in Phorum's administrative interface and go to the "Modules" section.

5. Enable the "Real Name Module".

6. Optional: If you want to replace user names also in quotes you have to enable the "Enable quote hook" option in module settings. Take care that there should be only one module using the quote hook.

The BBCode module that is distributed with Phorum has also a quote hook function. Because it does not make sense to have more than one quote hook active, the BBCode module has an option to disable its quote hook function. You need to make sure that this quote hook function is disabled when using the quote hook from Real Name Module.

7. Optional: If you want to use the real name when sending notification emails look for the "Author as Sender Module".

Update from 1.2 to 1.3:

Follow installation instructions. Additional disable and enable the module once.

Module settings:

1. How to open profile links?

Define how to open profile links.

The default value is "new window".

2. Enable quote hook

To replace user names in quotes by reals names it's necessary to replace Phorum´s standard function for quoting. Since it only makes sense to have one module modifying the quoted text, you can disable this one part of this module. Use System Sanity Checks to control if there is only one module using the quote hook.

The default value is "disabled".

3. Texts to strip in real names

Comma separated list with text components to strip of the real name before displaying, e.g. like "Moderator" or "Webmaster".

The default value is none.

4. Select the pages (list, read, post, search, profile, pm, control, topusers) where you want to strip the above text components from the real names.

The default value is none.

Language support:

This module doesn't contain any language text.

Sanity Checks:

If you have problems with this module login as administrator in Phorum's administrative interface and go to the "System Sanity Checks" section. Check for warnings or errors for the Real Name Module.

Changelog:

2006/05/14 version 1.0.0 by Oliver Riesen (oliver@riesen.org)
- Initial release based on some ideas and code from the PHORUM developer Maurice Makaay, the "real_name in Post" module from Tomasz Regdos (tomek@regdos.com) and the "Real Names in Userlist" module from Chris Eaton (tridus@hiredgoons.ca).

2006/05/17 version 1.1.0 by Oliver Riesen (oliver@riesen.org)
- Added settings to select the pages where to strip the text components from the real names.

2006/06/07 version 1.1.1 by Oliver Riesen (oliver@riesen.org)
- Improved error handling in sort function.

2006/06/07 version 1.1.2 by Oliver Riesen (oliver@riesen.org)
- Support for the "Search by User ID"-Module.

2006/06/20 version 1.2.0 by Oliver Riesen (oliver@riesen.org)
- Added real name to preview (thanks to izi).

2006/07/26 version 1.2.1 Bug fix by Oliver Riesen (oliver@riesen.org)
- Correcting sort function for the moderator list (thanks to Maurice Makaay).

2006/08/02 version 1.2.2 by Oliver Riesen (oliver@riesen.org)
- Support for the "Search Unanswered Topics"-Module.

2006/08/04 version 1.2.3 by Oliver Riesen (oliver@riesen.org)
- Support for the "Search Hot Topics" module.

2006/08/09 version 1.2.4 by Oliver Riesen (oliver@riesen.org)
- Support for the "Search Most Read" module.

2006/09/06 version 1.2.5 by Oliver Riesen (oliver@riesen.org)
- Added sanity checks.
- Added information about the "Author as Sender" module.

2006/09/15 version 1.2.6 by Oliver Riesen (oliver@riesen.org)
- Support for the "Search Most Followed Topics" module.
- Bug fix checkbox handling in module settings.

2006/11/30 version 1.3.0 by Oliver Riesen (oliver@riesen.org)
- User name in quotes (posts and private messages) now also replaced by real name.


Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.




Edited 14 time(s). Last edit at 01/30/2007 03:25PM by mmakaay.
Attachments:
open | download - real_name-1.3.0.zip (6.9 KB)
izi
Re: Real Name Module (5.1 ready)
June 19, 2006 09:37PM
This mod works great from what I can see, except for one problem - that being the Posting Preview page. There doesn't appear to be a module hook available for that page, so I ended up hacking a core file to get the functionality in there. Perhaps a hook should be added there for future releases? Or simply the ability to use real names in the core app instead of using a module?
Re: Real Name Module (5.1 ready)
June 20, 2006 04:20AM
Hi izi,

Quote
izi
[...] except for one problem - that being the Posting Preview page [...]

It's not necesary to change the core. I added the real name replacement for the preview page to my module. See new version 1.2.0.

Regards
Oliver


Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
Real Name Module, version 2
July 24, 2006 07:36PM
This is almost a full rewrite of the real_name module that was created by Oliver Riesen. Here's an overview of the most important changes:

The module now is more flexable in its use by using the Phorum module system for allowing other modules to supply additional custom username rewrite rules, display names, profile links and even HTML formatted profile links (these can be used to fully override the way in which Phorum generates a users's profile link). See the README in the distribution for information on how to plug into the Real Names module from other modules.

The code for stripping text components from real names was removed from this module. This type of task can now be performed by a separate module through the new hooks within this module. For those who need this functionality, I wrote the real_name_stripper module. It is also attached to this message.

Some work was done to make maintaining the username rewriting code easier, to prevent problems due to copying and pasting lots of code. A simple rewrite language was added to make it an easy task to formulate rules that have to be applied to the Phorum data before displaying on screen. The rewrite_rules.src file in the distribution contains these rules and they will be compiled automatically into PHP code by the rewrite_rules_compiler class.

The sorting function for the userlist for user drop down lists didn't work correctly. It did reset the array index numbering, but the index of the array is used as the user_id in the drop down lists. This index is now kept intact. The sorting now also is case insensitive to prevent names starting with a lower case character from ending up at the end of the list.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce



Edited 5 time(s). Last edit at 01/30/2007 03:41PM by mmakaay.
Attachments:
open | download - real_name_stripper-1.0.0.zip (3.3 KB)
open | download - real_name-2.1.0.tar.gz (11.6 KB)
open | download - real_name-2.1.0.zip (14.3 KB)
Re: Real Name Module (5.1 ready)
August 02, 2006 06:42AM
Hi Maurice,

First thanks for the rewrite for this module.

But there is a little problem(from my pov), when listing posts from anonymous users(users with no accounts, but with name and email supplied when posted), the module replaces their names(and email) with the anonymous user string.

This is a problem i my case, because we have about 100.000+ posts, created from anonymous users, this makes it very hard to find old posts by looking at the name.

I have made a hack to overcome this(which doesn't replaces the name on anonymous users), but it would be nice to see this a option i the admin part.

Kind regards
Brian Lagoni
Re: Real Name Module (5.1 ready)
August 02, 2006 07:23AM
It needs no admin option, because this is a big IMO. I don't use anymous postings at all myself, so that's why I didn't notice the problem myself. I'll write a fix for this.

BTW: if you hack a fix for some problem, then please provide the hack in your problem report as well. That can make it easier for module maintainers to see what has to be changed. I've got a pretty good idea on how to fix this one, so for now it's not needed to post the changes that you've made.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Real Name Module (5.1 ready)
August 02, 2006 07:46AM
I uploaded a new version of the module to this message. Changelog for this version:
2006-08-02 version 2.0.2 by Maurice Makaay <maurice@gitaar.net>

    - Fixed the problem that for anonymous postings, the name was always
      replaced by "Anonymous user" instead of using the name that the
      poster provided. Thanks to LagoniX for reporting the problem.
Could you please check if this fully fixes your problems, LagoniX?


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Real Name Module (5.1 ready)
August 02, 2006 10:11AM
Hi Maurice,

Quote
mmakaay
This is almost a full rewrite of the real_name module that was created by Oliver Riesen.

For the moment I stay with my own (well tested) version because time is short and it's offering everthing I need. But certainly I'll update to your version later.

Quote
mmakaay
The sorting function for the userlist for user drop down lists didn't work correctly.

For those already using version 1 I offer in my first post a corrected version which supports now also my new "Search Unanswered Topics" module.

Regards
Oliver


Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
Re: Real Name Module (5.1 and 5.2 ready)
November 17, 2006 11:40PM
It seems that this module does not actually store the real_name in the author field when you post.

Is there a reason for this?
Re: Real Name Module (5.1 and 5.2 ready)
November 17, 2006 11:47PM
sorry i missed this reply in the other thread. moving it here where it is more on topic.

Quote
mmakaay
Why not? The real name mod rewrites all occurances of the username dynamically. If you store the real name in the author field, then the name would not change along with changing the name in the real_name custom user field. Additionally, this way more options are available. For example: on my own site, I do not only display a user's name, but also a profile image button next to their name and some small flagging images for marking moderators and users that are in the chatroom. All I have to code for this, is a small module that adds functionality to the real_name mod.

it's true that the name would not change along with the real_name field. i would think however that this is fine as the user intended to change their name. they may even like posting as a different name every time. doesn't matter much if the profile links all use the user_id anyway.

i guess what confuses me is that is what is the point of the author field at all then? seems kind of redundant if it is never supposed to be anything but what is in the users.username anyway.

mystery solved however and i got it working. thanks for answering.

r



Edited 2 time(s). Last edit at 11/17/2006 11:53PM by rheo.
Sorry, only registered users may post in this forum.

Click here to login