this dont show 3 shouts why ??

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

    this dont show 3 shouts why ??

    Code:
    function getshoutbox($sid)
    {
       $shbox .= "<form action=\"genproc.php?action=shout&amp;sid=$sid\" method=\"post\"><center>";
      $shbox .= "<b></b>";
      $lshout = mysql_fetch_array(mysql_query("SELECT shout, shouter, id FROM ibwf_shouts ORDER BY shtime DESC LIMIT 3"));
      $shnick = getnick_uid($lshout[1]);
      $shbox .= "<i><a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$lshout[1]\">".$shnick."</a></i> - ";
      $text = parsepm($lshout[0], $sid);
      $shbox .= $text;
      $shbox .= "<br/>";
      $shbox .= "<a href=\"lists.php?action=shouts&amp;sid=$sid\">more</a>";
      if (ismod(getuid_sid($sid)))
      {
      $shbox .= " <a href=\"modproc.php?action=delsh&amp;sid=$sid&amp;shid=$lshout[2]\">delete</a>";
      }
      if(getplusses(getuid_sid($sid))<75)
      {
      $shbox .= "<br/>You need at least 75 plusses to shout!";
      }else{
      $shbox .= "<br/>ShoutBox Message:<br/><input name=\"shtxt\" maxlength=\"100\"/><br/>";
      $shbox .= "<input type=\"Submit\" name=\"shout\" Value=\"Add Shout\"></center></form>";
      }
      return $shbox;
    }
    anyone help
    Wapchat4u


    Topsites4u

    #2
    Because you havent looped your results:

    PHP Code:
    function getshoutbox($sid)
    {
       
    $shbox .= "<form action=\"genproc.php?action=shout&amp;sid=$sid\" method=\"post\"><center>";
      
    $shbox .= "<b></b>";
    while(
    $lshout=mysql_fetch_array(mysql_query("SELECT shout, shouter, id FROM ibwf_shouts ORDER BY shtime DESC LIMIT 3"))){
    $shnick getnick_uid($lshout[1]);
      
    $shbox .= "<i><a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$lshout[1]\">".$shnick."</a></i> - ";
      
    $text parsepm($lshout[0], $sid);
      
    $shbox .= $text;
      
    $shbox .= "<br/>";
    }
     
    $shbox .= "<a href=\"lists.php?action=shouts&amp;sid=$sid\">more</a>";
      if (
    ismod(getuid_sid($sid)))
      {
      
    $shbox .= " <a href=\"modproc.php?action=delsh&amp;sid=$sid&amp;shid=$lshout[2]\">delete</a>";
      }
      if(
    getplusses(getuid_sid($sid))<75)
      {
      
    $shbox .= "<br/>You need at least 75 plusses to shout!";
      }else{
      
    $shbox .= "<br/>ShoutBox Message:<br/><input name=\"shtxt\" maxlength=\"100\"/><br/>";
      
    $shbox .= "<input type=\"Submit\" name=\"shout\" Value=\"Add Shout\"></center></form>";
      }
      return 
    $shbox;

    Comment


      #3
      wont load the main page now .

      Added after 11 minutes:

      Fatal error: Maximum execution time of 30 seconds exceeded in /home/public_html/web/core.php on line 3204

      which is my bbcode function. .

      ignore above its any line that incorperates the shoutbox . wont load fullstop
      Last edited by nclemale36; 11.09.10, 20:30.
      Wapchat4u


      Topsites4u

      Comment


        #4
        oops infintive loop lol
        PHP Code:
        function getshoutbox($sid

           
        $shbox .= "<form action=\"genproc.php?action=shout&amp;sid=$sid\" method=\"post\"><center>"
          
        $shbox .= "<b></b>"
        $data mysql_query("SELECT shout, shouter, id FROM ibwf_shouts ORDER BY shtime DESC LIMIT 3");
        while(
        $lshout=mysql_fetch_array($data)){ 
        $shnick getnick_uid($lshout[1]); 
          
        $shbox .= "<i><a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$lshout[1]\">".$shnick."</a></i> - "
          
        $text parsepm($lshout[0], $sid); 
          
        $shbox .= $text
          
        $shbox .= "<br/>"

         
        $shbox .= "<a href=\"lists.php?action=shouts&amp;sid=$sid\">more</a>"
          if (
        ismod(getuid_sid($sid))) 
          { 
          
        $shbox .= " <a href=\"modproc.php?action=delsh&amp;sid=$sid&amp;shid=$lshout[2]\">delete</a>"
          } 
          if(
        getplusses(getuid_sid($sid))<75
          { 
          
        $shbox .= "<br/>You need at least 75 plusses to shout!"
          }else{ 
          
        $shbox .= "<br/>ShoutBox Message:<br/><input name=\"shtxt\" maxlength=\"100\"/><br/>"
          
        $shbox .= "<input type=\"Submit\" name=\"shout\" Value=\"Add Shout\"></center></form>"
          } 
          return 
        $shbox

        Comment


          #5
          cheers mate but one small prob the delete shout dont work and which one would it delete if it did ?
          Wapchat4u


          Topsites4u

          Comment


            #6
            shoud be working
            PHP Code:
            $data mysql_query("SELECT shout, shouter, id FROM ibwf_shouts ORDER BY shtime DESC LIMIT 3"); 
            while(
            $lshout=mysql_fetch_array($data)){ 
            PHP Code:
             
              $shbox 
            .= " <a href=\"modproc.php?action=delsh&amp;sid=$sid&amp;shid=$lshout[2]\">delete</a>"
            Nous Ne Dansos Pas, Nous Sommes Le Danse.!

            Comment


              #7
              yeah the:
              $shbox .= " <a href=\"modproc.php?action=delsh&amp;sid=$sid&amp;s hid=$lshout[2]\">delete</a>";
              need putting inside the while($lshout=mysql_fetch_array($data)){
              so it knows which shout to delete otherwize you will be only deleting last shout

              Comment

              Working...
              X