Lavalair Mods...

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    yes it means not equal

    oh the original script explodes browser name try:

    PHP Code:
    $bro mysql_fetch_array(mysql_query("SELECT browserm FROM ibwf_users WHERE id='".$uid."'")); 
    $brws $_SERVER['HTTP_USER_AGENT']; 
    $brws explode(" "$brws);
    if(
    $bro[0]!=$brws[0]){ 
    echo 
    "hei 420 site sid proteced lol"
    exit; 

    Added after 32 minutes:

    Originally posted by kafa View Post
    I need some advice or help:

    how to speed up the function that displays number of topics, number of posts and the last post (nick and time) of the subforum on my web extension of lava (trying to make it phpBB like)?
    Try This I havent Tested it:
    PHP Code:
    $forums mysql_query("SELECT id, name FROM ibwf_forums WHERE cid='".$cid."' AND clubid='0' ORDER BY position, id, name");
        while(
    $forum mysql_fetch_array($forums))
        {
          if(
    canaccess(getuid_sid($sid), $forum[0]))
          {
          
    $notp mysql_fetch_array(mysql_query("SELECT COUNT(*), id, name FROM ibwf_topics WHERE fid='".$forum[0]."'"));
          
    $nops mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_topics WHERE tid='".$notp[1]."'"));
          if(
    $nops[0]==0)
          {
          
    $pinfo mysql_fetch_array(mysql_query("SELECT authorid FROM ibwf_topics WHERE id='".$notp[1]."'"));
          }else{
          
    $pinfo mysql_fetch_array(mysql_query("SELECT uid FROM ibwf_posts WHERE tid='".$notp[1]."'"));
          }
        echo 
    "<tr>
        <td valign=\"middle\" width=\"25\">&nbsp;<img src=\"images/1.gif\" alt=\"*\"/></td>
        <td align=\"left\" width=\"200\" class=\"sjena\">&nbsp;<a href=\"index.php?action=viewfrm&amp;sid=
    $sid&amp;fid=$forum[0]\">$forum[1]</a></td>
        <td width=\"50\" align=\"center\" class=\"sjena\">
    $notp[0]</td>
        <td width=\"60\" align=\"center\" class=\"sjena\">
    $nops[0]</td>
        <td align=\"right\" class=\"style12\">
        <a href=\"index.php?action=viewtpc&amp;sid=
    $sid&amp;tid=$lpt[1]&amp;go=last\">".htmlspecialchars($notp[2])."</a> &nbsp;<br/>
        od: <a href=\"index.php?action=viewuser&amp;sid=
    $sid&amp;who=$pinfo[0]\">".getnick_uid($pinfo[0])."</a> &nbsp;</td>
        </tr><tr><td colspan=\"5\"><hr></td></tr>"
    ;
        }
        } 
    Last edited by something else; 22.08.10, 17:44.

    Comment


      Originally posted by something else View Post
      Try This I havent Tested it:
      PHP Code:
            $notp mysql_fetch_array(mysql_query("SELECT COUNT(*), id, name FROM ibwf_topics WHERE fid='".$forum[0]."'"));
            
      $nops mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_topics WHERE tid='".$notp[1]."'")); 
      It does'nt work cus of this part: SELECT COUNT(*), id, name FROM ibwf_topics returns => mysql_fetch_array(): supplied argument is not a valid MySQL result resource

      Comment


        COUNT(*), id, name <-- Wrong!
        COUNT('id','name') <-- Right
        Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
        Visit: WapMasterz Coming Back Soon!
        _______
        SCRIPTS FOR SALE BY SUBZERO
        Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
        FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
        _______
        Info & Tips
        php.net
        w3schools.com

        Comment


          oops:
          PHP Code:
          $forums mysql_query("SELECT id, name FROM ibwf_forums WHERE cid='".$cid."' AND clubid='0' ORDER BY position, id, name"); 
              while(
          $forum mysql_fetch_array($forums)) 
              { 
                if(
          canaccess(getuid_sid($sid), $forum[0])) 
                { 
                
          $notp mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_topics WHERE fid='".$forum[0]."'")); 
                
          $tpi mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_topics WHERE fid='".$forum[0]."'")); 
                
          $nops mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_topics WHERE tid='".$tpi0]."'")); 
                if(
          $nops[0]==0
                { 
                
          $pinfo mysql_fetch_array(mysql_query("SELECT authorid FROM ibwf_topics WHERE id='".$tpi[0]."'")); 
                }else{ 
                
          $pinfo mysql_fetch_array(mysql_query("SELECT uid FROM ibwf_posts WHERE tid='".$tpi[0]."'")); 
                } 
              echo 
          "<tr> 
              <td valign=\"middle\" width=\"25\">&nbsp;<img src=\"images/1.gif\" alt=\"*\"/></td> 
              <td align=\"left\" width=\"200\" class=\"sjena\">&nbsp;<a href=\"index.php?action=viewfrm&amp;sid=
          $sid&amp;fid=$forum[0]\">$forum[1]</a></td> 
              <td width=\"50\" align=\"center\" class=\"sjena\">
          $notp[0]</td> 
              <td width=\"60\" align=\"center\" class=\"sjena\">
          $nops[0]</td> 
              <td align=\"right\" class=\"style12\"> 
              <a href=\"index.php?action=viewtpc&amp;sid=
          $sid&amp;tid=$lpt[1]&amp;go=last\">".htmlspecialchars($tpi[1])."</a> &nbsp;<br/> 
              od: <a href=\"index.php?action=viewuser&amp;sid=
          $sid&amp;who=$pinfo[0]\">".getnick_uid($pinfo[0])."</a> &nbsp;</td> 

          Comment


            Comment


              works perfect tested aswell:
              Originally posted by something else View Post
              Total online time and hourly reward of 50 plusses
              PHP Code:
              //////////////////////////////////////////////////////////////////// addonline 

              function addonline($uid,$place,$plclink){ 
              $tm time(); 
              $timeout $tm 300//time out = 5 minutes 
              mysql_query("DELETE FROM ibwf_online WHERE actvtime <'".$timeout."'"); 

              $lttime mysql_fetch_array(mysql_query("SELECT lastact, plustime FROM ibwf_users WHERE id='".$uid."'")); 

              $limit $tm $lttime[0]; 
              if(
              $limit<60){  //limit to 60 seconds away 
              $newtime $lttime[1] + $limit
              if(
              $newtime>3600){ //1 hour 
              mysql_query("UPDATE ibwf_users SET plustime='0', totaltime=toaltime+$newtime, plusses=plusses+50 WHERE id='".$uid."'"); 

              $msg "Congratulation! You are Have Been Online For 1 Hour. You Have Recieved 50 plusses [br/][small]Note: This is an automated PM[/small]";  
                                      
              autopm($msg$uid); 
              }else{ 
              mysql_query("UPDATE ibwf_users SET  totaltime=toaltime+$newtime, plustime='".$newtime."' WHERE id='".$uid."'"); 





              mysql_query("UPDATE ibwf_users SET lastact='".$tm."' WHERE id='".$uid."'");  
              $res mysql_query("INSERT INTO ibwf_online SET userid='".$uid."', actvtime='".$tm."', place='".$place."', placedet='".$plclink."'"); 

              if(!
              $res){ 
              $res mysql_query("UPDATE ibwf_online SET actvtime='".$tm."', place='".$place."', placedet='".$plclink."', hide='".$hide."' WHERE userid='".$uid."'"); 


              $maxmem mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE id='2'")); 
              $result mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_online")); 
              if(
              $result[0]>=$maxmem[0]){ 

              mysql_query("UPDATE ibwf_settings set name='".date("D d M Y - H:i")."', value='".$result[0]."' WHERE id='2'"); 


              $maxtoday mysql_fetch_array(mysql_query("SELECT ppl FROM ibwf_mpot WHERE ddt='".date("d m y")."'")); 
              if(
              $maxtoday[0]==0||$maxtoday==""){ 
              mysql_query("INSERT INTO ibwf_mpot SET ddt='".date("d m y")."', ppl='1', dtm='".date("H:i:s")."'"); 
              $maxtoday[0]=1


              if(
              $result[0]>=$maxtoday[0]){ 
              mysql_query("UPDATE ibwf_mpot SET ppl='".$result[0]."', dtm='".date("H:i:s")."' WHERE ddt='".date("d m y")."'"); 



              PHP Code:
              ALTER TABLE `ibwf_usersADD `totaltimeINT(100NOT NULL DEFAULT '0';
              ALTER TABLE `ibwf_usersADD `plustimeINTNOT NULL DEFAULT '0'
              Added after 2 minutes:

              to call:
              PHP Code:
              $ttime mysql_fetch_array(mysql_query("SELECT totaltime FROM ibwf_users WHERE id='".$uid."'"));
              echo 
              "Total Online Time: $ttime[0]"

              Comment


                PHP Code:
                //////////////////////////////////////////////////////////////////// addonline  

                function addonline($uid,$place,$plclink){  
                $tm time();  
                $timeout $tm 300//time out = 5 minutes  
                mysql_query("DELETE FROM ibwf_online WHERE actvtime <'".$timeout."'");  

                $lttime mysql_fetch_array(mysql_query("SELECT lastact, plustime FROM ibwf_users WHERE id='".$uid."'"));  

                $limit $tm $lttime[0];  
                if(
                $limit<60){  //limit to 60 seconds away  
                $newtime $lttime[1] + $limit;  
                if(
                $newtime>3600){ //1 hour  
                mysql_query("UPDATE ibwf_users SET plustime='0', totaltime=toaltime+$newtime, plusses=plusses+50 WHERE id='".$uid."'");  

                $msg "Congratulation! You are Have Been Online For 1 Hour. You Have Recieved 50 plusses [br/][small]Note: This is an automated PM[/small]";   
                                        
                autopm($msg$uid);  
                }else{  
                mysql_query("UPDATE ibwf_users SET  totaltime=toaltime+$newtime, plustime='".$newtime."' WHERE id='".$uid."'");  
                }  
                }  



                mysql_query("UPDATE ibwf_users SET lastact='".$tm."' WHERE id='".$uid."'");   
                $res mysql_query("INSERT INTO ibwf_online SET userid='".$uid."', actvtime='".$tm."', place='".$place."', placedet='".$plclink."'");  

                if(!
                $res){  
                $res mysql_query("UPDATE ibwf_online SET actvtime='".$tm."', place='".$place."', placedet='".$plclink."', hide='".$hide."' WHERE userid='".$uid."'");  
                }  

                $maxmem mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE id='2'"));  
                $result mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_online"));  
                if(
                $result[0]>=$maxmem[0]){  

                mysql_query("UPDATE ibwf_settings set name='".date("D d M Y - H:i")."', value='".$result[0]."' WHERE id='2'");  
                }  

                $maxtoday mysql_fetch_array(mysql_query("SELECT ppl FROM ibwf_mpot WHERE ddt='".date("d m y")."'"));  
                if(
                $maxtoday[0]==0||$maxtoday==""){  
                mysql_query("INSERT INTO ibwf_mpot SET ddt='".date("d m y")."', ppl='1', dtm='".date("H:i:s")."'");  
                $maxtoday[0]=1;  
                }  

                if(
                $result[0]>=$maxtoday[0]){  
                mysql_query("UPDATE ibwf_mpot SET ppl='".$result[0]."', dtm='".date("H:i:s")."' WHERE ddt='".date("d m y")."'");  
                }  


                Where do I have to add this as I've tried adding it to core.php but it wont work.

                Comment


                  ok, well if you added it but didn't overwrite the previous version of function, i'm guessing if your errors on, it says:

                  cannot redeclare addonline (already declared in core.php on line ***...)

                  go to that line n check if it's the modified one, if so remove the double copy of function that isn't the one you modified...
                  C3 Themes: http://c3themes.wen.ru/index.html
                  Find Files: http://mystarter.tk/?goto=X-search

                  Comment


                    Originally posted by pmbguy View Post
                    ok, well if you added it but didn't overwrite the previous version of function, i'm guessing if your errors on, it says:

                    cannot redeclare addonline (already declared in core.php on line ***...)

                    go to that line n check if it's the modified one, if so remove the double copy of function that isn't the one you modified...
                    No not getting any error message, the "time online" is just showing up as 0

                    Comment


                      have you altered the sql?
                      PHP Code:
                      ALTER TABLE `ibwf_usersADD `totaltimeINT(100NOT NULL DEFAULT '0'
                      ALTER TABLE `ibwf_usersADD `plustimeINTNOT NULL DEFAULT '0'

                      Comment


                        Originally posted by something else View Post
                        have you altered the sql?
                        PHP Code:
                        ALTER TABLE `ibwf_usersADD `totaltimeINT(100NOT NULL DEFAULT '0'
                        ALTER TABLE `ibwf_usersADD `plustimeINTNOT NULL DEFAULT '0'
                        yeah i copied everything you posted a few messages up.

                        Yet it still shows up as "Total Online Time: 0".

                        Originally posted by something else View Post
                        have you altered the sql?
                        PHP Code:
                        ALTER TABLE `ibwf_usersADD `totaltimeINT(100NOT NULL DEFAULT '0'
                        ALTER TABLE `ibwf_usersADD `plustimeINTNOT NULL DEFAULT '0'
                        yeah i copied everything you posted a few messages up.

                        Yet it still shows up as "Total Online Time: 0".

                        Comment


                          oops there is a typo:
                          mysql_query("UPDATE ibwf_users SET plustime='0', totaltime=toaltime+$newtime, plusses=plusses+50 WHERE id='".$uid."'");
                          toaltime should be totaltime

                          Comment


                            Originally posted by something else View Post
                            oops there is a typo:
                            mysql_query("UPDATE ibwf_users SET plustime='0', totaltime=toaltime+$newtime, plusses=plusses+50 WHERE id='".$uid."'");
                            toaltime should be totaltime
                            PHP Code:
                            function addonline($uid,$place,$plclink)
                            {  
                            $tm time();  
                            $timeout $tm 300//time out = 5 minutes  
                            mysql_query("DELETE FROM ibwf_online WHERE actvtime <'".$timeout."'");  

                            $lttime mysql_fetch_array(mysql_query("SELECT lastact, plustime FROM ibwf_users WHERE id='".$uid."'"));  

                            $limit $tm $lttime[0];  
                            if(
                            $limit<60){  //limit to 60 seconds away  
                            $newtime $lttime[1] + $limit;  
                            if(
                            $newtime>3600){ //1 hour  
                            mysql_query("UPDATE ibwf_users SET plustime='0', totaltime=totaltime+$newtime, plusses=plusses+50 WHERE id='".$uid."'");

                            $msg "Congratulation! You are Have Been Online For 1 Hour. You Have Recieved 50 plusses [br/][small]Note: This is an automated PM[/small]";   
                                                    
                            autopm($msg$uid);  
                            }else{  
                            mysql_query("UPDATE ibwf_users SET  totaltime=totaltime+$newtime, plustime='".$newtime."' WHERE id='".$uid."'");  
                            }  
                            }  



                            mysql_query("UPDATE ibwf_users SET lastact='".$tm."' WHERE id='".$uid."'");   
                            $res mysql_query("INSERT INTO ibwf_online SET userid='".$uid."', actvtime='".$tm."', place='".$place."', placedet='".$plclink."'");  

                            if(!
                            $res){  
                            $res mysql_query("UPDATE ibwf_online SET actvtime='".$tm."', place='".$place."', placedet='".$plclink."', hide='".$hide."' WHERE userid='".$uid."'");  
                            }  

                            $maxmem mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE id='2'"));  
                            $result mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_online"));  
                            if(
                            $result[0]>=$maxmem[0]){  

                            mysql_query("UPDATE ibwf_settings set name='".date("D d M Y - H:i")."', value='".$result[0]."' WHERE id='2'");  
                            }  

                            $maxtoday mysql_fetch_array(mysql_query("SELECT ppl FROM ibwf_mpot WHERE ddt='".date("d m y")."'"));  
                            if(
                            $maxtoday[0]==0||$maxtoday==""){  
                            mysql_query("INSERT INTO ibwf_mpot SET ddt='".date("d m y")."', ppl='1', dtm='".date("H:i:s")."'");  
                            $maxtoday[0]=1;  
                            }  

                            if(
                            $result[0]>=$maxtoday[0]){  
                            mysql_query("UPDATE ibwf_mpot SET ppl='".$result[0]."', dtm='".date("H:i:s")."' WHERE ddt='".date("d m y")."'");  


                            Thats what I have in the core.php & its giving me a blank page, counted the {} & () and there seems to be 2 more ) than ( is this right ?

                            Comment


                              How to create THANKS script on post forum.. Any 1 know? Help plz..

                              Comment


                                yeah... it's not that hard...

                                create new table called thanks or whatever...

                                must have 3 fields, or well up to as many as you want depending how much info you plan to log...

                                1. id
                                2. postid
                                3. thankzfrm
                                4. timethanked (optional)
                                5. thankzfrmip (really bored, lol)

                                ok, then by each post you make it get count from thanks where post id = $postid...

                                in genproc, code a thanks action that inserts into thanks, postid= $postid, thankzfrm = $uid kinda thing...

                                if you going the whole way n adding a list of thankers too, you can add the timethanked bit so you got something to order it by when getting list...

                                hope this helps...

                                I would post the code up, but not coded it yet, lol...
                                C3 Themes: http://c3themes.wen.ru/index.html
                                Find Files: http://mystarter.tk/?goto=X-search

                                Comment

                                Working...
                                X