Lavalair Mods...

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

    #31
    this one is when u add ur text into a box really nice its mobizonez code
    core.php
    Code:
    function boxstart($title){
    
    	echo "
    
    	<div class=\"boxed\">
    
          <div class=\"boxedTitle\">
    
            <h1 align=\"center\" class=\"boxedTitleText\"><b>$title</b>
    
    	</h1>
    
          </div>
    
          <div class=\"boxedContent\">
    
    ";
    
    }
    
    function boxend(){
    
    	echo "</div></div>";
    
    	}
    usage =
    Code:
    boxstart ("Hello To all Coding Talk Members");
    boxend ();
    replace ur xhtmlfunctions with the following

    Code:
    <?php
    define ('USER_NOT_FOUND',0);
    define ('MIME_TYPE','application/xhtml+xml');
    
    function gettheme($sid)
    { 
        $uid = getuid_sid($sid);
    	$thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id='".$uid."'"));
    	if($thid[0]==""||$thid[0]==0)$thid[0]=1;
    	$thinfo = mysql_fetch_array(mysql_query("SELECT bgc, txc, lnk, hdc, hbg, boxbg, boxcl FROM ibwf_mainthemes WHERE id='".$thid[0]."'"));
    	$ret = "<style type=\"text/css\">\n";
    	$ret .= "body {background-color:#$thinfo[0]; color:#$thinfo[1]}\n";
    	$ret .= "h5 {background-color:#$thinfo[4]; color:#$thinfo[3]}\n";
    	$ret .= "a:link {color:#$thinfo[2]}\n";
    	$ret .= "a:visited {color:#$thinfo[2]}\n";
    	$ret .= "img {border: 0;}\n";
    	$ret .= "input {border-color:#$thinfo[2];border-width:1px;color:#$thinfo[2];}\n";
    	$ret .= "input: focus{background-color:#$thinfo[2];color:#$thinfo[2];}\n";
    	$ret .= "input.BF6: focus{background-color:#$thinfo[2];color:#$thinfo[3];}\n";
    
    	$ret .= ".boxed {width: 100%; margin-bottom: 2px; border: px solid #$thinfo[1]}\n";
    	$ret .= ".boxedTitle {height: 18px; padding: 0 0 0 2px; background: #$thinfo[1] url($thinfo[6]) repeat-x;}\n";
    	$ret .= ".boxedTitleText {font-size: 11px; color: #$thinfo[2]}\n";
    	$ret .= ".boxedContent {padding: 2px 2px 2px 2px; background: #$thinfo[3]}\n";
    
    	$ret .= "</style>";
    	return $ret;
    }
    
    function geticonsetid($sid)
    { 
        $uid = getuid_sid($sid);
    	$thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id='".$uid."'"));
    	$iconsetid = mysql_fetch_array(mysql_query("SELECT iconset FROM ibwf_mainthemes WHERE id='".$thid[0]."'"));
    	return $iconsetid[0];
    }
    
    function xhtmlhead($page_title, $page_style="")
    {
    	$ret = "<html xmlns=\"http://www.w3.org/1999/xhtml\">";
    	$ret .= "\n<head>\n<title>$page_title</title>\n";
    	$ret .= "<meta http-equiv=\"content-type\" content=\"text/html; charset=iso-8859-1\" />";
    	$ret .= "<meta http-equiv=\"Cache-Control\" content=\"must-revalidate\" />";
        $ret .= "<meta http-equiv=\"Cache-Control\" content=\"no-cache\"/>";
    	$ret .= "\n".$page_style;
    	$ret .= "\n</head>\n<body>";
    	return $ret;
    }
    function xhtmlheadchat1($page_title, $page_style="",$rid,$sid)
    {
    	$ret = "<html xmlns=\"http://www.w3.org/1999/xhtml\">";
    	$ret .= "\n<head>\n<title>$page_title</title>\n";
    	$ret .= "<meta http-equiv=\"content-type\" content=\"text/html; charset=iso-8859-1\" />";
    	$ret .= "<meta http-equiv=\"Cache-Control\" content=\"must-revalidate\" />";
        $ret .= "<meta http-equiv=\"Cache-Control\" content=\"no-cache\"/>";
        $ret .= "<meta http-equiv=\"refresh\" content=\"20; URL=chat.php?sid=$sid&amp;rid=$rid\"/>";
    	$ret .= "\n".$page_style;
    	$ret .= "\n</head>\n<body>";
    	return $ret;
    }
    function xhtmlheadchat($page_title, $page_style="")
    {
    	$ret = "<html xmlns=\"http://www.w3.org/1999/xhtml\">";
    	$ret .= "\n<head>\n<title>$page_title</title>\n";
    	$ret .= "<meta http-equiv=\"content-type\" content=\"text/html; charset=iso-8859-1\" />";
    	$ret .= "<meta http-equiv=\"Cache-Control\" content=\"must-revalidate\" />";
        $ret .= "<meta http-equiv=\"Cache-Control\" content=\"no-cache\"/>";
    	$ret .= "\n".$page_style;
    	$ret .= "\n</head>\n<body>";
    	return $ret;
    }
    function xhtmlfoot()
    {	
    	$ret = "\n</body>\n</html>";
    	return $ret;
    }
    function gettheme1($thid)
    { 
    	if($thid[0]==""||$thid[0]==0)$thid[0]=1;
    	$thinfo = mysql_fetch_array(mysql_query("SELECT bgc, txc, lnk, hdc, hbg FROM ibwf_mainthemes WHERE id='".$thid[0]."'"));
    	$ret = "<style type=\"text/css\">\n";
    	$ret .= "body {background-color:#$thinfo[0]; color:#$thinfo[1]}\n";
    	$ret .= "h3 {background-color:#$thinfo[4]; color:#$thinfo[3]}\n";
    	$ret .= "a:link {color:#$thinfo[2]}\n";
    	$ret .= "a:visited {color:#$thinfo[2]}\n";
    
    	$ret .= ".boxed {width: 100%; margin-bottom: 3px; border: 1px solid #$thinfo[1]}\n";
    	$ret .= ".boxedTitle {height: 18px; padding: 0 0 0 2px; background: #$thinfo[1] url(images/box2.jpg) repeat-x;}\n";
    	$ret .= ".boxedTitleText {font-size: 11px; color: #$thinfo[2]}\n";
    	$ret .= ".boxedContent {padding: 2px 2px 2px 2px; background: #$thinfo[3]}\n";
    
    	$ret .= "</style>";
    	return $ret;
    }
    
    ?>
    ________________
    Jacques
    jacques@gw-designs.co.za
    http://coding.biz.tm
    Come join and lets make it a place to learn all the noobies how to code
    __________________

    NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

    Comment


      #32
      Originally posted by Rider View Post
      Code:
      $avlink = getavatar($item[2]);
      if ($avlink!=""){
      echo "<img src=\"$avlink\" height=\"25\" width=\"25\" alt=\"avatar\"/>
      ";
      }else{
      echo "<img src=\"images/nopic.jpg\" height=\"25\" width=\"25\" alt=\"avatar\"/>
      ";
      }
      who can help me to make a place to switch it on and off please and for the inbox and forums please
      ________________
      Jacques
      jacques@gw-designs.co.za
      http://coding.biz.tm
      Come join and lets make it a place to learn all the noobies how to code
      __________________

      NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

      Comment


        #33
        Originally posted by Dj-marc View Post
        you can use this code below
        Code:
        $noi = mysql_fetch_array(mysql_query("SELECT timesent FROM ibwf_private WHERE id='".$pmid."'")); 
         $var1 = date("his",$noi[0]); 
         $var2 = time (); 
         $var21 = date("his",$var2); 
         $var3 = $var21 - $var1; 
         $var4 = date("s",$var3); 
         echo "<b>This pm was sent </b>";
         $remain = time() - $noi[0]; 
         $idle = gettimemsg($remain); 
         echo "$idle ago<br/>";
        where do u add this code please

        Comment


          #34
          in inbox.php

          Comment


            #35
            create a php file to download a file and ad add a row in it like
            PHP Code:
            $plusses mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='$uid'");
            $plusses trim($plusses[0]);
            $new $plusses 5;
            $query mysql_query("UPDATE ibwf_users SET plusses='$new' WHERE id='$uid'"); 

            PHP Code:
            foreach ($_SERVER as $server => $value)
            {
            echo 
            "$server is $value<br />";

            Comment


              #36
              on your download file add this file.php?download= before the sql statement then make the file.php and add this in it
              PHP Code:
              $download $_GET['download'];
              $plusses mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='$uid'");
              $plusses trim($plusses[0]);
              $new $plusses 5;
              $query mysql_query("UPDATE ibwf_users SET plusses='$new' WHERE id='$uid'");  
              if (!
              $query)
              {
              echo 
              "Some error Occured please Contact an Administrator<br />";
              }
              else
              {
              echo 
              "
              <META HTTP-EQUIV=\"refresh\" CONTENT=\"5;URL=
              $download/\">";
              echo 
              "Your download Should start in 5 seconds if it doesnt click <a href=\"$download\">Here</a><br />";

              Add header and Footer as you need them

              PHP Code:
              foreach ($_SERVER as $server => $value)
              {
              echo 
              "$server is $value<br />";

              Comment


                #37
                bru that code must i add it ontop of the download.php file
                Code:
                <?php
                include("config.php");
                include("core.php");
                connectdb();
                
                $id = $_GET['id'];
                $action = $_GET["action"];
                $sid = $_GET["sid"];
                $downloads = mysql_fetch_array(mysql_query("SELECT downloads FROM ibwf_vault WHERE id='".$id."'"));
                 $incresedownload = $downloads[0] + 1;
                 mysql_query("UPDATE ibwf_vault SET downloads='".$incresedownload."' WHERE id='".$id."'");
                 $link = mysql_fetch_array(mysql_query("SELECT itemurl FROM ibwf_vault WHERE id='".$id."'"));
                 header("Location:$link[0]");
                
                ?>
                ________________
                Jacques
                jacques@gw-designs.co.za
                http://coding.biz.tm
                Come join and lets make it a place to learn all the noobies how to code
                __________________

                NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

                Comment


                  #38
                  LATEST 15 FORUM TOPIC
                  Code:
                  else if($action=="last15topic")
                  {
                  
                    addonline(getuid_sid($sid),"Viewing Last 15 Topics","index.php?action=$action");
                            $pstyle = gettheme($sid);
                        echo xhtmlhead("Viewing Last 15 Topics",$pstyle);
                      $sql = "SELECT id, name, crdate, authorid FROM ibwf_topics ORDER BY id DESC LIMIT 0 , 15";
                     echo "<p>";
                     echo "<small>";
                  $items = mysql_query($sql);
                      echo mysql_error();
                      if(mysql_num_rows($items)>0)
                      {
                      while ($item = mysql_fetch_array($items))
                      {
                        if(canaccess(getuid_sid($sid),getfid_tid($item[0])))
                        {
                    $tun = getnick_uid($item[3]);
                          echo "<a href=\"index.php?action=viewtpc&amp;tid=$item[0]&amp;go=last\">$tun:".htmlspecialchars($item[1])."</a><br/>";
                          }else{
                            echo "Private Post<br/>";
                          }
                      }
                      }
                  echo "</p>";
                    echo "<p align=\"center\">";
                    echo "<a href=\"index.php?action=main\">main menu</a>";
                    echo "</p>";
                      echo xhtmlfoot();
                  }
                  add &amp;sid=$sid from all link
                  Last edited by kabooms; 27.06.09, 12:58.

                  Comment


                    #39
                    Originally posted by kabooms View Post
                    LATEST 15 FORUM TOPIC
                    Code:
                    else if($action=="last15topic")
                    {
                    
                      addonline(getuid_sid($sid),"Viewing Last 15 Topics","index.php?action=$action");
                              $pstyle = gettheme($sid);
                          echo xhtmlhead("Viewing Last 15 Topics",$pstyle);
                        $sql = "SELECT id, name, crdate, authorid FROM ibwf_topics ORDER BY id DESC LIMIT 0 , 15";
                       echo "<p>";
                       echo "<small>";
                    $items = mysql_query($sql);
                        echo mysql_error();
                        if(mysql_num_rows($items)>0)
                        {
                        while ($item = mysql_fetch_array($items))
                        {
                          if(canaccess(getuid_sid($sid),getfid_tid($item[0])))
                          {
                      $tun = getnick_uid($item[3]);
                            echo "<a href=\"index.php?action=viewtpc&amp;tid=$item[0]&amp;go=last\">$tun:".htmlspecialchars($item[1])."</a><br/>";
                            }else{
                              echo "Private Post<br/>";
                            }
                        }
                        }
                    echo "</p>";
                      echo "<p align=\"center\">";
                      echo "<a href=\"index.php?action=main\">main menu</a>";
                      echo "</p>";
                        echo xhtmlfoot();
                    }
                    add &amp;sid=$sid from all link
                    Ah I thought it was latest forum topic like pinoywap's latest forum topic.. It does not update latest post

                    Comment


                      #40
                      Admincp Pwd:
                      im textin wit a cellphone so dnt mind my breaking my text up.
                      Code:
                      i used it in ma mGiGS 2.0 sn u'l av to modify cuz my **** is frm scratch. Anyhoo add to ur users table dats ibwf_users? admin_pwd varchar(100) default 0 do it frm pma
                      Last edited by CreativityKills; 30.06.09, 18:25.

                      Comment


                        #41
                        Which? Mine? Dreamz.

                        Timeonline with free plusses per hour online.

                        In ibwf_users add ROW
                        tmonline INT(100) default 0
                        unique_tmonline INT(100) default 0

                        in login.php
                        Code:
                        //find where lastvisit is updated then add
                        $tmdo = 30*60;
                        $onltm = time() - $lact[0];
                        if($onltm>$tmdo){
                        $res = mysql_query("UPDATE unique_tmonl='0' WHERE id='".$id."'");
                        }
                        $upd = mysql_query("UPDATE ibwf_users SET lastvst='".$lact[0]."' WHERE id='".$uid."'");

                        Comment


                          #42
                          Then in addonline() in core.php ADD to bottom...
                          Code:
                          $lact = mysql_fetch_array(mysql_query(("SELECT lastact, unique_tmonl FROM ibwf_users WHERE id='".$uid."'"));
                          $tmdo = 30*60;
                          $onltm = time() - $lact[0];
                          if($onltm<=$tmdo){
                          $res = mysql_query("UPDATE unique_tmonl=unique_tmonl+$lact[0], tmonl=tmonl+$lact[0] WHERE id='".$uid."'");
                          
                          $lan = mysql_fetch_array(mysql_query(("SELECT unique_tmonl FROM ibwf_users WHERE id='".$uid."'"));
                          if($lan[0]>= (60*60)){
                          mysql_query("UPDATE ibwf_users SET unique_tmonl='0', plusses=plusses+400 WHERE id='".$uid."'");
                          $msg = "YOU HAVE BEEN GIVEN 400 plusses FOR STAYING ONLINE FOR 4 HRS STRAIGHT.";
                          autopm($msg,$uid);
                          }
                          }
                          i posted with a phone so there may be mistakes, scrutinize dnt copy n paste. And why timeouts? I noticed most lava scripts keep session valid for about an hour, meaning if im nt online for 45mins i cud still get d freebie when i log in. Change 30 to whateva minutes for timeout.

                          Comment


                            #43
                            avoid spam in forums, dnt wait for users to report a topic lol dats dumb cuz they dnt.

                            //Add to ur genproc where u create topics n posts
                            //DONT COPY AND PASTE, INTEGRATE!
                            //Sumwhere around where posts are inserted into database


                            if(isspam($the_post_text)){
                            $reported = 1;
                            }else{
                            $reported=0;
                            }

                            //in the insert statement...
                            $res = mysql_query("INSERT INTO ibwf_posts .....reported='".$reported."', dtime='".time()."'");

                            GET THE IDEA? Integrate that 2 ur script. Anti-copy n paste

                            Comment


                              #44
                              Originally posted by kabooms
                              Yah it just a litle latest forum topic not for user post Topic ahehehe..
                              here's my latest topic like pinoywap's latest topic..

                              Code:
                              else if($action=="last15topic")
                              {
                              
                                addonline(getuid_sid($sid),"Viewing Latest Forum Topics","index.php?action=$action");
                              
                                    echo "<head>";
                                    echo "<title>Latest Forum Topics</title>";
                                    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
                                    echo "</head>";
                              
                                  $sql = "SELECT id, name, crdate, authorid FROM ibwf_topics ibwf_topics ORDER BY lastpost DESC LIMIT 0 , 15";
                                 echo "<p>";
                                 echo "<small>";
                              $items = mysql_query($sql);
                                  echo mysql_error();
                                  if(mysql_num_rows($items)>0)
                                  {
                                  while ($item = mysql_fetch_array($items))
                                  {
                                    if(canaccess(getuid_sid($sid),getfid_tid($item[0])))
                                    {
                                $tun = getnick_uid($item[3]);
                                      echo "<a href=\"index.php?action=viewtpc&amp;sid=$sid&amp;tid=$item[0]&amp;go=last\">$tun:".htmlspecialchars($item[1])."</a><br/>";
                                      }else{
                                        echo "Private Post<br/>";
                                      }
                                  }
                                  }
                              echo "</p>";
                                echo "<p align=\"center\">";
                                echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
                                echo "</p>";
                              
                              }
                              usage

                              Code:
                              echo "<a href=\"index.php?action=last15topic&amp;sid=$sid\">Latest Forum Topics</a><br/>";

                              Comment


                                #45
                                Originally posted by huwad View Post
                                here's my latest topic like pinoywap's latest topic..

                                Code:
                                else if($action=="last15topic")
                                {
                                
                                  addonline(getuid_sid($sid),"Viewing Latest Forum Topics","index.php?action=$action");
                                
                                      echo "<head>";
                                      echo "<title>Latest Forum Topics</title>";
                                      echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
                                      echo "</head>";
                                
                                    $sql = "SELECT id, name, crdate, authorid FROM ibwf_topics ibwf_topics ORDER BY lastpost DESC LIMIT 0 , 15";
                                   echo "<p>";
                                   echo "<small>";
                                $items = mysql_query($sql);
                                    echo mysql_error();
                                    if(mysql_num_rows($items)>0)
                                    {
                                    while ($item = mysql_fetch_array($items))
                                    {
                                      if(canaccess(getuid_sid($sid),getfid_tid($item[0])))
                                      {
                                  $tun = getnick_uid($item[3]);
                                        echo "<a href=\"index.php?action=viewtpc&amp;sid=$sid&amp;tid=$item[0]&amp;go=last\">$tun:".htmlspecialchars($item[1])."</a><br/>";
                                        }else{
                                          echo "Private Post<br/>";
                                        }
                                    }
                                    }
                                echo "</p>";
                                  echo "<p align=\"center\">";
                                  echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
                                  echo "</p>";
                                
                                }
                                usage

                                Code:
                                echo "<a href=\"index.php?action=last15topic&amp;sid=$sid\">Latest Forum Topics</a><br/>";
                                AVATAR FOR CHAT
                                $avlink = getavatar($chat[0]);
                                if ($avlink!=""){
                                echo "<img src=\"$avlink\" height=\"25\" width=\"25\" alt=\"avatar\"/>
                                ";
                                }else{
                                echo "<img src=\"../images/nopic.jpg\" height=\"25\" width=\"25\" alt=\"avatar\"/>
                                ";
                                }

                                Comment

                                Working...
                                X