Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Full Name Support for LDAP Auth Details »»
Full Name Support for LDAP Auth
Version: 0.2, by Haqa Haqa is offline
Developer Last Online: Jun 2010 Show Printable Version Email this Page

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.

Comments
  #2  
Old 04-27-2009, 08:32 AM
Blinker Blinker is offline
 
Join Date: Apr 2009
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello!

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
Reply With Quote
  #3  
Old 05-27-2009, 02:34 AM
kamalrij kamalrij is offline
 
Join Date: May 2009
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #4  
Old 05-27-2009, 06:12 AM
lm3a.net's Avatar
lm3a.net lm3a.net is offline
 
Join Date: May 2009
Posts: 134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks,,
Reply With Quote
  #5  
Old 05-27-2009, 12:28 PM
Haqa Haqa is offline
 
Join Date: Jul 2008
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Blinker View Post
Hello!

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 View Post
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.

H.
Reply With Quote
  #6  
Old 06-10-2009, 08:00 AM
Blinker Blinker is offline
 
Join Date: Apr 2009
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Haqa View Post
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:

http://www5.picfront.org/picture/XPSwuosH/img/zzz.jpg


Greetings
Reply With Quote
  #7  
Old 06-10-2009, 08:15 PM
Haqa Haqa is offline
 
Join Date: Jul 2008
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ahh.... good idea...

I can roll that into a future release if that's ok with you?

H.
Reply With Quote
  #8  
Old 06-24-2009, 07:54 PM
Abe Koenghiem Abe Koenghiem is offline
 
Join Date: Feb 2009
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Superior Hack!!!

Quote:
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!)


Thank you for this excellent addition to vB
Reply With Quote
  #9  
Old 06-24-2009, 09:12 PM
Haqa Haqa is offline
 
Join Date: Jul 2008
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Abe Koenghiem View Post
Superior Hack!!!
Thank you!

Quote:
Originally Posted by Abe Koenghiem View Post
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...

H.
Reply With Quote
  #10  
Old 06-25-2009, 11:11 AM
Abe Koenghiem Abe Koenghiem is offline
 
Join Date: Feb 2009
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the reply Haqa,

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
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:27 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05984 seconds
  • Memory Usage 2,305KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete