daanzii Posted July 27, 2011 Posted July 27, 2011 how can i change the settings so that all admin's names appear blue ive tried changing it and ive broke it a few times, any help? please? Quote
sniko Posted July 27, 2011 Posted July 27, 2011 (edited) You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Put that function in global_func.php and then replace the following throughout all the files; {$ir['username']} with ".username()." Hope that helps -sniko Edited July 27, 2011 by sniko Quote
HackerzInc Posted August 1, 2011 Posted August 1, 2011 Try this in the globals.php file, find this : $ir=$db->fetch_row($is); and under it add this: if ($ir['user_level'] == 2) { $ir['username']="<font color='blue'>{$ir['username']}</font>"; } that should change the username info in the array with the string that makes the text blue without you having to alter every file. Depending on what php version you have, the string should execute replacing the username info part before changing the string. if not, use this: if ($ir['user_level'] == 2) { $utemp="<font color='blue'>{$ir['username']}</font>"; $ir['username']=$utemp; } The code above sets a temp variable to the string, which inturn replaces the username first and adds the color code to the string. then sets the name array to that bit of code, which should work. Quote
bluegman991 Posted August 1, 2011 Posted August 1, 2011 <font> tag is depricated and in some browsers wont even show up so use You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
Djnord Posted August 14, 2011 Posted August 14, 2011 how can i change the colour from the donator ? Quote
Maniak Posted August 14, 2011 Posted August 14, 2011 (edited) For the players Username: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. For every other Username the player will see: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. I haven't tested this, as I already have a function to do all of the different "User Levels" and Donators. Edited August 14, 2011 by Maniak Quote
Smokey Posted August 26, 2011 Posted August 26, 2011 (edited) This is what I use: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Bit lengthy I know, but I'm new to coding and this is how I knew to do it, but it covers everything, donators, different color for each staff user level, NPC's, male/female. And just put $user_name where you want it to show. Of course you might need to change a couple things. Edited August 26, 2011 by Smokey Quote
Spudinski Posted August 26, 2011 Posted August 26, 2011 You're all over-complicating things here. Simply define an array with heximal colour values once, and use it. Eg. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. As for donators, it would be wise to assign them a different userlevel, which the script does. Quote
Smokey Posted August 26, 2011 Posted August 26, 2011 Assigning donators a different user level if you ask me would complicate things more, wouldnt you have to track down every single if statement for user_level 1 and add one for user_level "whatever the new one for donators is"? Quote
Spudinski Posted August 26, 2011 Posted August 26, 2011 Assigning donators a different user level if you ask me would complicate things more, wouldnt you have to track down every single if statement for user_level 1 and add one for user_level "whatever the new one for donators is"? That's a good observation, I've thought of that too when I wrote that code. It comes down to whether you want to show a donated admin as admin colour or as donator colour. I would think that they would prefer the admin colour. To modify: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Example above would only recolour users who hold no additional permissions. Quote
Smokey Posted August 26, 2011 Posted August 26, 2011 Personally I want all staff members to be colored, a different color for each user_level (including NPC's), with no bearing on donatorship, then for regular users a different color for male/female (donators only) then a single default color for all non-donators (with the exception of staff) which my code does all that, its just a lot of code but it does work well :P Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.