Format Username in private.php ?
Jumper Offline
Member
***
Posts: 75
Joined: Aug 2010
Post: #1
Format Username in private.php ?
Hello,

what must i change in private.php, so that the usernames (sender/sent to) are formated (color) in listview?
01-06-2012 12:25 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #2
RE: Format Username in private.php ?
Depends on where exactly you want it, but the general procedure should be to look for build_profile_link() calls and wrap with format_name() calls.

If just the PM listing, then:
Find LAST instance of

Code:
SELECT pm.*, fu.username AS fromusername, tu.username as tousername

replace with

Code:
SELECT pm.*, fu.username AS fromusername, fu.usergroup AS fromusergroup, fu.displaygroup AS fromdisplaygroup, tu.username as tousername, tu.usergroup AS tousergroup, tu.displaygroup AS todisplaygroup


Find LAST instance of

PHP Code:
$tofromusername = build_profile_link($tofromusername, $tofromuid);

Add before:

PHP Code:
1
2
3
4
5
6
7
8
9
			if($folder == 2 || $folder == 3) {
				$tofromgrp = $message['tousergroup'];
				$tofromdgrp = $message['todisplaygroup'];
			} else {
				$tofromgrp = $message['fromusergroup'];
				$tofromdgrp = $message['fromdisplaygroup'];
			}
			if($tofromgrp)
				$tofromusername = format_name($tofromusername, $tofromgrp, $tofromdgrp);


My Blog
01-06-2012 04:27 PM
Find all posts by this user Quote this message in a reply
Jumper Offline
Member
***
Posts: 75
Joined: Aug 2010
Post: #3
RE: Format Username in private.php ?
Yes it is for PM listing.

It works PERFECT! Wink

big thank you ZiNgA BuRgA, excellent work Yes
01-07-2012 01:59 AM
Find all posts by this user Quote this message in a reply
Muz89 Offline
Junior Member
**
Posts: 2
Joined: Feb 2012
Post: #4
RE: Format Username in private.php ?
Tq its work great... Smile
02-28-2012 03:46 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: