help me on this coding...

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

    help me on this coding...

    can any one plz tel me how can i show 2 shouts in my site..
    Last edited by DiL; 08.06.10, 17:27.
    Sandeep DiL (INDIAN)




    #2
    Originally posted by DiL View Post
    can any one plz tel me how can i show 2 shouts in my site..
    how hard it can be to copy/paste entire shout code ?
    if it's current code like $shout...
    copy all and make it $shout1...
    want to display three of them??
    copy/paste one more time
    and make it like $shout2...

    you can also simply make one public
    (or two.. one limited and one open for all)
    and another one only for mods and admins...
    It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt.
    ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ !
    ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
    キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

    Comment


      #3
      metulj thx but whenevr i try to chage limits from 1 to 2 than its showing me errors.........
      Sandeep DiL (INDIAN)



      Comment


        #4
        use do while statement lol
        or while loop
        com site: http://vampist.net
        download site: http://wapdloads.net
        fb: http://www.facebook.com/pmplx

        Comment


          #5
          hey you pls learn to copy n past. neway here!! one thing i disabled the bbcodes.. enable it yo self

          to index.php

          PHP Code:
          echo getshoutbox($sid); 
          replace the function in core.php

          PHP Code:
          function getshoutbox($sid){
          $shbox "";
          $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=\"\"/>";
          }
          else{
              
          $bulb="<img src=\"../images/ofl.gif\" alt=\"\"/>";
          }
          //////////////////////////////////////////////////////////////////// add sex to shouts code
          $nick getnick_uid($sid);
          $who $_GET['who'];
          $action $_GET['action'];
          $uid getuid_sid($sid);

          $usex mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE id='".$uid."'"));
          if(
          $usex[0]=='M'){
          $usex "";
          }else if(
          $usex[0]=='F'){
          $usex "";
          }

          $shbox .= "$bulb  <i>$usex<a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$shots[1]\">".$shnick."</a></i>: ";
          $fshout htmlspecialchars($shots[0]);



          $fshout getsmilies($fshout);
          //$fshout = parsepm($fshout, $sid);
          $shbox .= $fshout;
          if (
          ismod(getuid_sid($sid))){
          $shbox .= " <a href=\"modproc.php?action=delsh&amp;sid=$sid&amp;shid=$shots[2]\">[x]</a>";
          }
          $shbox .= "<br/>";
          }
          if (
          isonline(getuid_sid($sid))){
              
          $shbox .= "<a href=\"index.php?action=shout&amp;sid=$sid\">Shout </a>";
            
          $shbox .= "|";
            
          $shbox .= "<a href=\"lists.php?action=shouts&amp;sid=$sid\"> More</a>";
          }else{
          $shbox .= "<a href=\"index.php?action=shout&amp;sid=$sid\">Shout</a>";
            
          $shbox .= "|";
            
          $shbox .= "<a href=\"lists.php?action=shouts&amp;sid=$sid\">More</a>";
          }
          $shbox .= "";
          return 
          $shbox;



          ....................................
          http://photomag.lk/
          ....................................

          Comment


            #6
            2 shouts lava

            hey you pls learn to copy n past. neway here!! one thing i disabled the bbcodes.. enable it yo self

            to index.php

            PHP Code:
            echo getshoutbox($sid); 
            replace the function in core.php

            PHP Code:
            function getshoutbox($sid){
            $shbox "";
            $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=\"\"/>";
            }
            else{
                
            $bulb="<img src=\"../images/ofl.gif\" alt=\"\"/>";
            }
            //////////////////////////////////////////////////////////////////// add sex to shouts code
            $nick getnick_uid($sid);
            $who $_GET['who'];
            $action $_GET['action'];
            $uid getuid_sid($sid);

            $usex mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE id='".$uid."'"));
            if(
            $usex[0]=='M'){
            $usex "";
            }else if(
            $usex[0]=='F'){
            $usex "";
            }

            $shbox .= "$bulb  <i>$usex<a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$shots[1]\">".$shnick."</a></i>: ";
            $fshout htmlspecialchars($shots[0]);



            $fshout getsmilies($fshout);
            //$fshout = parsepm($fshout, $sid);
            $shbox .= $fshout;
            if (
            ismod(getuid_sid($sid))){
            $shbox .= " <a href=\"modproc.php?action=delsh&amp;sid=$sid&amp;shid=$shots[2]\">[x]</a>";
            }
            $shbox .= "<br/>";
            }
            if (
            isonline(getuid_sid($sid))){
                
            $shbox .= "<a href=\"index.php?action=shout&amp;sid=$sid\">Shout </a>";
              
            $shbox .= "|";
              
            $shbox .= "<a href=\"lists.php?action=shouts&amp;sid=$sid\"> More</a>";
            }else{
            $shbox .= "<a href=\"index.php?action=shout&amp;sid=$sid\">Shout</a>";
              
            $shbox .= "|";
              
            $shbox .= "<a href=\"lists.php?action=shouts&amp;sid=$sid\">More</a>";
            }
            $shbox .= "";
            return 
            $shbox;



            ....................................
            http://photomag.lk/
            ....................................

            Comment

            Working...
            X