staff shout

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

    staff shout

    can anyone share us this script, only staffmemberz can shout in this staff shoutbox

    #2
    yep i remember this code which me n quik has updated in 2006 with lavalair

    put this in your core.php

    PHP Code:
    function getstaffshout($sid)
    {
      
    $shbox "<small>";
      
    $shbox .= "<b>ShoutBox</b><br/>";
      
    $lshout mysql_fetch_array(mysql_query("SELECT shout, shouter, id  FROM staff_shouts ORDER BY shtime DESC LIMIT 1"));
      
    $shnick getnick_uid($lshout[1]);
      
    $shbox .= "<i><a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$lshout[1]\">".$shnick."</a></i>: ";
      
    $shbox .= htmlspecialchars($lshout[0]);
      
    $shbox .= "<br/>";
      
    $shbox .= "<a href=\"lists.php?action=shouts&amp;sid=$sid\">more</a>, ";
    (ismod(getuid_sid($sid)))
      {
      
    $shbox .= "<a href=\"index.php?action=shout&amp;sid=$sid\">shout</a>";
        
    $shbox .= ", <a href=\"modproc.php?action=delstsh&amp;sid=$sid&amp;shid=$lshout[2]\">delete</a>";
      }
      
    //$shbox .= "<br/>";
      
    $shbox .= "</small>";
      return 
    $shbox;

    put this code where ever you want to get staff shout

    PHP Code:
    echo "<p align=\"center\">";
        echo 
    getstaffshout($sid);
    echo 
    "</p>"
    run this with your sql
    PHP Code:
    -- Table structure for table `staff_shouts`
    -- 

    CREATE TABLE `staff_shouts` (
      `
    idint(100NOT NULL auto_increment,
      `
    shoutvarchar(100NOT NULL default '',
      `
    shouterint(100NOT NULL default '0',
      `
    shtimeint(100NOT NULL default '0',
      
    PRIMARY KEY  (`id`)
    ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=36726 
    E107 Security Team Leader
    Proudly Support AccountLab Plus Billing Software

    Want your Apps to be Developed ??? mail us your requirement at info@csarlab.com
    ------------------

    Comment


      #3
      ? in what part in core.php, where i put that first one!!! :d

      Comment


        #4
        this is for the wapdesire v2.

        Code:
        $main.="<div class=".align().">\n";
        $main.="<b>Staff ShoutBox</b>";
        
        if($page=="" || $page<=0)$page=1;
            $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM shouts"));
            $num_items = $noi[0]; //changable
            $items_per_page= 1;
            $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 shout, uid, id FROM staff_shouts 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))
            {
                       
              $sex=mysql_fetch_array(mysql_query("SELECT sex, image FROM profiles WHERE uid='".$item[1]."'"));
              if($sex[0]=="M"){$color="#0000FF";}
              if($sex[0]=="F"){$color="#FF0066";}
              if($sex[1]!=""){$usersex=getbbcode($sex[1],$sid,1);}
              $shnick=getnick_uid($item[1]);
        
              $main.="<br/><i><a href=\"./profile.php?who=$item[1]&amp;sid=$sid\" style=\"color:$color;\"><b>".$shnick."</b></a></i> -     ".getbbcode($item[0],$sid,1);
              
               if(delshout(getuid_sid($sid),$item[2])){
               $main.=" <a href=\"./staffshoutbox/delete.php?sid=$sid&amp;delete=$item[2]\">
               <img src=\"./images/error.gif\" alt=\"[x]\"/></a>\n";
               }
        
        
            }
        
        
        
        $main.="<br/><a href=\"./staffshoutbox/history.php?sid=$sid\">History</a>\n";
        if(isowner(getuid_sid($sid))||isheadadmin(getuid_sid($sid))||isadmin(getuid_sid($sid))||ismod(getuid_sid($sid))){
        $main.="<br/>Staff ShoutBox Message:<br/>
        <form action=\"./staffshoutbox/shout.php?sid=$sid\" method=\"post\">
        <input name=\"shtxt\" maxlength=\"100\"/><br/>
        <input type=\"submit\" value=\"Add Shout\"/><br/>
        </form></div>";}
        Want something coded email me at sales@webnwaphost.com for a prices.




        Comment


          #5
          icen01 put any where in core.php lol that code is for general lavalair
          E107 Security Team Leader
          Proudly Support AccountLab Plus Billing Software

          Want your Apps to be Developed ??? mail us your requirement at info@csarlab.com
          ------------------

          Comment


            #6
            this will work good just remember to add the delete oprion to the shout also

            Comment


              #7
              why make it hard..i suggest to just display two shoutbox..for staff and for members..in staff's shoutbox, just fetch shouts where perm > 0..just giving my suggestion..i don't have this on my site..add perm row to shoutbox table..when shouting, perm should also be set..fetch shouters perm from users and then update to shoutbox table..
              Last edited by kiLLeR-eyEd_14; 23.09.09, 08:13.
              My Blog: http://jhommark.blogspot.com
              My Facebook: http://www.facebook.com/jhommark
              My Official Site: http://www.undergroundweb.tk
              My Community Site: http://undergroundwap.xtreemhost.com

              Comment


                #8
                wen i put it in my core.php theres an error i got blank page in my site

                Comment


                  #9
                  which code u putted mine? show me ur core.php i will help u
                  E107 Security Team Leader
                  Proudly Support AccountLab Plus Billing Software

                  Want your Apps to be Developed ??? mail us your requirement at info@csarlab.com
                  ------------------

                  Comment


                    #10
                    try this there were one letter left out u must not just copy and paste look how the coding are done
                    Code:
                    function getstaffshout($sid)
                    {
                      $shbox = "<small>";
                      $shbox .= "<b>ShoutBox</b><br/>";
                      $lshout = mysql_fetch_array(mysql_query("SELECT shout, shouter, id  FROM staff_shouts ORDER BY shtime DESC LIMIT 1"));
                      $shnick = getnick_uid($lshout[1]);
                      $shbox .= "<i><a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$lshout[1]\">".$shnick."</a></i>: ";
                      $shbox .= htmlspecialchars($lshout[0]);
                      $shbox .= "<br/>";
                      $shbox .= "<a href=\"lists.php?action=shouts&amp;sid=$sid\">more</a>, ";
                    if (ismod(getuid_sid($sid)))
                      {
                      $shbox .= "<a href=\"index.php?action=shout&amp;sid=$sid\">shout</a>";
                        $shbox .= ", <a href=\"modproc.php?action=delstsh&amp;sid=$sid&amp;shid=$lshout[2]\">delete</a>";
                      }
                      //$shbox .= "<br/>";
                      $shbox .= "</small>";
                      return $shbox;
                    }
                    what ive done with my other site was just took the shout in core and renamed it to staffshout and then on other pages named it shout2 or what ever

                    Comment


                      #11
                      ok.i wil just try mine
                      http://myfacepals.com
                      MYFACEPALS SOCIAL NETWORKsigpic

                      Comment


                        #12
                        thanks f0r da share. .

                        Comment


                          #13
                          While Copying And Pasting U Will get the option but shout will go to the normal one... Here I am to help The Newbies Just Foolow Bellow Steps

                          Copy And Paste it To ur genproc.php
                          PHP Code:
                          //////////////////////////////////////////shout2



                          else if($action=="shout2")

                          {

                            
                          $shtxt $_POST["shtxt"];



                              
                          addonline(getuid_sid($sid),"Shouting","");



                                echo 
                          "<head>";

                                echo 
                          "<title>$sitename</title>";

                                echo 
                          "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";

                                echo 
                          "</head>";

                                echo 
                          "<body>";

                              echo 
                          "<p align=\"center\">";

                              if(
                          getplusses(getuid_sid($sid))<75)

                              {

                              echo 
                          "<img src=\"../images/notok.gif\" alt=\"X\"/>You should have at least 75 plusses to shout!<br/><br/>";

                              echo 
                          "<a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";

                              echo 
                          "</p>";

                              echo 
                          "</body>";

                              echo 
                          "</html>";

                              exit();

                              }

                              if(
                          istrashed(getuid_sid($sid)))

                              {

                              echo 
                          "<img src=\"../images/notok.gif\" alt=\"X\"/><br/>Unknown error cannot shout!<br/>please try again later...<br/><br/>";

                              echo 
                          "<a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";

                              echo 
                          "</p>";

                              echo 
                          "</body>";

                              echo 
                          "</html>";

                              exit();

                              }else{

                              
                          $shtm time();

                              if(!
                          isblocked($shtxt,$uid))

                              {

                              
                          $res mysql_query("INSERT INTO staff_shouts SET shout='".$shtxt."', shouter='".$uid."', shtime='".$shtm."'");



                                  
                          $usts mysql_fetch_array(mysql_query("SELECT shouts, plusses FROM ibwf_users WHERE id='".$uid."'"));

                                  
                          $ups $usts[0]+1;

                                  
                          $upl $usts[1]+1;

                                  
                          mysql_query("UPDATE ibwf_users SET shouts='".$ups."', plusses='".$upl."' WHERE id='".$uid."'");



                              echo 
                          "<img src=\"../images/ok.gif\" alt=\"O\"/>Shout added successfully";

                              }else{

                              
                          $bantime time() + (30*24*60*60);

                              echo 
                          "<img src=\"../images/notok.gif\" alt=\"X\"/>";

                              echo 
                          "Can't Post Shout Message<br/><br/>";

                              echo 
                          "You just shouted a link to one of the crapiest sites on earth<br/> The members of these sites spam here a lot, so go to that site and stay there if you don't like it here<br/> as a result of your stupid action:<br/>1. you have lost your sheild<br/>2. you have lost all your plusses<br/>3. You are BANNED!";

                                  
                          $user getnick_sid($sid);

                              
                          mysql_query("INSERT INTO ibwf_mlog SET action='autoban', details='<b>Wap Desire</b> auto banned $user for spamming shoutbox', actdt='".time()."'");

                              
                          mysql_query("INSERT INTO ibwf_penalties SET uid='".$uid."', penalty='1', exid='2', timeto='".$bantime."', pnreas='Banned: Automatic Ban for spamming for a crap site'");

                              
                          mysql_query("UPDATE ibwf_users SET plusses='0', shield='0' WHERE id='".$uid."'");

                              echo 
                          "</body>";

                              echo 
                          "</html>";

                              exit;

                            }

                          }



                              echo 
                          "<br/><br/><a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";

                              echo 
                          "</p>";

                              echo 
                          "</body>";



                          Enter This To Ur Core.php
                          PHP Code:
                          /////////////////////////////////////////////function Shoutbox staff
                          function getstaffshout($sid)
                          {
                             
                          $shbox .= "<form action=\"genproc.php?action=shout2&amp;sid=$sid\" method=\"post\"><center>";
                            
                          $shbox .= "<b><div>-= Staff Shout =-</div></b><br/>";
                            
                          $lshout mysql_fetch_array(mysql_query("SELECT shout, shouter, id  FROM staff_shouts ORDER BY shtime DESC LIMIT 1"));
                            
                          $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>";
                            
                          $shbox .= "<br/>ShoutBox Message:<br/><input name=\"shtxt\" maxlength=\"100\"/><br/>";
                            
                          $shbox .= "<input type=\"Submit\" name=\"shout\" Value=\"Add Shout\"></center></form>";
                            }
                            return 
                          $shbox;

                          This To Ur index.php

                          PHP Code:
                          echo "<p align=\"center\">";
                            echo 
                          getstaffshout($sid);
                            echo 
                          "</p>"
                          Run the sql
                          PHP Code:
                          -- Table structure for table `staff_shouts`
                          -- 

                          CREATE TABLE `staff_shouts` (
                            `
                          idint(100NOT NULL auto_increment,
                            `
                          shoutvarchar(100NOT NULL default '',
                            `
                          shouterint(100NOT NULL default '0',
                            `
                          shtimeint(100NOT NULL default '0',
                            
                          PRIMARY KEY  (`id`)
                          ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=36726 
                          Its Working fine with me...
                          ImPoSsIbLe iS nOthInG aS ImPoSsible ItSelF SaYs "I M POSSIBLE"

                          Comment

                          Working...
                          X