Version: 0.2, by Haqa
Developer Last Online: Jun 2010
Category: Miscellaneous Hacks -
Version: 3.7.x
Rating:
Released: 11-20-2008
Last Update: Never
Installs: 16
Uses Plugins
Re-useable Code Translations
No support by the author.
If you use this, please click Installed!
This mod is an extension to my LDAP Authentication mod which must be installed before you can use this. It adds support for the LDAP "surname" and "firstname" attiributes by creating a new profile field and then setting its value to the values found in LDAP.
In addition this mod attempts to replace the users id on various pages with their fullname. This support is incomplete but improving as time goes on.
One of the interesting things this mod does is create a profile field within the install code, and set a vBulletin setting which doesn't exist yet (No, honestly! vBulletin settings for products come into existence AFTER the install scripts have run, but you can set their initial values from the install script if you wish).
This mod, and it's sister mod Location Support for LDAP Auth are fully functional but are also meant to demonstrate different ways in which my LDAP Authentication mod can be extended.
AdminCP Settings
This mod creates a new options group called LDAP Authentication Full Name Support where you can choose when the Fullname attribute should be set. The settings are either First Login Only or Every Login. There is also a reference to the profile field number in which the full name is stored - Really SERIOUSLY don't change this!
Requirements
PHP 4.3+ with LDAP support
LDAP Authentication 1.0+
Release Notes
0.1 - Initial version (Broken, not released)
0.2 - First release
Installation
Install the latest product file (below) using the Add/Import Product link on the Manage Products page under Plugins & Products in your AdminCP.
Haqa...
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
The Mod works fine, only a little problem exists for foreign installations: here in Germany we use characters like ö, ä, ü in our user-names, witch will be converted to unusual signs like "ü" by the Mod.
Do you have an idea, witch part of the code i have to change to solve this problem?
The Mod works fine, only a little problem exists for foreign installations: here in Germany we use characters like ?, ?, ? in our user-names, witch will be converted to unusual signs like "ü" by the Mod.
Do you have an idea, witch part of the code i have to change to solve this problem?
Thanks
That's down to character encoding. It's not a subject I am an expert on, but as far as I understand it you need to make sure that the vBulletin server (Apache, MySQL etc) and the LDAP server are using the exact same Unicode encoding then you shouldn't see the corruption.
Sorry I can't be of more help, but it's not something I've experienced with my users.
Quote:
Originally Posted by kamalrij
This mod works but it shows the full name only on showthread.php page. Any pointers on how to implement this across vBulletin would be appreciated.
I tried a lot of Replacement Variables but they didn't work either.
Thanks
The way I tackled this (and the only way to do it as far as I am aware) is look through the code of vBulletin and find every place where a username is ABOUT to be displayed then look for the nearest hook-point before that and write a hook which populates the correct vBulletin variable with the fullname from the user record. Oddly, hooking into the creation process of the "musername" (The marked up username) doesn't seem to work everywhere that a marked up username is displayed and I can't see why.
It is something I'm looking into and if I solve any more areas I'll update the mod.
That's down to character encoding. It's not a subject I am an expert on, but as far as I understand it you need to make sure that the vBulletin server (Apache, MySQL etc) and the LDAP server are using the exact same Unicode encoding then you shouldn't see the corruption.
Sorry I can't be of more help, but it's not something I've experienced with my users.
Hello!
I solved the problem with the special characters in this way:
The way I tackled this (and the only way to do it as far as I am aware) is look through the code of vBulletin and find every place where a username is ABOUT to be displayed then look for the nearest hook-point before that and write a hook which populates the correct vBulletin variable with the fullname from the user record. Oddly, hooking into the creation process of the "musername" (The marked up username) doesn't seem to work everywhere that a marked up username is displayed and I can't see why.
Did you ever have time to look in to this? As I try to work on this, I am really having problems understanding musername's implementation.
Why do changes to the fetch_musername hook work in certain places and not others, like Who's online?
(I know that is an open ended question, but a hint in the right direction is all I'm looking for!)
Did you ever have time to look in to this? As I try to work on this, I am really having problems understanding musername's implementation.
Why do changes to the fetch_musername hook work in certain places and not others, like Who's online?
(I know that is an open ended question, but a hint in the right direction is all I'm looking for!)
Thank you for this excellent addition to vB
I've not really had much time since I changed jobs (We don't use vB here ..... Yet ) but as far as I can tell the fetch_musername hook is used to fetch the musername (Marked Up Username) for the selected user, and the result is then cached. This cached copy is then used for a while, then the cache expires, and SOMETIMES gets repopulated... Beats me.. The most noticeable place where this doesn't quite work is "Who's Online?" where only your user is expanded, and only sometimes, the other users are their marked up login IDs...
When I get a chance to play with this that will be top of my "todo" list...
It helps me that you also see that musername is implemented to work well for the logged in user and less well for other user ids. Displaying the contents of custom fields for specified users seem to be beyond the purpose of fetch_musername. construct_online_bit, fetch_user_location_array, fetch_user_location_array and on up the line.
I have the feeling that when I finally understand this, I will see that I approached it from the wrong direction. I will post what I come up with .
Thanks for the reply, I know what it means to have a full task list