Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: staff shout

  1. #1
    Member icen01's Avatar
    Join Date
    Jul 2009
    Posts
    73
    Thanks
    4
    Thanked 2 Times in 2 Posts
    Rep Power
    4

    Default staff shout

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

  2. #2
    Senior Member spiderwebs's Avatar
    Join Date
    Aug 2009
    Posts
    170
    Thanks
    29
    Thanked 9 Times in 6 Posts
    Rep Power
    4

    Default

    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 [Only registered and activated users can see links. Click Here To Register...]
    ------------------

  3. #3
    Member icen01's Avatar
    Join Date
    Jul 2009
    Posts
    73
    Thanks
    4
    Thanked 2 Times in 2 Posts
    Rep Power
    4

    Default

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

  4. #4
    Super Moderator crazybrumi's Avatar
    Join Date
    Jun 2007
    Location
    Birmingham, England
    Posts
    1,062
    Thanks
    13
    Thanked 17 Times in 12 Posts
    Rep Power
    0

    Default

    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 [Only registered and activated users can see links. Click Here To Register...] for a prices.



    [Only registered and activated users can see links. Click Here To Register...]

  5. #5
    Senior Member spiderwebs's Avatar
    Join Date
    Aug 2009
    Posts
    170
    Thanks
    29
    Thanked 9 Times in 6 Posts
    Rep Power
    4

    Default

    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 [Only registered and activated users can see links. Click Here To Register...]
    ------------------

  6. #6
    Moderator riderz's Avatar
    Join Date
    Mar 2009
    Location
    EMalahleni, South Africa
    Posts
    1,350
    Thanks
    108
    Thanked 391 Times in 128 Posts
    Rep Power
    6

    Default

    this will work good just remember to add the delete oprion to the shout also
    ________________
    Jacques
    [Only registered and activated users can see links. Click Here To Register...]
    [Only registered and activated users can see links. Click Here To Register...]
    [Only registered and activated users can see links. Click Here To Register...]
    __________________

    NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

  7. #7
    Senior Member
    Join Date
    Apr 2009
    Location
    Lipa City, Batangas, Philippines
    Posts
    386
    Thanks
    0
    Thanked 14 Times in 11 Posts
    Rep Power
    5

    Default

    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 at 08:13.

  8. #8
    Member icen01's Avatar
    Join Date
    Jul 2009
    Posts
    73
    Thanks
    4
    Thanked 2 Times in 2 Posts
    Rep Power
    4

    Default

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

  9. #9
    Senior Member spiderwebs's Avatar
    Join Date
    Aug 2009
    Posts
    170
    Thanks
    29
    Thanked 9 Times in 6 Posts
    Rep Power
    4

    Default

    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 [Only registered and activated users can see links. Click Here To Register...]
    ------------------

  10. #10
    Moderator riderz's Avatar
    Join Date
    Mar 2009
    Location
    EMalahleni, South Africa
    Posts
    1,350
    Thanks
    108
    Thanked 391 Times in 128 Posts
    Rep Power
    6

    Default

    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
    ________________
    Jacques
    [Only registered and activated users can see links. Click Here To Register...]
    [Only registered and activated users can see links. Click Here To Register...]
    [Only registered and activated users can see links. Click Here To Register...]
    __________________

    NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. STAFF NICKS in chatrooms
    By honkytonkman in forum Coding Forum
    Replies: 6
    Last Post: 07-09-09, 13:09
  2. SHout box nr 2
    By riderz in forum REQUEST FORUM
    Replies: 4
    Last Post: 20-06-09, 17:50
  3. Email Notification For Staff
    By Rider in forum Coding Forum
    Replies: 9
    Last Post: 05-04-09, 09:10

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

SEO by vBSEO

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19