
Smokey
Members-
Posts
137 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by Smokey
-
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
-
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"?
-
This is what I use: $user_name=""; if($r['user_level'] == 2) { $user_name = ( $r['donatordays'] > 0 )?'<font color=firebrick><b>'.$r['username'].'</font> ['.$r['userid'].'] <img src="donator.gif" alt="Donator: '.$r['donatordays'].' Days Left" title="Donator: '.$r['donatordays'].' Days Left" />':''.$r['username'].' ['.$r['userid'].']'; } if($r['user_level'] == 3) { $user_name = ( $r['donatordays'] > 0 )?'<font color=darkgreen><b>'.$r['username'].'</font> ['.$r['userid'].'] <img src="donator.gif" alt="Donator: '.$r['donatordays'].' Days Left" title="Donator: '.$r['donatordays'].' Days Left" />':''.$r['username'].' ['.$r['userid'].']'; } if($r['user_level'] == 4) { $user_name = ( $r['donatordays'] > 0 )?'<font color=slategray><b>'.$r['username'].'</font> ['.$r['userid'].'] <img src="donator.gif" alt="Donator: '.$r['donatordays'].' Days Left" title="Donator: '.$r['donatordays'].' Days Left" />':''.$r['username'].' ['.$r['userid'].']'; } if($r['user_level'] == 5) { $user_name = ( $r['donatordays'] > 0 )?'<font color=purple><b>'.$r['username'].'</font> ['.$r['userid'].'] <img src="donator.gif" alt="Donator: '.$r['donatordays'].' Days Left" title="Donator: '.$r['donatordays'].' Days Left" />':''.$r['username'].' ['.$r['userid'].']'; } if($r['user_level'] == 0) { $user_name = ( $r['donatordays'] > 0 )?'<font color=darkgoldenrod><b>'.$r['username'].'</font> ['.$r['userid'].'] <img src="donator.gif" alt="Donator: '.$r['donatordays'].' Days Left" title="Donator: '.$r['donatordays'].' Days Left" />':'<font color=darkgoldenrod><b>'.$r['username'].'</font> ['.$r['userid'].']'; } if($r['user_level'] == 1 && $r['gender'] == Male) { $user_name = ( $r['donatordays'] > 0 )?'<font color=blue><b>'.$r['username'].'</font> ['.$r['userid'].'] <img src="donator.gif" alt="Donator: '.$r['donatordays'].' Days Left" title="Donator: '.$r['donatordays'].' Days Left" />':''.$r['username'].' ['.$r['userid'].']'; } if($r['user_level'] == 1 && $r['gender'] == Female) { $user_name = ( $r['donatordays'] > 0 )?'<font color=#EE00EE><b>'.$r['username'].'</font> ['.$r['userid'].'] <img src="donator.gif" alt="Donator: '.$r['donatordays'].' Days Left" title="Donator: '.$r['donatordays'].' Days Left" />':''.$r['username'].' ['.$r['userid'].']'; } 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.
-
I have a similar problem, but with mine, sometimes it works, sometimes it doesnt. I dont understand that but it really only works about a third of the time, and also using v 2.0.3, but I plan to get a new referral system when I find a decent one so I'm not to worried about it.
-
Awesome mod, and awesome support, thank you Dave :)
-
added to msn
-
I installed this and I am getting a couple of errors concerning the gateway, I clicked contact and your contact page is not there. I installed the paypal via the button at the bottom of the gateway tab. Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(gateway/jquery-ui-1.8.10.custom.min.js/info.xml) is not within the allowed path(s): (/home/******:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp) in /home/*****/public_html/gateway/donation_functions.php on line 86 Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(gateway/donation_functions.php/info.xml) is not within the allowed path(s): (/home/******:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp) in /home/*****/public_html/gateway/donation_functions.php on line 86 i installed everything exactly like the file said, and double checked that all files were in the right place, 2 files in public_html plus the gateway folder, 2 files in the gateway folder along with the paypal folder, 7 files in the paypal folder.
-
Would the css bit have anything to do with it? i would think that would just be visual but I'm sure I have it in the wrong place as I can see it in the very top left corner of my site
-
I figured it out, it was a problem with my auto-quantifier in items. But thanks. ;)
-
For some strange reason, the last 2 users that signed up cannot use or equip anything at all (ID's 151 and 152), it says invalid item ID, but everyone under ID 150 can use items just fine, I don't know if the ID has anything to do with it, just so happened after 150 users. Ayn ideas? Oh and it does show their items in the database along with everyone else, they just cant use them.
-
Sorry I didnt see that promo code, just purchased it and I cant wait to get it downloaded and install! it looks awesome Dave and looks very well put together.
-
I would like to purchase this mod while its on sale, but your site still has it for $30.
-
That almost works, lol, for some reason when you click to view a mail, the page just refreshes, it doesn't open the mail. If you arent on the first page it just refreshes and goes back to the first page. I've edited my mailbox quite a bit, so I adapted it in. And since it wouldn't open the mails I went back to my stock mailbox.php file, and then added it, got the same thing, the mail wont open, it just refreshes the page. Delete also doesnt work, does the same thing, I'm going to work on it some more tomorrow and see if i can combine my mailbox and this one, so that I will have pages but not have to open the mail OR find out why it wont view or delete. I'm guessing it has something to do with this section: echo"<td><p style=\"margin: 0 0 0 0;\">".$sent=date('F j, Y, g:i:s a',$r['mail_time'])."</p></td> <td><p style=\"margin: 0 0 0 0;\"><a href='mailbox.php?action=read&ID={$r['mail_id']}'>View</a></p></td> <td><p style=\"margin: 0 0 0 0;\"><a href='mailbox.php?action=delete&ID={$r['mail_id']}'> Delete </a><form name='masssell' method=post action=mailbox.php?action=del><input type='checkbox' name='del$i' value='yes'> <input type='hidden' name='id$i' value='{$r['mail_id']}'></td>"; Or possibly the printed section below it.
-
I tried that but couldnt get it to work correctly, the 3 pagination functions, the reason being is because I don't know how to get the correct info from the database to build the pages, and for the pagination functions you need to have that done, which is what I am asking for help with lol.
-
Thats what I'm trying to do, this excerpt was taken from the userlist and altered. $cnt=mysql_query("SELECT userid FROM users",$c"); thats the query from the userlist, i took the ,$c out as its not needed. I tired: $mcnt=mysql_query("SELECT mail_text FROM mails); $mcnt=mysql_query("SELECT mail_id FROM mails"); $mcnt=mysql_query("SELECT * FROM mails"); and none worked. More importantly I cannot figure out how to flip pages, <a href='mailbox.php?st='>$i</a>"; This is wrong and I have no idea how to make it work so it will flip to another page
-
Ok, so I'm trying to add pages to mails and events (well mails to start with) and I am having some troubles with the database queries. This is what I have so far: $mcnt=mysql_query("SELECT * FROM mails"); $mails=mysql_num_rows($mcnt); $pages=(int) ($mails/25)+1; if($mails % 100 == 0) { $pages--; } echo "<center>Pages: "; for($i=1;$i <= $pages;$i++) { $stl=($i-1)*25; echo "<a href='mailbox.php?st='>$i</a>"; } Of course I know the top query and the mailbox echo are incorrect and I'm pretty sure something else is missing, but I'm not sure what they should be, if someone could help it would be much appreciated, I'm hitting a wall with this.
-
Works great except one thing, the won/lost column should show you whether or not you won or lost no matter who the attacker is, but instead it shows whether or not the person attacking won or lost. So if i attack someone and lose, it'll say lost, great, but if someone else attacks me and wins, it says won, and should say lost because i lost.
-
should be yea, an "adjust user level" link close to the bottom of the staff panel, if not you can do it via phpmyadmin, just go to your database, find "users" and then find their name, click the pencil next to their name (assuming you are using cpanel) and change their "user_level" field to 2.
-
illegalife, I have sent you a 3rd e-mail 2 days ago concerning having a layout made...it may be in your junk. if you cannot find it my email is [email protected]
-
Yea..thats kinda why I asked which file it would be in, because it isnt in global_func...does no one know which file its in for v2.0.3?
-
Just because I'm new to php doesn't mean I'm an idiot :P, as I said thats what I assumed and was the first place I looked. And there is no number_format function there. Here is a list of every single function in global_func and as you see there is no number_format function, unless one of these doubles as the number formatter, and my global_func is default, I have not added any functions to it since I bought the codes last week. function DateTime_Parse function money_formatter function itemtype_dropdown function item_dropdown function item2_dropdown function location_dropdown function shop_dropdown function user_dropdown function challengebot_dropdown function fed_user_dropdown function mailb_user_dropdown function job_dropdown function jobrank_dropdown function house_dropdown function house2_dropdown function course_dropdown function crime_dropdown function crimegroup_dropdown function event_add function mysql_escape function check_level function get_rank function item_add function item_remove function forum_dropdown function forum2_dropdown function make_bigint function stafflog_add
-
ok noob question but where is that located as I cannot find it? I am currently using v2.0.3. I am new to php coding so I'm not extremely familiar, I have checked global_func and globals but I do not see it.
-
If you had read my post I am already using number_format, and that is rounding it off, which is what I am trying to change, I do NOT want it rounded, I want the decimal to show. And please excuse the double post, this was only because I edited the post above several times and the "double" post was to show my final findings, I don't normally double post. I posted in the Support section because I have already checked php.net and did not find the information I am seeking.
-
It seems removing this from index.php allows the .0000 to show on the homepage, but it stays all zero's and does not pull this from the database, so I'm guessing I need to change "number_format" but to what I do not know, "decimal_format" surely does not work lol. $ir['strength']=number_format($ir['strength']); $ir['agility']=number_format($ir['agility']); $ir['guard']=number_format($ir['guard']); $ir['labour']=number_format($ir['labour']); $ir['IQ']=number_format($ir['IQ']); $ts=number_format($ts);
-
If you mean in the userstats table, yes it shows. For instance: Strength Agility Guard Labour 4099.5098 1136.0560 915.0077 1984.4896 This is an example of a users stats in the userstats table. I'm guessing its something in the index.php that is rounding off the numbers but I cannot find it, this is the only reference i see close. $ir['strength']=number_format($ir['strength']); Also in the gym, when you train it gives the decimal values, but only on the outcome message, before you train if you look at your current stats while in the gym it shows XXXX.0000 So it does show the decimal values but its been rounded off. Correction, the gym does in fact show the correct decimal values, i was looking at my own stats which i do not train so it was .0000 by default, but after training it did show the decimal values, so I'm going to have a look at the gym.php and see if i can see why it is working correctly there but not on the index.php