Jump to content
MakeWebGames

lucky3809

Members
  • Posts

    1,115
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by lucky3809

  1. 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'])).") ");

  2. D.w mate i will post a view user later for you ?

    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

  3. 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...

    commenta.png

  4. 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:

    You're unable to view this code.

    Viewing code within this forum requires registration, you can register here for free.

     

    The docrime.php stays the same.

     

    crimes.png

  5. 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
    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 ;)

  6. 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..

    You're unable to view this code.

    Viewing code within this forum requires registration, you can register here for free.

     

    try changing it too...

    You're unable to view this code.

    Viewing code within this forum requires registration, you can register here for free.

     

    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.

  7. 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

  8. what i mean is what i said....it works,but in reverse(like backwards)the ignored can still send messages to the one ignoring them,and the one who ignored them can't send to the ignored

     

    You're unable to view this code.

    Viewing code within this forum requires registration, you can register here for free.

     

    That should fix the backward part.

  9. 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!

×
×
  • Create New...