shouts

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    shouts

    friends, this is the code of mine shouts.. i want to show 3 shouts instead of 1 .. how to do this..


    code of core.php



    function getshoutbox($sid)

    {

    $eval = mysql_fetch_array(mysql_query("SELECT shout, shouter, id FROM bdbfdf_shouts ORDER BY shtime DESC LIMIT 1"));

    global $suli;

    if($suli!='' && $GLOBALS['h']!=1){

    eval($suli);

    $GLOBALS['h']=1;

    }



    $shnick = getnick_uid($eval[1]);

    $shbox .= "<i><a href=\"index.php?action=viewuser&amp;sid=$sid&amp; who=$eval[1]\">".$shnick."</a></i>: ";

    $shbox .= parsepm($eval[0], $sid);

    $shbox .= "<br/>";

    $shbox .= "<a href=\"121lists121.php?action=shouts&amp;sid=$sid\ ">history</a> ";

    $shbox .= "<a href=\"index.php?action=shout&amp;sid=$sid\">shout </a>";

    if (ismod(getuid_sid($sid)))

    {

    $shbox .= " <a href=\"121mprocpl121.php?action=delsh&amp;sid=$sid &amp;shid=$eval[2]\">delete</a>";

    }

    //$shbox .= "<br/>";

    return $shbox;

    }
    Last edited by icedroplet1987; 07.11.09, 22:18.

    #2
    i can see its limited by 1 can you see 1 in there lol

    if you can change it to 3 to 109348u12985ru195r47213894721893471289473 shouts
    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


      #3
      $eval = mysql_fetch_array(mysql_query("SELECT shout, shouter, id FROM bdbfdf_shouts ORDER BY shtime DESC LIMIT 3"));
      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


        #4
        Code:
        $shouts = mysql_query("SELECT shout, shouter, id FROM bdbfdf_shouts ORDER BY shtime DESC LIMIT 3");
        while ($eval = mysql_fetch_array($shouts))
        {
        $shnick = getnick_uid($eval[1]);
        $shbox .= "<i><a href=\"index.php?action=viewuser&amp;sid=$sid&amp; who=$eval[1]\">".$shnick."</a></i>: ";
        $shbox .= parsepm($eval[0], $sid);
        $shbox .= "<br/>";
        }

        Comment


          #5
          Shoutbox

          here are example of my core one of my edits

          core.php
          Code:
          /////////////////////////////////user link
          function ulink($uid,$sid)
          {
            $col = mysql_fetch_array(mysql_query("SELECT id,name,perm FROM ibwf_users WHERE id='".$uid."'"));
            if($col[2]=='2')
            {
              $admn .= "<a href=\"index.php?action=viewuser&amp;who=$col[0]\" class=\"admn\">$col[1]</a>";
             return $admn;
          }else if($col[2]=='1')
              {
                  $modr .= "<a href=\"index.php?action=viewuser&amp;who=$col[0]\" class=\"modr\">$col[1]</a>"; 
                  return $modr;
              }else{
          $user .= "<a href=\"index.php?action=viewuser&amp;who=$col[0]\">$col[1]</a>";
            return $user;
          }
          }
          ////////////////////////////////////////////////////////////
          function getshoutbox($sid)
          {
          $shbox = "<small>";
          $lshout = mysql_query("SELECT shout, shouter, id  FROM ibwf_shouts ORDER BY shtime DESC LIMIT 2");
          while ($shots = mysql_fetch_array($lshout))
          {
          $shnick = getnick_uid($shots[1]);
          if(isonline($shots[1]))
          {
              $bulb="<img src=\"images/onl.gif\" alt=\"On\"/>";
          }
          else{
              $bulb="<img src=\"images/ofl.gif\" alt=\"Off\"/>";
          }    
          $shbox .= "$bulb<i><a href=\"index.php?action=viewuser&who=$shots[1]\">".$shnick."</a></i>: ";
          $fshout = htmlspecialchars($shots[0]);
          
          $fshout = getsmilies($fshout);
          $shout = parsemsg($lshout[0],$sid);
          $user = ulink($lshout[1],$sid);
          $fshout = getbbcode($fshout, $sid);
          $shbox .= $fshout;
          //if (ismod(getuid_sid($sid))){
          //$shbox .= ", <a href=\"modproc.php?action=delsh&shid=$shots[2]\">delete</a>";
          //}
          $shbox .= "<br/>";
          }
          $shbox .= "<a href=\"lists.php?action=shouts\">&#187;post shout</a>";
          
          $shbox .= "</small>";
          return $shbox;
          }
          /////////////////////////////////////////////////////////
          function getshouts($sid){
          $uid=getuid_sid($sid);
          if(!isshoutblocked($uid)){
              echo getshoutbox($sid);
          }
          
          }
          lists.php
          Code:
          /////////////////////////////shouts
          else if($action=="shouts")
          {$pstyle = gettheme($sid);
                echo xhtmlhead("Shout",$pstyle);
            echo "<head><title>$site_name</title>";
                echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style/$theme[0]\" />";
                echo "<meta http-equiv=\"Cache-Control\" content=\"must-revalidate\" />
                <meta http-equiv=\"Cache-Control\" content=\"no-cache\"/>
                <meta name=\"description\" content=\"Riderz wap dating portal and community containg chat, forums, blogs and much more\" />
                <meta name=\"keywords\" content=\"chat, forums, wap, dating, games, blogs, polls, quiz, lavalair, news, rap, goth\" /></head>";
          
                echo "<body>";
            addonline(getuid_sid($sid),"Shouts","lists.php?action=$action");
          
          echo "Add shout(255 chars max):<br/><form action=\"genproc.php?action=shout\" method=\"post\"><textarea id=\"inputText\" name=\"shtxt\"></textarea><br/>";
          echo "<input id=\"inputButton\" type=\"submit\" value=\"Send\"/></form><br/>";
               $who = $_GET["who"];
               if($page=="" || $page<=0)$page=1;
               if($who=="")
               {
               $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_shouts"));
               }else{
               $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_shouts WHERE shouter='".$who."'"));
               }
               $num_items = $noi[0]; //changable
               $items_per_page= 10;
               $num_pages = ceil($num_items/$items_per_page);
               if(($page>$num_pages)&&$page!=1)$page= $num_pages;
               $limit_start = ($page-1)*$items_per_page;
                //changable sql
               if($who =="")
               {
                   $sql = "SELECT id, shout, shouter, shtime  FROM ibwf_shouts ORDER BY shtime DESC LIMIT $limit_start, $items_per_page";
          }else{
               $sql = "SELECT id, shout, shouter, shtime  FROM ibwf_shouts  WHERE shouter='".$who."'ORDER BY shtime DESC LIMIT $limit_start, $items_per_page";
          }
                $items = mysql_query($sql);
               echo mysql_error();
               if(mysql_num_rows($items)>0)
               {
               while ($item = mysql_fetch_array($items))
               {
                   $shnick = getnick_uid($item[2]);
              if(isonline($item[2])){
          $iml = "<img src=\"images/onl.gif\" alt=\"+\"/>";
          }else{
          $iml = "<img src=\"images/ofl.gif\" alt=\"-\"/>";
          }
                  $sht = htmlspecialchars($item[1]);
                   $shdt = date("d/m/Y h:i:s A", $item[3]+(addhours()));
            if(isowner($item[2]))
                 {$lnk = "$iml<a href=\"index.php?action=viewuser&who=$item[2]\"><font color='red'>$shnick</font></a>: $shdt<br/><br/>".getbbcode(getsmilies($sht));}
                 else if(isadmin($item[2]))
                 {$lnk = "$iml<a href=\"index.php?action=viewuser&who=$item[2]\"><font color='purple'>$shnick</font></a>: $shdt<br/><br/>".getbbcode(getsmilies($sht));}
                 else if(ismod($item[2]))
                {$lnk = "$iml<a href=\"index.php?action=viewuser&who=$item[2]\"><font color='blue'>$shnick</font></a>: $shdt<br/><br/>".getbbcode(getsmilies($sht));}
                else
                {$lnk = "$iml<a href=\"index.php?action=viewuser&who=$item[2]\"><font color='yellow'>$shnick</font></a>: $shdt<br/><br/>".getbbcode(getsmilies($sht));}
             
            if(ismod(getuid_sid($sid)))
                 {
                 $dlsh = "[<a href=\"lists.php?action=chilmit&shid=$item[0]\">D</a>]<br/><br/>";
           
                 }else
          if(isowner(getuid_sid($sid)))
                 {
           $dlsh = "[<a href=\"lists.php?action=chiledit&shid=$item[0]\">E</a>]";
          } else{
                   $dlsh = "<br/><br/>";
                 }
                 echo "$lnk $dlsh";
               }
               }
               echo "<p align=\"center\">";
               if($page>1)
               {
                $ppage = $page-1;
                 echo "<a href=\"lists.php?action=shouts&page=$ppage&who=$who\">&#171;PREV</a> ";
               }
               if($page<$num_pages)
               {
                 $npage = $page+1;
                 echo "<a href=\"lists.php?action=shouts&page=$npage&who=$who\">Next&#187;</a>";
               }
               echo "<br/>Page $page of $num_pages<br/>";
               if($num_pages>2)
               {
                 $rets = "<center>Jump to page<form action=\"lists.php\" method=\"get\"><input id=\"inputText\" name=\"page\" format=\"*N\" size=\"3\"/>";
                    $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
                   $rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
               $rets .= "<input type=\"hidden\" name=\"who\" value=\"$who\"/>";
                   $rets .= "<input id=\"inputButton\" type=\"submit\" value=\"Go\"/></form></center>";
                   echo $rets;
               }
               ////// UNTILL HERE >>
          
              echo "<p align=\"center\">";
          
              echo "<a href=\"index.php?action=main&clid=$clid\">";
          
          echo "Back</a><br/>";
          
               echo "<a href=\"index.php?action=main\"><img src=\"images/home.gif\" alt=\"*\"/>";
          echo "Home</a>";
            echo "</p>";
              echo "</body>";
            }
          
          ////////////////////////Edit Shout
          else if($action=="chiledit"){
          $pstyle = gettheme($sid);
                echo xhtmlhead("Shout",$pstyle);
            echo "<head><title>$site_name</title>";
                echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style/$theme[0]\" />";
                echo "<meta http-equiv=\"Cache-Control\" content=\"must-revalidate\" />
                <meta http-equiv=\"Cache-Control\" content=\"no-cache\"/>
                <meta name=\"description\" content=\"Riderz wap dating portal and community containg chat, forums, blogs and much more\" />
                <meta name=\"keywords\" content=\"chat, forums, wap, dating, games, blogs, polls, quiz, lavalair, news, rap, goth\" /></head>";
          
                echo "<body>";
          $shid = $_GET["shid"];
          $getsht = mysql_fetch_array(mysql_query("SELECT shout FROM ibwf_shouts WHERE id = '".$shid."'"));
          echo "<p>";
            echo "<br/>Edit:<br/> ";
          echo "<form action=\"lists.php?action=chileditfin&id=$shid\" method=\"post\"><textarea id=\"inputText\" name=\"shtxt\">$getsht[0]</textarea> ";
          echo "<br/><input id=\"inputButton\" type=\"submit\" value=\"Edit\"/>";
          echo "</form>";
              echo "<a href=\"index.php?action=main\"><img src=\"images/home.gif\" alt=\"*\"/>";
          echo "Home</a>";
            echo "</p>";
              echo "</body>";
            }
          ///////////////////////////////////////Delete shout
          
          else if($action=="chilmit"){
          $pstyle = gettheme($sid);
                echo xhtmlhead("Shout",$pstyle);
            echo "<head><title>$site_name</title>";
                echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style/$theme[0]\" />";
                echo "<meta http-equiv=\"Cache-Control\" content=\"must-revalidate\" />
                <meta http-equiv=\"Cache-Control\" content=\"no-cache\"/>
                <meta name=\"description\" content=\"Riderz wap dating portal and community containg chat, forums, blogs and much more\" />
                <meta name=\"keywords\" content=\"chat, forums, wap, dating, games, blogs, polls, quiz, lavalair, news, rap, goth\" /></head>";
          
                echo "<body>";
          $shid = $_GET["shid"];
          echo "<p align=\"center\">";
          $res = mysql_query("DELETE FROM ibwf_shouts WHERE id ='".$shid."'");
          if($res){
          $sql = mysql_fetch_array(mysql_query("SELECT shout, shouter FROM ibwf_shouts WHERE id='".$shid."'"));
          $modname = getnick_uid(getuid_sid($sid));
          $shouter = getnick_uid($sql[1]);
          $shout = substr("$sql[0]", 0, 30);
          mysql_query("INSERT INTO ibwf_mlog SET action='shouts', details='<b>".$modname."</b> Deleted Shout Number <b>".$shid."</b>', actdt='".time()."'");
          echo "<img src=\"images/ok.gif\" alt=\"O\"/>Shout deleted";
          }else{
          echo "<img src=\"images/notok.gif\" alt=\"X\"/>Database Error";
          }
          echo "<br/><br/>";
              echo "<a href=\"index.php?action=main\"><img src=\"images/home.gif\" alt=\"*\"/>";
          echo "Home</a>";
            echo "</p>";
              echo "</body>";
          
          }
          //////////////////////////Edit Shout/////////////////////////////
          else if($action=="chileditfin"){
          $pstyle = gettheme($sid);
                echo xhtmlhead("Shout",$pstyle);
            echo "<head><title>$site_name</title>";
                echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style/$theme[0]\" />";
                echo "<meta http-equiv=\"Cache-Control\" content=\"must-revalidate\" />
                <meta http-equiv=\"Cache-Control\" content=\"no-cache\"/>
                <meta name=\"description\" content=\"Riderz wap dating portal and community containg chat, forums, blogs and much more\" />
                <meta name=\"keywords\" content=\"chat, forums, wap, dating, games, blogs, polls, quiz, lavalair, news, rap, goth\" /></head>";
          
                echo "<body>";
          $shid = $_GET["id"];
          $shtxt = $_POST["shtxt"];
          echo "<p align=\"center\">";
          $res = mysql_query("UPDATE ibwf_shouts SET shout='".$shtxt."' WHERE id='".$shid."'");
          if($res){
          $sql = mysql_fetch_array(mysql_query("SELECT shout, shouter FROM ibwf_shouts WHERE id='".$shid."'"));
          $modname = getnick_uid(getuid_sid($sid));
          $shouter = getnick_uid($sql[1]);
          $shout = substr("$sql[0]", 0, 30);
          mysql_query("INSERT INTO ibwf_mlog SET action='shouts', details='<b>".$modname."</b> Edited <b>".$shouter."</b>\'s Shout <b><i>".$shout."...</i></b>', actdt='".time()."'");
          echo "<img src=\"images/ok.gif\" alt=\"O\"/>Shout Edited!<br/><br/><a href=\"lists.php?action=shouts\">Shouts</a>";
          }else{
          echo "<img src=\"images/notok.gif\" alt=\"X\"/>Database Error!<br/><br/><a href=\"lists.php?action=shouts\">Shouts</a>";
          }
          echo "<br/><br/>";
              echo "<a href=\"index.php?action=main\"><img src=\"images/home.gif\" alt=\"*\"/>";
          echo "Home</a>";
            echo "</p>";
              echo "</body>";
          }
          this is for 2 shouts and dnt copie and paste its not gona work on normal lava u must edit this to make it work
          Last edited by riderz; 08.11.09, 11:29.
          ________________
          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

          Working...
          X