lucky3809
Members-
Posts
1,115 -
Joined
-
Last visited
-
Days Won
3
Content Type
Profiles
Forums
Events
Everything posted by lucky3809
-
Thank you guys about the security help =)
-
I tried that, didnt work, I was able to click the page 1, but it said there was no comments posted, which should have showed the comments that was there. This is what the error is Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/xxxxx/public_html/viewuser.php on line 366 This is line 366: $rows = mysql_query("SELECT `ID` FROM `cComments` WHERE (`RecieverID` = ".abs(intval($_GET['u'])).") ");
-
I got a viewuser backup. Ive added a comment mod to it below the sig, and trying to get pagination count on there so players can scroll through all comments instead of just seeing so many. Forgot to mention Ive tried $r['userid'] instead of the $ir and get an error. I know $r is what im needing but it just wont take it, it gives an error in row
-
I'am coding a new Comment mod, I got it done, however Im trying to add pagination to it, on the viewuser.php and I can't seem to get it to work, what may I be doing wrong? Here is what I got: $limit = 5; $page = abs(@intval($_GET['page'])); $page = isset($page) ? abs(@intval($_GET['page'])):0; $by = 'cTIME'; $order = 'DESC'; $rows = mysql_query("SELECT `ID` FROM `cComments` WHERE (`RecieverID` = ".abs(intval($_GET['u'])).") "); $rows = mysql_num_rows($rows); $pages = ceil($rows/$limit); if($rows % $limit == 0) { $pages; } $pg = 'Pages: '; echo ' <form action="'.$_SERVER['PHP_SELF'].'" method="post"> '.$pg; for($i = 1; $i <= $pages; $i++) { $next = ($i * $limit) - 5; echo '[url="'.$_SERVER['PHP_SELF'].'?page='.$next.'"]'.$i.'[/url]'; } Here are the query to the comment part: $CC = mysql_query("SELECT c.`ID`,c.`cTIME`,c.`SenderID`,c.`RecieverID`,c.`Comment`,u.`userid`,u.`username` FROM `cComments` c LEFT JOIN `users` u "."ON c.`SenderID` = u.`userid` WHERE (`RecieverID` = ".abs(intval($_GET['u'])).") LIMIT ".$page.",".$limit." "); If I add this to the end of the page part RecieverID = {$ir['userid']} ....instead of ....WHERE (`RecieverID` = ".abs(intval($_GET['u'])).") ");... It works, only problem it shows EVERYONES comments I only want it to show that particular user comments, I got the page code from my mail, couldnt get the userlist one to work either. If someone can please help me lol. It's pissing me off I think I may have something wrong with the page count part. Example this is on my viewuser page... trying to add pages I dont want my comments to be limited to show just 5, I want players to scroll through them by clicking pages...
-
Nicely done!! =)
-
the one you posted before was only missing a } at the end of it before ?>
-
Yes, I got the idea from rougevampires, I like the converting aka crime process on that game it's pretty complex and easy for the players :)
-
Thanks Richard =)
-
It's basically a drop down something simple.
-
Ok this is my first mod for being a beginner, bare with me as for it took me time to get it right eh. lol. What I have done is redone the crime page as similar to the ones on a couple games that i play on, I havent seen it on this forum before, so thought I would share this mod with others for free ;) Replace criminal.php with this: <?php include(DIRNAME(__FILE__) . '/globals.php'); if($ir['jail'] > 0) { echo '<h2>Error</h2> This page cannot be accessed while in jail. <hr width="400"> <a href="jail.php">Return to Jail</a>'; $h->endpage(); exit; } if($ir['hospital'] > 0) { echo'<h2>Error</h2> You cannot access this page while in the hospital. <a href="hospital.php">Return to Hospital</a><hr width="400">'; $h->endpage(); exit; } echo '<h2> Crimes </h2> Start with courage 1 and work yourself up the courage bar levels.'; $q=$db->query("SELECT * FROM crimes ORDER BY crimeBRAVE ASC"); echo ' <form action="docrime.php" method="get2"> <select name="c">'; while($r=$db->fetch_row($q)) { echo '<option value="'.$r['crimeID'].'">'.$r['crimeBRAVE'].' Courage - '.$r['crimeNAME'].'</option>'; } echo ' </select> <input type="hidden" name="crime" value="true"> <input type="submit" value="Do" /> </form>'; $h->endpage(); ?> The docrime.php stays the same.
-
Might want to try ...
-
Yes that is what i mean.
-
I looked everywhere and cant seem to find anything in the forum and tried w3schools with no help there either. How would I go about getting a quote inside another quote for an example... Example... I think its called quote in another quote tag, I've been trying to read up on it for over a week and cant seem to find anything, and wish to use that code in my forum that im coding, if anyone can either help or direct me to a website I would greatly appreciate it ;)
-
mccode-v2 Advanced Attack and Inventory Mod--One Click.
lucky3809 replied to Joshua's topic in Free Modifications
Looks to me bladewolf you didnt either add the correct SQLS or something in your staffitem page is wrong in the queries. -
mccode-v2 Advanced Attack and Inventory Mod--One Click.
lucky3809 replied to Joshua's topic in Free Modifications
bladewolf- Dont know if this may be your problem but in the staff_item.php There is 2 I believe queries, that look like this.. $m=$db->query("INSERT INTO items VALUES('',{$_POST['itmtype']},'$itmname','$itmdesc',{$_POST['itmbuyprice']},{$_POST['itmsellprice']},$itmbuy, '{$_POST['effect1on']}', '$efx1', '{$_POST['effect2on']}', '$efx2', '{$_POST['effect3on']}', '$efx3', $weapon, $boots, $helmet, $amulet, $braclet, $ring)"); try changing it too... $m=$db->query("INSERT INTO items VALUES('',{$_POST['itmtype']},'$itmname','$itmdesc',{$_POST['itmbuyprice']},{$_POST['itmsellprice']},$itmbuy, '{$_POST['effect1on']}', '$efx1', '{$_POST['effect2on']}', '$efx2', '{$_POST['effect3on']}', '$efx3', '$weapon', '$boots', '$helmet', '$amulet', '$braclet', '$ring')"); I had the same problem while using the amulet,braclet,ring mod, and it was because in the query it was $boots and so on , when it should been '$boots' which is why your getting the error. -
Maybe your missing a simple code as in.... if($ir['new_mail'] > 0) { $db->query("UPDATE mail SET mail_read=1 WHERE mail_to=$userid"); $db->query("UPDATE users SET new_mail=0 WHERE userid=$userid"); .... Goes in your mailbox.php
-
$select = sprintf(("SELECT `userid` FROM `ignore` WHERE blocked = %u AND userid = %u"), $userid, $_GET['ID']); $q = $db->query($select); $r=$db->fetch_row($q); if($r['userid']) { echo "This person has choosen to ignore mails from you. [url='mailbox.php']> Back[/url]"; $h->endpage(); exit; } That should fix the backward part.
-
The mod works but i have one slight problem, users can add same user to the ignore list over and over, causing the ignore user to appear more then once on the list. Is there a fix for this?
-
I like your tips redex... Also may I add never "RESET" your game and the players achievements, you can lose hundreds of players doing so lol. know of a game who resets twice a year, they use to have over 150 active daily players now its down to 5 every half hour, a big decrease lol. Also be unique and dont copy other games, major plus to have your own originality!