Jump to content
MakeWebGames

SMOKEY_TEK

Members
  • Posts

    126
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by SMOKEY_TEK

  1. Thanks for getting it to work Mate.. Your the greatest... :thumbsup: :thumbup: Good Job! Glad there's people out there like you in the world... God bless ya! :P
  2. Would you be able to secure it for me?
  3. Ok, Finally I got it to where you can get the code, Thanks Crim... My file is on that link http://pastebin.com/mac57033   Sorry for making you mad...
  4. Here is the file... Just download it from the link below: http://www.2shared.com/file/10367101/7f9667fd/viewuser.html   Thanks if you can help!
  5. I made this viewuser.php but I get a stupid error and I can not figure out why or where it would be making it not work... If someone could please look over my coding, and fix the file to where the error is gone, I would most appreciate it so much.   Sorry how the code looks, I couldn't get the code to look like I just copies and pasted it... Don't know why it goes to the right... This is the ERROR I get when I try to view a user's profile: Parse error: syntax error, unexpected $end in viewuser.php on line 265   $_GET['u'] = abs((int) $_GET['u']); if(!$_GET['u']){ print "Invalid use of file";}else{ $q=$db->query("SELECT u.*,us.*,c.*,h.*,g.*,f.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN cities c ON u.location=c.cityid LEFT JOIN houses h ON u.maxwill=h.hWILL LEFT JOIN gangs g ON g.gangID=u.gang LEFT JOIN fedjail f ON f.fed_userid=u.userid WHERE u.userid={$_GET['u']}"); if($db->num_rows($q) == 0) { print "Sorry, we could not find a user with that ID, check your source."; } else { $r=$db->fetch_row($q); if($r['user_level'] == 1) { $userl="Mobster"; } else if($r['userid'] == 1) { $userl="Owner"; } else if($r['userid'] == 3) { $userl="Owner"; } else if($r['user_level'] == 2) { $userl="Admin"; } else if($r['user_level'] == 0) { $userl="NPC"; } else {$userl="Moderator"; }if($r['fedjail']) { $ustat="Federal Jail"; } else if($r['hospital']) { $ustat="Hospital"; } else if($r['jail']) { $ustat="Jail"; } else {$ustat="-"; } $lon=($r['laston'] > 0) ?date('F j',$r['laston']) : "Never"; $sup=date('j F',$r['signedup']); $ts=$r['strength']+$r['agility']+$r['guard']+$r['labour']+$r['IQ']; $d=""; if($r['laston'] > 0) { $la=time()-$r['laston']; $unit="seconds"; if($la >= 60) { $la=(int) ($la/60); $unit="minutes"; } if($la >= 60) { $la=(int) ($la/60); $unit="hours"; if($la >= 24) { $la=(int) ($la/24); $unit="days"; } } $str="$la $unit ago"; } else { $str="--"; } if($r['last_login'] > 0) { $ll=time()-$r['last_login']; $unit2="seconds"; if($ll >= 60) { $ll=(int) ($ll/60); $unit2="minutes"; } if($ll >= 60) { $ll=(int) ($ll/60); $unit2="hours"; if($ll >= 24) { $ll=(int) ($ll/24); $unit2="days"; } } $str2="$ll $unit2 ago"; } else { $str2="--"; } if($r['user_level'] >1){ $r['username'] = "{$r['username']}";} elseif($r['donatordays']) { $r['username'] = "{$r['username']}";$d=""; } if($r['laston'] >= time()-15*60) { $on="Online"; } else { $on="Offline"; }print " Profile: {$r['username']} [{$r['userid']}] $d "; print " "; if($r['display_pic']){print " ";}else{print " ";} print " {$r['username']} [{$r['userid']}] $d Name: {$r['username']} Type: $userl Level: {$r['level']} Money: \${$r['money']} Age: {$r['daysold']} Days Last Active: $str HP: {$r['hp']}/{$r['maxhp']} Gang: ";if($r['gang']){print "{$r['gangNAME']}";}else{print "None Location: {$r['cityname']} House: {$r['hNAME']} Status: $ustat Online: $on Status Message: {$r['sm']} Race: {$r['race']} Gender: {$r['gender']} Warnings: "; $w=mysql_query("SELECT * FROM warnings WHERE user={$r['userid']}",$c); print " ".mysql_num_rows($w)." "; if($ir['user_level'] > 1) { print "|| Manage"; } print " Actions Message Attack Mug Spy Send Money Send Crystals Add Contact Ignore Profile {$r['profileSIG']} ";$h->endpage();?>
  6. It doesn't work quite yet... I get this error in viewcomp.php :cursing: Parse error: syntax error, unexpected $end in viewcomp.php on line 67 This mod would be a good addon... So if anyone could get this to work without any error... Please post! Regards, James
  7. Re: [mccode v2] Items Pic mod Thanks illusions, Had 1 extra that didn't need, deleted it and worked fine... Thanks
  8. Re: [mccode v2] Items Pic mod I get a QUERY ERROR: Error reads: QUERY ERROR: Column count doesn't match value count at row 1 Query was INSERT INTO items VALUES('',6,'AK-47','',30000,15000,1, '0', 'a:4:{s:4:\"stat\";s:6:\"energy\";s:3:\"dir\";s:3:\"pos\";s:8:\"inc_type\";s:6:\"figure\";s:10:\"inc_amount\";i:0;}', '0', 'a:4:{s:4:\"stat\";s:6:\"energy\";s:3:\"dir\";s:3:\"pos\";s:8:\"inc_type\";s:6:\"figure\";s:10:\"inc_amount\";i:0;}', '0', 'a:4:{s:4:\"stat\";s:6:\"energy\";s:3:\"dir\";s:3:\"pos\";s:8:\"inc_type\";s:6:\"figure\";s:10:\"inc_amount\";i:0;}', 200, 0,'AK-47.jpg') Does any one have any solutions on to why it would do this and how to fix it, please let me know a.s.a.p... Best Regards, SMOKEY_TEK
  9. Re: [V2] Chat I found a slight typo:   print "<h3>Change chat font color</h3> <form action='preferences.php?action=chatcolor2' method='post'> Avatar: <input type='text' name='color' value='{$ir['color']}' />   Should be this: print "<h3>Change chat font color</h3> <form action='preferences.php?action=chatcolor2' method='post'> Font Color: <input type='text' name='color' value='{$ir['color']}' /> Avatar is kinda confusing to people probably, so I changed it to Font Color... lol
  10. Re: New type of Crimes!! I don't see the Choose your Cop Level in the preferences... What do I do? I added that code in the preferences.php
  11. I don't know if this would be in the right place to post this topic, but I am new to this forum, So please forgive me for posting this in here... Ok, I downloaded the AJAX Web Chat from http://www.blueimp.net Im just wondering how I could code it to make it where players that are logged in on my game site and when they click on Chat and it logs them in automatically, without having to use a username and password. If their admin/moderator/etc they would get that power in the chat... Please help... I found a little about how to do it, but I am not a php programmer just yet.. Here is some info So what you want to write is a custom integration. Of course everything you mention is possible as it's been done with several systems, including that profile link. For logging users in though, rather than injecting code into the login page (not sure what code you're trying to put there) we use the function getValidLoginUserData() which is inside lib/class/CustomAJAXChat.php In the standalone version, that function doesn't do much. It calls the function getCustomUsers() which pulls them from the file. In the integration versions it asks the forums for the data it needs. The function is fairly simple, and it's best to use it to get what you need. The description of the function looks like this:   function getValidLoginUserData() { $customUsers = $this->getCustomUsers(); if($this->getRequestVar('password')) { // Check if we have a valid registered user: $userName = $this->getRequestVar('userName'); $userName = $this->convertEncoding($userName, $this->getConfig('contentEncoding'), $this->getConfig('sourceEncoding')); $password = $this->getRequestVar('password'); $password = $this->convertEncoding($password, $this->getConfig('contentEncoding'), $this->getConfig('sourceEncoding')); foreach($customUsers as $key=>$value) { if(($value['userName'] == $userName) && ($value['password'] == $password)) { $userData = array(); $userData['userID'] = $key; $userData['userName'] = $this->trimUserName($value['userName']); $userData['userRole'] = $value['userRole']; return $userData; } } return null; } else { // Guest users: return $this->getGuestUser(); } }   So all you need to do is provide it with a way to get the userName, userID, and userRole for your users. If you can provide this function with that information, chat will handle everything else. So if you already have users logged in to your forum, whatever php code you're trying to add to logged in should, instead, provide its data to this function.
  12. Re: [mccode v2] Simple Job Specials I got this error when I went to the Jobs Page: Parse error: syntax error, unexpected T_STRING in /home/smokey/public_html/job.php on line 85
  13. Re: [mccode v2] House Images Doesn't show any image.... All it shows is this on index.php   $hname = $ir['hNAME']; $hid = $ir['hID']; $src = md5($ir['hNAME']); echo ' ' , ''; ";
  14. Re: [mccodes][V2]changable currency mod   I didn't when I added the change currency script, and I was testing to see if it works, I changed my currency to GBP, and When I went to the Statistics of my game is put the pound sign in front of every number by itself...
  15. Re: [mccodes][V2]changable currency mod Ok, I Changed My Currency On My Game Im Making, And It Only Changes It On Your Index.php Page, So When Someone Views My Profile It Doesn't Show That My Currency Is GBP, It Just Shows A $... And Another Thing I Found Out Just Now, Is This, I'll Show A Pic When I Changed My Currency To GBP It Put The Pound Sign In Front Of Everything...
  16. Re: [mccodes][V2]changable currency mod Or And Another Thing, When Someone Views A User That Has Their Currency Changed It Doesn't Show Their New Currency.... Could Someone Do That For Me Please... I Would Do It But I Don't Know How To Yet...
  17. Re: [mccodes][V2]changable currency mod Hey, I Know It's Not A Big Problem... But Next Time Dayo Could You Capitalize The First Letter... I.e >>> your currency has been changed. Better Looking Like This : Your currency has been changed. But Great Mod, +2
  18. Re: [mccode V2] Index.php Sorry About The Font Shadow, I Found A Problem And Noone Had Posted It Yet So Im Gonna Post It... There Was A Thing Called Crimes: But It Would Show How Many Crimes You Have Done... Find This Is Index.php $ir['IQ']=number_format($ir['IQ']);   And Add This Code Under The Above Code: $ir['crimes']=number_format ($ir['crimes']);   And Once Again, Sorry For Using The Font Shadow.. I Didn't Know It Was Gonna Make The Text Hard To Read... And If You Can't Say Something Nice To Someone Don't Say Anything To Them. It's Not Nice. Idiot... lol
  19. Re: [mccode v2] Site lockdown Next Time, Use The Code Function Instead Of Just Pasting The Script On Here, Will Make Life A Little Bit Easier... And You Could Of Explained Where To Put The Scripts In The Header.php, And In Staff.php.... But For Trying +1
  20. Re: [mccode V2] Index.php I'm not a PHP coder Yet, but I do do scripting, and I notice that you get an error for the crystal_formatter crap... So I tried just doing this code... Replace This $cm = crystal_formatter($ir['crystals']);   With This $cm = ($ir['crystals']);   And indeed it works, not bad eh And VERY NICE mod, I like it, make's me wanna take off the side menu...
×
×
  • Create New...