Joomlander.Net

...extensions by Bruce Scherzinger

  • Increase font size
  • Default font size
  • Decrease font size
Welcome, Guest
Please Login or Register.    Lost Password?
Go to bottomPage: 1
TOPIC: Username vs Name
#531
Username vs Name 2 Years, 10 Months ago  
Hi, I have installed CB profile notifier plug-in and it works great! Really nice piece of coding if you ask me!

I have only one question: Whenever a user changes his/her profile I get a message with his real name instead of his username. Can this be changed somehow?

tia
scud
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#532
Re:Username vs Name 2 Years, 10 Months ago  
There's no feature in the plug-in that allows you to insert the username into the message. However, it would be pretty easy to add. Edit the file cb.profile_notifier.php and look for the string "[USER]". You'll see it in a bunch of str_replace calls correlated with the variable $user->name. You can add support for a [USERNAME] placeholder by simply adding it to all of these str_replace calls. The following is an example of one.

Currently:
Code:

$message .= str_replace(array('[OPTION]','[FIELD]','[OLD]','[NEW]','[SITE]','[USER]'),
array($title,$setting->name,$old_setting,$new_setting,$GLOBALS['mosConfig_sitename'],$user->name),$change);


Modified:
Code:

$message .= str_replace(array('[OPTION]','[FIELD]','[OLD]','[NEW]','[SITE]','[USER]','[USERNAME]'),
array($title,$setting->name,$old_setting,$new_setting,$GLOBALS['mosConfig_sitename'],$user->name,$user->username),$change);


I'll add this in the next release.
brucescherzinger
Admin
Posts: 369
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#535
Re:Username vs Name 2 Years, 10 Months ago  
Thanks for the tip... it worked really well!!
scud
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
Moderators: brucescherzinger

Member Access

Donations Accepted

Joomlander.Net is now accepting donations. Your donation, though not required to use this site or download files, will help to keep it online and keep the Joomla extensions coming. Donations are made through PayPal and are 100% secure. You can use your own PayPal account or any major credit card.

Joomlander.net is not affiliated with or endorsed by the Joomla! Project or Open Source Matters. The Joomla! name and logo are used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.