Xeriak
07-12-2002, 04:46 PM
Ok, I don't think this is an already existing hack in the database, I didn't find it anyway, but this bit of code was written by someone at gaminguru.com (so please don't close my topic). The idea was based off of the Snowball.com forums.
A while back some person from gaminguru.com posted some code/hack so that you could manually input color style entries in the /admin/functions.php file by specifying the userid, and a rewrite rule to do with $post[username] = $post[specialusername] in the postbit template and functions.php
This modification is on a per user basis and has to be done manually in functions.php everytime You want to add nickname colors for a member. Offcourse this code only displays the colors for the persons name inside a topic in the "Author" column of the postbit template. I have an example of that here
http://www.xyberoptic.com/images/nickname-color.jpg
Also heres the code for the hack which gets input into functions.php
$post[specialusername] = $post[username];
$userid=$post[userid];
if ($userid == 1) { $post[specialusername] = "<span style=\"color: #FF525B;
background-color: #000000; font-weight: bold;font-style: normal;text-decoration: none;border-top: 1px solid #000000;
border-bottom: 1px solid #000000;border-right: 1px solid #000000;border-left: 1px solid #000000\">
$post[username]</span>"; }
Note that the code gets put into the ###Start Build post### section of /admin/functions.php
And you need to replace $post[username] with $post[specialuername] in the postbit template for your vB.
Now I'm kinda stumped and don't know how I would be able to implement the same code strategy so that the custom user name colors would also be displayed under the Forums display in the thread listing area, under the "Thread Starter" column. I know it must be possible somehow, but I haven't been able to figure it out just yet. I'm not that much of an PHP expert or vB hacker. But I'm gettin there :)
So can anyone help me on that matter?? And would it also be possible to display those custom username colors under a Users profile so that the nickname in the table td cell would also be effected?? Any help would be greatly appreciated. And offcourse all the credit for the above code goes to whoever created it at gaminguru.com (I forget names, sorry).
- Xeriak
A while back some person from gaminguru.com posted some code/hack so that you could manually input color style entries in the /admin/functions.php file by specifying the userid, and a rewrite rule to do with $post[username] = $post[specialusername] in the postbit template and functions.php
This modification is on a per user basis and has to be done manually in functions.php everytime You want to add nickname colors for a member. Offcourse this code only displays the colors for the persons name inside a topic in the "Author" column of the postbit template. I have an example of that here
http://www.xyberoptic.com/images/nickname-color.jpg
Also heres the code for the hack which gets input into functions.php
$post[specialusername] = $post[username];
$userid=$post[userid];
if ($userid == 1) { $post[specialusername] = "<span style=\"color: #FF525B;
background-color: #000000; font-weight: bold;font-style: normal;text-decoration: none;border-top: 1px solid #000000;
border-bottom: 1px solid #000000;border-right: 1px solid #000000;border-left: 1px solid #000000\">
$post[username]</span>"; }
Note that the code gets put into the ###Start Build post### section of /admin/functions.php
And you need to replace $post[username] with $post[specialuername] in the postbit template for your vB.
Now I'm kinda stumped and don't know how I would be able to implement the same code strategy so that the custom user name colors would also be displayed under the Forums display in the thread listing area, under the "Thread Starter" column. I know it must be possible somehow, but I haven't been able to figure it out just yet. I'm not that much of an PHP expert or vB hacker. But I'm gettin there :)
So can anyone help me on that matter?? And would it also be possible to display those custom username colors under a Users profile so that the nickname in the table td cell would also be effected?? Any help would be greatly appreciated. And offcourse all the credit for the above code goes to whoever created it at gaminguru.com (I forget names, sorry).
- Xeriak