POG1 Posted March 11, 2008 Posted March 11, 2008 is there a way in which i can have staff members names a different colour wherever their name is? mabe sumin like this if($r['user)level']==2) { $r['user_level']="<font color='green'>{$r['user_level']}</font> and my other question is, in mailbox how can i change the compose and send functions so the user puts the id of the reciver and now the name... Quote
03laceys Posted March 11, 2008 Posted March 11, 2008 Re: 2 Questions if($r['user_level']==2) print" <font color=red>[username]</font> else } print" [username] no that is not the right code but that points you in the right direction see if you can work it out ;) open mailbox.php ctrl+f and search for function_send i think then replace the id to username in there (my mailbox is different) Quote
POG1 Posted March 11, 2008 Author Posted March 11, 2008 Re: 2 Questions if($r['user_level']==2) print" <font color=red>[username]</font> else } print" [username] no that is not the right code but that points you in the right direction see if you can work it out ;) open mailbox.php ctrl+f and search for function_send i think then replace the id to username in there (my mailbox is different) that was a lot of help Quote
03laceys Posted March 11, 2008 Posted March 11, 2008 Re: 2 Questions i feel your last post was sarcasim but i belive from what i have given you, you should be able to work it out. Quote
POG1 Posted March 11, 2008 Author Posted March 11, 2008 Re: 2 Questions with the name colour it will have to be done with all pages where it says a name and i want a more efficent way to do that. and with the mailbox 1 its not that easy Quote
03laceys Posted March 11, 2008 Posted March 11, 2008 Re: 2 Questions Mailbos i dont know as i dont use dbs's mailbox, the name one simply place the working code in header, userlist, useronline and i think thats it. Quote
POG1 Posted March 11, 2008 Author Posted March 11, 2008 Re: 2 Questions where did u get your codes from? coz i signed up to your game and they are the pages i had with my old game, even the images... Quote
Ghetto Posted March 12, 2008 Posted March 12, 2008 Re: 2 Questions Simply put in header.php if($r['user_level']=2){$r['username']="<font color='COLOR'>".$r['username']."</font>";} if($r['user_level']=3){.... and so on And mailbox.php for you to type the username in it would be: if($_POST['user1'] && $_POST['user2']) { die("Please do not select a contact AND enter a username, only do one. [url='mailbox.php']> Back[/url]"); } if(!$_POST['user1'] && !$_POST['user2']) { die("You must select a contact or enter a username. [url='mailbox.php']> Back[/url]"); } $sendto=($_POST['user1']) ? $_POST['user1'] : $_POST['user2']; $q=$db->query("SELECT userid FROM users WHERE username='{$sendto}'"); if($db->num_rows($q)==0) { die("You cannot send mail to nonexistant users. [url='mailbox.php']> Back[/url]"); } $to=$db->fetch_single($q); $db->query("INSERT INTO mail VALUES ('',0,$userid,$to,unix_timestamp(),'$subj','$msg')"); And for userid it would simply be: $to= (int) $_POST['userid']; $db->query("INSERT INTO mail VALUES ('',0,$userid,$to,unix_timestamp(),'$subj','$msg')"); Quote
03laceys Posted March 12, 2008 Posted March 12, 2008 Re: 2 Questions pog i am using the codes that me and dale have worked on. Quote
POG1 Posted March 12, 2008 Author Posted March 12, 2008 Re: 2 Questions pog i am using the codes that me and dale have worked on. haha i know you aint, i done those pages even though they are crap. u even got the user default image lol Quote
03laceys Posted March 12, 2008 Posted March 12, 2008 Re: 2 Questions pog dont take the piss mate i have done nothing to you, i have worked on the codes for ages adding alot of stuff, if you have a problem take it up in pm or even with dale like i have just done so. Quote
POG1 Posted March 12, 2008 Author Posted March 12, 2008 Re: 2 Questions ok u must of copied my old game exactly and you stole the bg image and default user image! your site looks worse than mine did though Quote
03laceys Posted March 12, 2008 Posted March 12, 2008 Re: 2 Questions Pog you just are not happy i did not give you the full answer to your questions i will not be replying again bye. 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.