Lavalair Mods...

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

  • Lavalair Mods...

    Post Your Custom Made Mods Here For The Lavalair Script.

    - - - - - - - - - -

    Topic Made And Pinned As Requested By Members

  • #2
    Random Picture From The ibwf_gallery Table
    Code:
    $pic = mysql_fetch_array(mysql_query("SELECT uid, url FROM ibwf_gallery ORDER BY RAND() LIMIT 1"));
    $user = getnick_uid($pic[0]);
    echo "<a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$pic[0]\"/><img src=\"$pic[1]\" width=\"120\" height=\"120\"/></a>";
    Note: This Will Only Work If You Have The Gallery That Uses The Database

    Comment


    • #3
      [center]Visit Counter For Each Member
      [left]Add New Table In ibwf_users
      Code:
      `visit` varchar(255) NOT NULL default &#39;0&#39;
      Add To Login.php
      Code:
      $uid = getuid_sid($sid);
      $addv = mysql_fetch_array(mysql_query("SELECT visit FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
      $addv = $addhitv[0] + 1;
      $addvisit = mysql_query("UPDATE ibwf_users SET visit=&#39;".$addv."&#39; WHERE id=&#39;".$uid."&#39;");
      Add To Index.php?action=main
      Code:
      $nick = getnick_sid($sid);
      $uid = getuid_sid($sid);
      $showv = mysql_fetch_array(mysql_query("SELECT visit FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
      echo "Hello $nick,
      This Is Your $showv[0]. Visit!";
      </div></div>

      Comment


      • #4
        [center] User Rating
        [left]Add To Core.php
        Code:
        function rating($uid)
        {
        $info=mysql_fetch_array(mysql_query("SELECT * FROM ibwf_users WHERE id='".$uid."'"));
        $posts = $info["posts"];
        $plusses = $info["plusses"];
        $gplus = $gplus["gplus"];
         $shouts = $shouts["shouts"];
        $tot = $posts+$plusses+$gplus+$shouts;
        if($tot<100){return "<img src=\"http://coding-talk.com/images/half-star.gif\" alt=\"\"/>";}
        if($tot<250){return "<img src=\"http://coding-talk.com/images/1-star.gif\" alt=\"\"/>";}
        if($tot<500){return "<img src=\"http://coding-talk.com/images/1half-star.gif\" alt=\"\"/>";}
        if($tot<750){return "<img src=\"http://coding-talk.com/images/2-star.gif\" alt=\"\"/>";}
        if($tot<2500){return "<img src=\"http://coding-talk.com/images/2half-star.gif\" alt=\"\"/>";}
        if($tot<50000){return "<img src=\"http://coding-talk.com/images/3-star.gif\" alt=\"\"/>";}
        if($tot<75000){return "<img src=\"http://coding-talk.com/images/3half-star.gif\" alt=\"\"/>";}
        if($tot<100000){return "<img src=\"http://coding-talk.com/images/4-star.gif\" alt=\"\"/>";}
        if($tot<150000){return "<img src=\"http://coding-talk.com/images/4half-star.gif\" alt=\"\"/>";}
        if($tot>=150000){return "<img src=\"http://coding-talk.com/images/5-star.gif\" alt=\"\"/>";}
        }
        Add To Index.php?action=viewuser
        Code:
        $whonick = getnick_log($who);
        echo "
        ";
        echo rating($whonick);
        echo "
        ";
        I'll Add The Stars Later Or You Can Add Your Own.

        Comment


        • #5
          Total Unread PMs count
          Add To Index.php?action=viewuser
          Code:
          echo "Total Unread PMs: ".getunreadpm($who)."
          ";

          Comment


          • #6
            Unread PMs count from you
            add this function in core.php
            Code:
            /////////////////////Get unread number of pms form you
            
            function getunreadpm($uid,$you)
            {
            $nopm = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM ibwf_private WHERE touid='".$uid."' AND byuid='".$you."'AND unread='1'"));
            return $nopm[0];
            }
            Add To Index.php?action=viewuser
            Code:
            echo "Unread PMs From You: ".getunreadpm($who,$uid)."
            ";

            Comment


            • #7
              looks nice whitwarrior and Romi

              Comment


              • #8
                Last Profile Viewer & Last 10 Profile Viewers
                I coded this using a different pattern sql table and different sql tackties to keep the last 10 records for each user field only and dont erase the copyright line if you are not stupid
                Add To Index.php?action=viewuser after the $whonick variable has been declared
                PHP Code:
                $sql mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM lastview WHERE whonick='".$whonick."'"));
                if (
                $sql[0]>10)
                {
                $sql mysql_fetch_array(mysql_query("SELECT MAX(id) FROM lastview WHERE whonick='".$whonick."'"));
                $sql $sql[0]-9;
                mysql_query("DELETE FROM lastview WHERE whonick='".$whonick."' AND id <'".$sql."'");
                }
                $lv=getnick_sid($sid);
                $a getuid_nick($whonick);
                if(
                $a!=$uid)
                {
                mysql_query("INSERT INTO lastview SET lastview='".$lv."', whonick='".$whonick."', ltime='".time()."'");
                }
                $sqlmysql_fetch_array(mysql_query("SELECT lastview,ltime FROM lastview WHERE whonick='".$whonick."'ORDER BY ltime DESC LIMIT 1"));
                $a getuid_nick($sql[0]);
                $link "<a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$a\">$sql[0]</a>";
                echo 
                "last viewed by $link -";
                $newtime =$sql[1]+(*60 *60); 
                echo 
                date("D d M y - h:i:s a",$newtime);
                echo 
                "<a href=\"index.php?action=10pv&amp;who=$who&amp;sid=$sid\">+</a>
                "

                in index.php
                PHP Code:
                /////////////////////////////////////// 10 viewers

                else if($action=="10pv")
                {
                addonline(getuid_sid($sid),"Viewing Last 10 profileviewers","");
                if(
                $who==""||$who==0)
                {
                $mnick $_POST["mnick"];
                $who getuid_nick($mnick);
                }
                $whonick getnick_uid($who);

                echo 
                "<card id=\"main\" title=\"Viewing Last 10 profileviewers\">";
                echo 
                "<p align=\"center\">";
                $sqlmysql_query("SELECT lastview,ltime FROM lastview WHERE whonick='".$whonick."'ORDER BY ltime DESC LIMIT 10");
                while(
                $row mysql_fetch_array($sql))
                {
                $a getuid_nick($row[0]);
                echo 
                "<a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$a\">$row[0]</a>";
                $newtime =$row[1]+(*60 *60); 
                echo 
                " [b]".date("D d M y - h:i:s a",$newtime)."[/b]
                "
                ;
                echo 
                "------------
                "
                ;
                }
                $a getuid_nick($whonick);
                echo 
                "back to <a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$a\">$whonick</a>'s profile
                "
                ;
                echo 
                "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"http://coding-talk.com/images/home.gif\" alt=\"*\"/>";
                echo 
                "Home</a>";
                echo 
                " coded by Rukiya";
                echo 
                "</p>";
                echo 
                "</card>";

                SQL
                Attached Files

                Comment


                • #9


                  Learner add this code 2 profile
                  PHP Code:
                  echo "Rating:";
                  $whonick getuid_nick($whonick);
                  echo 
                  rating($whonick);
                  echo 
                  "
                  "

                  ///////////////////////////////// ratings

                  function rating($uid)
                  {
                  $info=mysql_fetch_array(mysql_query("SELECT * FROM ibwf_users WHERE id='".$uid."'"));
                  $posts $info["posts"];
                  $plusses $info["plusses"];
                  $gplus $gplus["gplus"];
                  $shouts $shouts["shouts"];
                  $tot $posts+$plusses+$gplus+$shouts;
                  if(
                  $tot<100){return "<img src=\"images/half-star.gif\" alt=\"*\"/>";}
                  if(
                  $tot<250){return "<img src=\"images/1-star.gif\" alt=\"**\"/>";}
                  if(
                  $tot<500){return "<img src=\"images/1half-star.gif\" alt=\"***\"/>";}
                  if(
                  $tot<750){return "<img src=\"images/2-star.gif\" alt=\"****\"/>";}
                  if(
                  $tot<2500){return "<img src=\"images/2half-star.gif\" alt=\"*****\"/>";}
                  if(
                  $tot<50000){return "<img src=\"images/3-star.gif\" alt=\"******\"/>";}
                  if(
                  $tot<75000){return "<img src=\"images/3half-star.gif\" alt=\"*******\"/>";}
                  if(
                  $tot<100000){return "<img src=\"images/4-star.gif\" alt=\"********\"/>";}
                  if(
                  $tot<150000){return "<img src=\"images/4half-star.gif\" alt=\"********\"/>";}
                  if(
                  $tot>=150000){return "<img src=\"images/5-star.gif\" alt=\"*********\"/>";}

                  Last edited by metulj; 21.11.10, 09:45.

                  Comment


                  • #10
                    i have coded Comment Box for Blogs
                    and its working fine for me

                    demo- Click Here
                    username & password = test

                    sql
                    Code:
                    -- 
                    -- Table structure for table `ibwf_blogcomment`
                    -- 
                    
                    CREATE TABLE `ibwf_blogcomment` (
                    `id` int(100) NOT NULL auto_increment,
                    `blogowner` int(100) NOT NULL default &#39;0&#39;,
                    `blogsigner` int(100) NOT NULL default &#39;0&#39;,
                    `blogmsg` blob NOT NULL,
                    `dtime` int(100) NOT NULL default &#39;0&#39;,
                    PRIMARY KEY(`id`)
                    ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=9;
                    
                    -- 
                    -- Dumping data for table `ibwf_blogcomment`
                    --
                    core.php

                    Code:
                    //////////////////////////can sign blog comment?
                    
                    function cansignblogcomment($uid, $who)
                    {
                    if(arebuds($bid, $who))
                    {
                    return true;
                    }
                    if($bid==$who)
                    {
                    return false; //imagine if someone signed his own gbook o.O
                    }
                    if(getplusses($uid)>=50)
                    {
                    return true;
                    }
                    return false;
                    }
                    ////////////////////////////////////////////is del blog comment
                    
                    function candelblogcomment($bid,$mid)
                    {
                    $minfo = mysql_fetch_array(mysql_query("SELECT blogowner, blogsigner FROM ibwf_blogcomment WHERE id=&#39;".$mid."&#39;"));
                    if($minfo[0]==$bid)
                    {
                    return true;
                    }
                    if($minfo[1]==$bid)
                    {
                    return true;
                    }
                    return false;
                    }
                    genproc.php


                    Code:
                    else if($action=="signblogcomment")
                    {
                    $who = $_POST["who"];
                     
                    if(!cansignblogcomment(getuid_sid($sid), $who))
                     {
                    echo "<card id=\"main\" title=\"$sitename\">";
                    echo "<p align=\"center\">";
                    echo "You cant Sign this user Blog
                    
                    ";
                    echo "<a href=\"index.php?action=main&sid=$sid\">Home</a>";
                    echo " coded by Vishal";
                    echo "</p>";
                    echo "</card>";
                    echo "</wml>";
                    exit();
                    }
                    $msgtxt = $_POST["msgtxt"];
                    //$qut = $_POST["qut"];
                    addonline(getuid_sid($sid),"Signing a User&#39;s Blog","");
                    echo "<card id=\"main\" title=\"$sitename\">";
                    echo "<p align=\"center\">";
                    $crdate = time();
                    //$uid = getbid_sid($sid);
                    $res = false;
                    
                    if(trim($msgtxt)!="")
                    {
                    
                    $res = mysql_query("INSERT INTO ibwf_blogcomment SET blogowner=&#39;".$who."&#39;, blogsigner=&#39;".$uid."&#39;, dtime=&#39;".$crdate."&#39;, blogmsg=&#39;".$msgtxt."&#39;");
                    }
                    if($res)
                    {
                    echo "<img src=\"../images/ok.gif\" alt=\"O\"/>Comment Posted Successfully";
                    }else{
                    echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Error Posting Comment";
                    }
                    
                    echo "
                    
                    ";
                    echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
                    echo "Home</a>";
                    echo " coded by Vishal";
                    echo "</p>";
                    echo "</card>";
                    
                    }
                    
                    else if($action=="delblogcomment")
                    {
                    $mid = $_GET["mid"];
                    addonline(getuid_sid($sid),"Deleting Blog&#39;s Comment","");
                    echo "<card id=\"main\" title=\"$sitename\">";
                    echo "<p align=\"center\">";
                    if(candelblogcomment(getuid_sid($sid), $mid))
                    {
                    $res = mysql_query("DELETE FROM ibwf_blogcomment WHERE id=&#39;".$mid."&#39;");
                    if($res)
                    {
                    echo "<img src=\"../images/ok.gif\" alt=\"o\"/>Comment Deleted From Blog
                    ";
                    }else{
                    echo "<img src=\"../images/notok.gif\" alt=\"x\"/>Database Error!
                    ";
                    }
                    }else{
                    echo "<img src=\"../images/notok.gif\" alt=\"X\"/>You can&#39;t delete this Comment";
                    }
                    echo "
                    
                    ";
                    echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
                    echo "Home</a>";
                    echo " coded by Vishal";
                    echo "</p></card>";
                    }
                    lists.php

                    Code:
                    ///////////////////////////////////Blogs Comment
                    else if($action=="blogscomment")
                    {
                    $who = $_GET["who"];
                    addonline(getuid_sid($sid),"Sending Comment On Blog","");
                    echo "<card id=\"main\" title=\"Blogs Comment\">";
                    $uid = getuid_sid($sid);
                    
                    //////ALL LISTS SCRIPT <<
                    
                    if($page=="" || $page<=0)$page=1;
                    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_blogcomment WHERE blogowner=&#39;".$who."&#39;"));
                    $num_items = $noi[0]; //changable
                    $items_per_page= 5;
                    $num_pages = ceil($num_items/$items_per_page);
                    if(($page>$num_pages)&&$page!=1)$page= $num_pages;
                    $limit_start = ($page-1)*$items_per_page;
                    
                    
                    $sql = "SELECT blogowner, blogsigner, blogmsg, dtime, id FROM ibwf_blogcomment WHERE blogowner=&#39;".$who."&#39; ORDER BY dtime DESC LIMIT $limit_start, $items_per_page";
                    
                    
                    echo "
                    
                    ";
                    $items = mysql_query($sql);
                    echo mysql_error();
                    if(mysql_num_rows($items)>0)
                    {
                    while ($item = mysql_fetch_array($items))
                    {
                    
                    if(isonline($item[1]))
                    {
                    $iml = "<img src=\"../images/onl.gif\" alt=\"+\"/>";
                    
                    }else{
                    $iml = "<img src=\"../images/ofl.gif\" alt=\"-\"/>";
                    }
                    $snick = getnick_uid($item[1]);
                    $lnk = "<a href=\"index.php?action=viewuser&who=$item[1]&sid=$sid\">$iml$snick</a>";
                    $bs = date("d m y-H:i:s",$item[3]);
                    echo "$lnk
                    ";
                    if(candelblogcomment($uid, $item[4]))
                    {
                    $delnk = "<a href=\"genproc.php?action=delblogcomment&sid=$sid&mid=$item[4]\">[x]</a>";
                    }else{
                    $delnk = "";
                    }
                    $text = parsepm($item[2], $sid);
                    echo "$text
                    $bs $delnk
                    ";
                    echo "";
                    
                    }
                    }
                    echo "</p>";
                    echo "<p align=\"center\">";
                    if($page>1)
                    {
                    $ppage = $page-1;
                    echo "<a href=\"lists.php?action=$action&page=$ppage&sid=$sid&who=$who\">PREV</a> ";
                    }
                    if($page<$num_pages)
                    {
                    $npage = $page+1;
                    echo "<a href=\"lists.php?action=$action&page=$npage&sid=$sid&who=$who\">Next</a>";
                    }
                    echo "
                    $page/$num_pages
                    ";
                    if($num_pages>2)
                    {
                    $rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
                    $rets .= "<anchor>[GO]";
                    $rets .= "<go href=\"lists.php\" method=\"get\">";
                    $rets .= "<postfield name=\"action\" value=\"$action\"/>";
                    $rets .= "<postfield name=\"who\" value=\"$who\"/>";
                    $rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
                    $rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
                    $rets .= "</go></anchor>";
                    
                    echo $rets;
                    }
                    echo "</p>";
                    ////// UNTILL HERE >>
                    {
                    echo "<a href=\"index.php?action=signblogcomment&sid=$sid&who=$who\">";
                    echo "Add Your Message</a>
                    ";
                    }
                    echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
                    echo "Home</a>";
                    echo " coded by Vishal";
                    echo "</card>";
                    }

                    index.php

                    Code:
                    ///////////////////////////////////////////Blog Comment
                    else if($action=="signblogcomment")
                    {
                    $who=$_GET["who"];
                    addonline(getuid_sid($sid),"Signing Users guestbook","");
                    if(!cansignblogcomment(getuid_sid($sid), $who))
                    {
                    echo "<card id=\"main\" title=\"$sitename\">";
                    echo "<p align=\"center\">";
                    echo "You cant Sign this user Blog
                    
                    ";
                    echo "<a href=\"index.php?action=main&sid=$sid\">Home</a>";
                    echo " coded by Vishal";
                    echo "</p>";
                    echo "</card>";
                    echo "</wml>";
                    exit();
                    }
                    
                    
                    echo "<card id=\"main\" title=\"Sign blog\">";
                    echo "<onevent type=\"onenterforward\">";
                    echo "<refresh>
                    <setvar name=\"msgtxt\" value=\"\"/>
                    
                     ";
                    echo "</refresh></onevent>";
                    
                    echo "<p align=\"center\">";
                    echo "Text:<input name=\"msgtxt\" maxlength=\"500\"/>
                    ";
                    echo "<anchor>Add";
                    echo "
                     <go href=\"genproc.php?action=signblogcomment&sid=$sid\" method=\"post\">
                     
                     <postfield name=\"msgtxt\" value=\"$(msgtxt)\"/>
                    <postfield name=\"who\" value=\"$who\"/>
                     </go>
                    ";
                    echo "</anchor>";
                    
                     echo "
                    
                    <a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
                    echo "Home</a>";
                    echo " coded by Vishal";
                    echo "</p>";
                    echo "</card>";
                    }
                    in index.php find else if($action=="viewblog")

                    and add
                    Code:
                     $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_blogcomment WHERE blogowner=&#39;".$bid."&#39;"));
                    echo "<a href=\"lists.php?action=blogscomment&sid=$sid&who=$bid\">Blogs Comment($noi[0])</a>
                    ";

                    Comment


                    • #11
                      add in genproc.php for back to blog list

                      in else if($action=="signblogcomment") and else if($action=="delblogcomment")

                      Code:
                      echo "<a href=\"lists.php?action=allbl&amp;sid=$sid\">Back to Blogs</a>
                      ";

                      Comment


                      • #12
                        PHP Code:
                        <div class='codemain' style='height:200px;white-space:pre;overflow:auto'>////////////////////////////////////////APPLY MAIN////////////////////////////
                        if($action=="main")
                        {
                        addvisitor();
                        addonline(getuid_sid($sid),"Applying To Be Staff","");

                        echo 
                        "<head>";
                        echo 
                        "<title>Apply To Be Staff</title>";
                        echo 
                        "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
                        echo 
                        "</head>";
                        echo 
                        "<body>";
                        echo 
                        "$sitename Staff";

                        echo 
                        "<p align=\"center\">";   
                        echo 
                        "Here You Can Apply For Admin An Inbox Will Be Sent To The Owners
                        "
                        ;
                        echo 
                        "And Owners Will Come Ask You A Few Questions";
                        echo 
                        "</p>";

                        echo 
                        "<p align=\"center\">";
                        echo 
                        "What Possion Are You Going To Apply For:</p>";
                         
                        echo 
                        "<p align=\"center\">";
                        echo 
                        "----------
                        "
                        ;
                        echo 
                        "<a accesskey=\"2\" href=\"staffaply.php?action=hadmin&amp;sid=$sid\">Apply To Be HeadAdmin</a>
                        "
                        ;
                        echo 
                        "<a accesskey=\"2\" href=\"staffaply.php?action=admin&amp;sid=$sid\">Apply To Be Admin</a>
                        "
                        ;
                        echo 
                        "<a accesskey=\"2\" href=\"staffaply.php?action=mod&amp;sid=$sid\">Apply To Be Mod</a>
                        "
                        ;
                        echo 
                        "----------
                        "
                        ;

                        echo 
                        "<p align=\"center\">";
                        $chs mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chonline"));
                        echo 
                        "<a accesskey=\"1\" href=\"inbox.php?action=main&amp;sid=$sid\">Inbox</a>
                        "
                        ;
                        echo 
                        "<a accesskey=\"9\" href=\"forums.php?action=forumindx&amp;sid=$sid\">Forums</a>
                        "
                        ;
                        echo 
                        "<a accesskey=\"2\" href=\"main.php?action=online&amp;sid=$sid\">Online list(".getnumonline().")</a>
                        "
                        ;
                        echo 
                        "<a accesskey=\"6\" href=\"chat1.php?action=chat&amp;sid=$sid\">ChatRooms($chs[0])</a>
                        "
                        ;
                        echo 
                        "<a accesskey=\"0\" href=\"main.php?action=main&amp;sid=$sid\"><img src=\"../phpThumb/phpThumb.php?src=../images/home.gif\" alt=\"\"/>Main Menu</a>";
                        echo 
                        "</p>";
                        echo 
                        "</body>";
                        }
                        /////////////////////////HEADADMIN////////////AUTO INBOS 4 APPLY//////////////
                        else if($action=="hadmin")
                        {
                        addonline(getuid_sid($sid),"Applying For HeadAdmin","");
                        echo 
                        "<head>";
                        echo 
                        "<title>HeadAdmin</title>";
                        echo 
                        "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
                        echo 
                        "</head>";
                        echo 
                        "<body>";
                        echo 
                        "<p align=\"center\">";
                        echo 
                        "<img src=\"../phpThumb/phpThumb.php?src=../image/hadmin.gif\" alt=\"HeadAdmin\"/>
                        "
                        ;
                        $ownid[0]=1;
                        $who=$_GET["whoid"];
                        $whoid=$_GET["who"];
                        $whonick getnick_uid($uid);
                        $message "".$whonick." Would Like To Be HeadAdmin Please Reply To Him Asap.[br/][small]p.s: this is an automated pm[/small]";
                        autopm($message$ownid[0]);
                        echo 
                        "<img src=\"../phpThumb/phpThumb.php?src=../images/ok.gif\" alt=\"\"/>Thank You For Applying To Be HeadAdmin.
                        Your Request Has Been Sent To The Staff For Processing.
                        "
                        ;
                        echo 
                        "Owners Will Contact You Shortly!!.";

                        echo 
                        "<p align=\"center\">";
                        $chs mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chonline"));
                        echo 
                        "<a accesskey=\"1\" href=\"inbox.php?action=main&amp;sid=$sid\">Inbox</a>
                        "
                        ;
                        echo 
                        "<a accesskey=\"9\" href=\"forums.php?action=forumindx&amp;sid=$sid\">Forums</a>
                        "
                        ;
                        echo 
                        "<a accesskey=\"2\" href=\"main.php?action=online&amp;sid=$sid\">Online list(".getnumonline().")</a>
                        "
                        ;
                        echo 
                        "<a accesskey=\"6\" href=\"chat1.php?action=chat&amp;sid=$sid\">ChatRooms($chs[0])</a>
                        "
                        ;
                        echo 
                        "<a accesskey=\"0\" href=\"main.php?action=main&amp;sid=$sid\"><img src=\"../phpThumb/phpThumb.php?src=../images/home.gif\" alt=\"\"/>Main Menu</a>";
                        echo 
                        "</p>";
                        echo 
                        "</body>";
                        }
                        /////////////////////////////////////ADMIN/////////////////////////////////////
                        else if($action=="admin")
                        {
                        addonline(getuid_sid($sid),"Applying For Admin","");
                        echo 
                        "<head>";
                        echo 
                        "<title>Admin</title>";
                        echo 
                        "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
                        echo 
                        "</head>";
                        echo 
                        "<body>";
                        echo 
                        "<p align=\"center\">";
                        echo 
                        "<img src=\"../phpThumb/phpThumb.php?src=../image/admin.gif\" alt=\"Admin\"/>
                        "
                        ;
                        $ownid[0]=1;
                        $who=$_GET["whoid"];
                        $whoid=$_GET["who"];
                        $whonick getnick_uid($uid);
                        $message "".$whonick." Would Like To Be Admin Please Reply To Him Asap.[br/][small]p.s: this is an automated pm[/small]";
                        autopm($message$ownid[0]);
                        echo 
                        "<img src=\"../phpThumb/phpThumb.php?src=../images/ok.gif\" alt=\"\"/>Thank You For Applying To Be Admin.
                        Your Request Has Been Sent To The Staff For Processing.
                        "
                        ;
                        echo 
                        "Owners Will Contact You Shortly!!.";

                        echo 
                        "<p align=\"center\">";
                        $chs mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chonline"));
                        echo 
                        "<a accesskey=\"1\" href=\"inbox.php?action=main&amp;sid=$sid\">Inbox</a>
                        "
                        ;
                        echo 
                        "<a accesskey=\"9\" href=\"forums.php?action=forumindx&amp;sid=$sid\">Forums</a>
                        "
                        ;
                        echo 
                        "<a accesskey=\"2\" href=\"main.php?action=online&amp;sid=$sid\">Online list(".getnumonline().")</a>
                        "
                        ;
                        echo 
                        "<a accesskey=\"6\" href=\"chat1.php?action=chat&amp;sid=$sid\">ChatRooms($chs[0])</a>
                        "
                        ;
                        echo 
                        "<a accesskey=\"0\" href=\"main.php?action=main&amp;sid=$sid\"><img src=\"../phpThumb/phpThumb.php?src=../images/home.gif\" alt=\"\"/>Main Menu</a>";
                        echo 
                        "</p>";
                        echo 
                        "</body>";
                        }
                        //////////////////////////////////MOD/////////////////////////////////////////
                        else if($action=="mod")
                        {
                        addonline(getuid_sid($sid),"Applying For Mod","");
                        echo 
                        "<head>";
                        echo 
                        "<title>Mod</title>";
                        echo 
                        "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
                        echo 
                        "</head>";
                        echo 
                        "<body>";
                        echo 
                        "<p align=\"center\">";
                        echo 
                        "<img src=\"../phpThumb/phpThumb.php?src=../image/mod.gif\" alt=\"Mod\"/>
                        "
                        ;
                        $ownid[0]=1;
                        $who=$_GET["whoid"];
                        $whoid=$_GET["who"];
                        $whonick getnick_uid($uid);
                        $message "".$whonick." Would Like To Be Mod Please Reply To Him Asap.[br/][small]p.s: this is an automated pm[/small]";
                        autopm($message$ownid[0]);
                        echo 
                        "<img src=\"../phpThumb/phpThumb.php?src=../images/ok.gif\" alt=\"\"/>Thank You For Applying To Be Mod.
                        Your Request Has Been Sent To The Staff For Processing.
                        "
                        ;
                        echo 
                        "Owners Will Contact You Shortly!!.";

                        echo 
                        "<p align=\"center\">";
                        $chs mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chonline"));
                        echo 
                        "<a accesskey=\"1\" href=\"inbox.php?action=main&amp;sid=$sid\">Inbox</a>
                        "
                        ;
                        echo 
                        "<a accesskey=\"9\" href=\"forums.php?action=forumindx&amp;sid=$sid\">Forums</a>
                        "
                        ;
                        echo 
                        "<a accesskey=\"2\" href=\"main.php?action=online&amp;sid=$sid\">Online list(".getnumonline().")</a>
                        "
                        ;
                        echo 
                        "<a accesskey=\"6\" href=\"chat1.php?action=chat&amp;sid=$sid\">ChatRooms($chs[0])</a>
                        "
                        ;
                        echo 
                        "<a accesskey=\"0\" href=\"main.php?action=main&amp;sid=$sid\"><img src=\"../phpThumb/phpThumb.php?src=../images/home.gif\" alt=\"\"/>Main Menu</a>";
                        echo 
                        "</p>";
                        echo 
                        "</body>";
                        }
                        ?>
                        </html></div> 
                        Last edited by metulj; 21.11.10, 09:48.

                        Comment


                        • #13
                          Its OK ;)


                          Code:
                          -- 
                          -- Table structure for table `ibwf_blogcomment`
                          -- 
                          
                          CREATE TABLE `ibwf_blogcomment` (
                          `id` int(100) NOT NULL auto_increment,
                          `blogowner` int(100) NOT NULL default &#39;0&#39;,
                          `blogsigner` int(100) NOT NULL default &#39;0&#39;,
                          `blogmsg` blob NOT NULL,
                          `dtime` int(100) NOT NULL default &#39;0&#39;,
                          PRIMARY KEY(`id`)
                          ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=9;
                          
                          -- 
                          -- Dumping data for table `ibwf_blogcomment`
                          --
                          Code:
                          core.php
                          
                          //////////////////////////can sign blog comment?
                          
                          function cansignblogcomment($uid, $who)
                          {
                          if(arebuds($bid, $who))
                          {
                          return true;
                          }
                          if($bid==$who)
                          {
                          return false; //imagine if someone signed his own gbook o.O
                          }
                          if(getplusses($uid)>=50)
                          {
                          return true;
                          }
                          return false;
                          }
                          ////////////////////////////////////////////is del blog comment
                          
                          function candelblogcomment($bid,$mid)
                          {
                          $minfo = mysql_fetch_array(mysql_query("SELECT blogowner, blogsigner FROM ibwf_blogcomment WHERE id=&#39;".$mid."&#39;"));
                          if($minfo[0]==$bid)
                          {
                          return true;
                          }
                          if($minfo[1]==$bid)
                          {
                          return true;
                          }
                          return false;
                          }
                          
                          genproc.php
                          else if($action=="signblogcomment")
                          {
                          $who = $_POST["who"];
                           
                          if(!cansignblogcomment(getuid_sid($sid), $who))
                           {
                          echo "<card id=\"main\" title=\"$sitename\">";
                          echo "<p align=\"center\">";
                          echo "You cant Sign this user Blog
                          
                          ";
                          echo "<a href=\"index.php?action=main&amp;sid=$sid\">Home</a>";
                          echo " coded by Vishal";
                          echo "</p>";
                          echo "</card>";
                          echo "</wml>";
                          exit();
                          }
                          $msgtxt = $_POST["msgtxt"];
                          //$qut = $_POST["qut"];
                          addonline(getuid_sid($sid),"Signing a User&#39;s Blog","");
                          echo "<card id=\"main\" title=\"$sitename\">";
                          echo "<p align=\"center\">";
                          $crdate = time();
                          //$uid = getbid_sid($sid);
                          $res = false;
                          
                          if(trim($msgtxt)!="")
                          {
                          
                          $res = mysql_query("INSERT INTO ibwf_blogcomment SET blogowner=&#39;".$who."&#39;, blogsigner=&#39;".$uid."&#39;, dtime=&#39;".$crdate."&#39;, blogmsg=&#39;".$msgtxt."&#39;");
                          }
                          if($res)
                          {
                          echo "<img src=\"../images/ok.gif\" alt=\"O\"/>Comment Posted Successfully";
                          }else{
                          echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Error Posting Comment";
                          }
                          
                          echo "
                          
                          ";
                          echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
                          echo "Home</a>";
                          echo " coded by Vishal";
                          echo "</p>";
                          echo "</card>";
                          
                          }
                          
                          else if($action=="delblogcomment")
                          {
                          $mid = $_GET["mid"];
                          addonline(getuid_sid($sid),"Deleting Blog&#39;s Comment","");
                          echo "<card id=\"main\" title=\"$sitename\">";
                          echo "<p align=\"center\">";
                          if(candelblogcomment(getuid_sid($sid), $mid))
                          {
                          $res = mysql_query("DELETE FROM ibwf_blogcomment WHERE id=&#39;".$mid."&#39;");
                          if($res)
                          {
                          echo "<img src=\"../images/ok.gif\" alt=\"o\"/>Comment Deleted From Blog
                          ";
                          }else{
                          echo "<img src=\"../images/notok.gif\" alt=\"x\"/>Database Error!
                          ";
                          }
                          }else{
                          echo "<img src=\"../images/notok.gif\" alt=\"X\"/>You can&#39;t delete this Comment";
                          }
                          echo "
                          
                          ";
                          echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
                          echo "Home</a>";
                          echo " coded by Vishal";
                          echo "</p></card>";
                          }
                          lists.php
                          
                          ///////////////////////////////////Blogs Comment
                          else if($action=="blogscomment")
                          {
                          $who = $_GET["who"];
                          addonline(getuid_sid($sid),"Sending Comment On Blog","");
                          echo "<card id=\"main\" title=\"Blogs Comment\">";
                          $uid = getuid_sid($sid);
                          
                          //////ALL LISTS SCRIPT <<
                          
                          if($page=="" || $page<=0)$page=1;
                          $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_blogcomment WHERE blogowner=&#39;".$who."&#39;"));
                          $num_items = $noi[0]; //changable
                          $items_per_page= 5;
                          $num_pages = ceil($num_items/$items_per_page);
                          if(($page>$num_pages)&&$page!=1)$page= $num_pages;
                          $limit_start = ($page-1)*$items_per_page;
                          
                          
                          $sql = "SELECT blogowner, blogsigner, blogmsg, dtime, id FROM ibwf_blogcomment WHERE blogowner=&#39;".$who."&#39; ORDER BY dtime DESC LIMIT $limit_start, $items_per_page";
                          echo "
                          
                          ";
                          $items = mysql_query($sql);
                          echo mysql_error();
                          if(mysql_num_rows($items)>0)
                          {
                          while ($item = mysql_fetch_array($items))
                          {
                          
                          if(isonline($item[1]))
                          {
                          $iml = "<img src=\"../images/onl.gif\" alt=\"+\"/>";
                          
                          }else{
                          $iml = "<img src=\"../images/ofl.gif\" alt=\"-\"/>";
                          }
                          $snick = getnick_uid($item[1]);
                          $lnk = "<a href=\"index.php?action=viewuser&amp;who=$item[1]&sid=$sid\">$iml$snick</a>";
                          $bs = date("d m y-H:i:s",$item[3]);
                          echo "$lnk
                          ";
                          if(candelblogcomment($uid, $item[4]))
                          {
                          $delnk = "<a href=\"genproc.php?action=delblogcomment&amp;sid=$sid&mid=$item[4]\">[x]</a>";
                          }else{
                          $delnk = "";
                          }
                          $text = parsepm($item[2], $sid);
                          echo "$text
                          $bs $delnk
                          ";
                          echo "";
                          
                          }
                          }
                          echo "</p>";
                          echo "<p align=\"center\">";
                          if($page>1)
                          {
                          $ppage = $page-1;
                          echo "<a href=\"lists.php?action=$action&amp;page=$ppage&amp;sid=$sid&who=$who\">PREV</a> ";
                          }
                          if($page<$num_pages)
                          {
                          $npage = $page+1;
                          echo "<a href=\"lists.php?action=$action&amp;page=$npage&amp;sid=$sid&amp;who=$who\">Next</a>";
                          }
                          echo "
                          $page/$num_pages
                          ";
                          if($num_pages>2)
                          {
                          $rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
                          $rets .= "<anchor>[GO]";
                          $rets .= "<go href=\"lists.php\" method=\"get\">";
                          $rets .= "<postfield name=\"action\" value=\"$action\"/>";
                          $rets .= "<postfield name=\"who\" value=\"$who\"/>";
                          $rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
                          $rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
                          $rets .= "</go></anchor>";
                          
                          echo $rets;
                          }
                          echo "</p>";
                          ////// UNTILL HERE >>
                          {
                          echo "<a href=\"index.php?action=signblogcomment&amp;sid=$sid&amp;who=$who\">";
                          echo "Add Your Message</a>
                          ";
                          }
                          echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
                          echo "Home</a>";
                          echo " coded by Vishal";
                          echo "</card>";
                          }
                          
                          index.php
                          
                          ///////////////////////////////////////////Blog Comment
                          else if($action=="signblogcomment")
                          {
                          $who=$_GET["who"];
                          addonline(getuid_sid($sid),"Signing Users guestbook","");
                          if(!cansignblogcomment(getuid_sid($sid), $who))
                          {
                          echo "<card id=\"main\" title=\"$sitename\">";
                          echo "<p align=\"center\">";
                          echo "You cant Sign this user Blog
                          
                          ";
                          echo "<a href=\"index.php?action=main&amp;sid=$sid\">Home</a>";
                          echo " coded by Vishal";
                          echo "</p>";
                          echo "</card>";
                          echo "</wml>";
                          exit();
                          }
                          
                          
                          echo "<card id=\"main\" title=\"Sign blog\">";
                          echo "<onevent type=\"onenterforward\">";
                          echo "<refresh>
                          <setvar name=\"msgtxt\" value=\"\"/>
                          
                           ";
                          echo "</refresh></onevent>";
                          
                          echo "<p align=\"center\">";
                          echo "Text:<input name=\"msgtxt\" maxlength=\"500\"/>
                          ";
                          echo "<anchor>Add";
                          echo "
                           <go href=\"genproc.php?action=signblogcomment&amp;sid=$sid\" method=\"post\">
                           
                           <postfield name=\"msgtxt\" value=\"$(msgtxt)\"/>
                          <postfield name=\"who\" value=\"$who\"/>
                           </go>
                          ";
                          echo "</anchor>";
                          
                           echo "
                          
                          <a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
                          echo "Home</a>";
                          echo " coded by Vishal";
                          echo "</p>";
                          echo "</card>";
                          }
                          
                          in index.php find else if($action=="viewblog")
                          
                          and add
                           $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_blogcomment WHERE blogowner=&#39;".$bid."&#39;"));
                          echo "<a href=\"lists.php?action=blogscomment&&amp;id=$sid&amp;who=$bid\">Blogs Comment($noi[0])</a>
                          ";
                          please use BB code. thank you

                          Comment


                          • #14
                            the rating not working it shows only half star all the time[/b]
                            this is fixed code and works 100%
                            PHP Code:
                            ////// RATING ///////
                            function rating($uid)
                            {
                            $info mysql_fetch_array(mysql_query("SELECT plusses, gplus, shouts, chmsgs FROM ibwf_users WHERE id='".$uid."'"));
                            $pl $info[0];
                            $gp $info[1];
                            $sh $info[2];
                            $ch $info[3];
                            $infototal = ($pl $gp $sh $ch);
                            if(
                            $infototal<10)
                            {
                            return 
                            "<img src=\"images/empty.gif\" alt=\"\"/>";
                            }
                            else if(
                            $infototal<350)
                            {
                            return 
                            "<img src=\"images/half.gif\" alt=\"\"/>";
                            }
                            else if(
                            $infototal<1000)
                            {
                            return 
                            "<img src=\"images/one.gif\" alt=\"\"/>";
                            }
                            else if(
                            $infototal<2500)
                            {
                            return 
                            "<img src=\"images/onehalf.gif\" alt=\"\"/>";
                            }
                            else if(
                            $infototal<6500)
                            {
                            return 
                            "<img src=\"images/two.gif\" alt=\"\"/>";
                            }
                            else if(
                            $infototal<15000)
                            {
                            return 
                            "<img src=\"images/twohalf.gif\" alt=\"\"/>";
                            }
                            else if(
                            $infototal<37000)
                            {
                            return 
                            "<img src=\"images/three.gif\" alt=\"\"/>";
                            }
                            else if(
                            $infototal<85000)
                            {
                            return 
                            "<img src=\"images/threehalf.gif\" alt=\"\"/>";
                            }
                            else if(
                            $infototal<190000)
                            {
                            return 
                            "<img src=\"images/four.gif\" alt=\"\"/>";
                            }
                            else if(
                            $infototal<420000)
                            {
                            return 
                            "<img src=\"images/fourhalf.gif\" alt=\"\"/>";
                            }
                            else if(
                            $infototal<900000)
                            {
                            return 
                            "<img src=\"images/five.gif\" alt=\"\"/>";
                            }
                            else if(
                            $infototal<1700000)
                            {
                            return 
                            "<img src=\"images/fivehalf.gif\" alt=\"\"/>";
                            }
                            else if(
                            $infototal<3300000)
                            {
                            return 
                            "<img src=\"images/six.gif\" alt=\"\"/>";
                            }
                            else if(
                            $infototal<7000000)
                            {
                            return 
                            "<img src=\"images/sixhalf.gif\" alt=\"\"/>";
                            }
                            else
                            {
                            return 
                            "<img src=\"images/seven.gif\" alt=\"\"/>";
                            }

                            and usage
                            PHP Code:
                            echo "Rating: ";
                            echo 
                            rating($who); 
                            i've exluded posts from count..
                            cos plusses>=posts ;)
                            Last edited by metulj; 21.11.10, 09:51.

                            Comment


                            • #15
                              and i've made images also
                              Code:
                              rainbow version






                              Last edited by metulj; 21.11.10, 09:52.

                              Comment

                              Working...
                              X