Results 1 to 4 of 4

Thread: Shoutbox posted user online status.

  1. #1
    Prometheus
    Guest

    Default Shoutbox posted user online status.

    This minor hack displays, in the shout box, users who have posted in the shout box and who are online.

    Everytime a use logs in, if they still have a post in the shout box they will have a little green icon to the left of their name. We have increased our records to a large number so this works out well for us.

    See screen shot. You will see a little green dot in front of an online users name.

    I am including the gif that I used. You can of course use your own gif and/or change the name the new code refers to.

    Code:
    find this in your shoutbox.php    
    
    
    // End of print input box   
    
    and delete everything below it to the end of the file.
    
    
    
    
    Replace the deleted text with this:
    
    
    
    
    
    $query = "SELECT `shoutbox`.`id`, `shoutbox`.`text`, `shoutbox`.`date`, `shoutbox`.`class`, `Profiles`.`NickName`, `Profiles`.`ID` FROM `shoutbox` LEFT JOIN `Profiles` ON `Profiles`.`ID` = `shoutbox`.`id` ORDER BY `shoutbox`.`date` DESC";
    	$shout_res = db_res( $query );
    
    
    
    	while ( $shout_arr = mysql_fetch_array($shout_res) )
        {
    
    $user_is_online = get_user_online_status($shout_arr['ID']);
    
    		if ( $user_is_online )
    		{
    			$offline_online = "<img border=0 src='$site[images]onlinenowsmall.gif'>"; $off_on_text = _t("_Online");
    		}
    
    		else
    		{
    			$offline_online = "";
    		}
    
    		$shout_text = process_smiles( process_line_output( $shout_arr['text'], $maxwordlength) );
    		$content .= "
    			<tr><td title=\"{$shout_arr['date']}\" class=\"{$shout_arr['class']}\">
    				<a target=\"_blank\" href=\"{$site['url']}profile.php?ID={$shout_arr['id']}\" class=\"membermenu\">{$offline_online}{$shout_arr['NickName']}</a>: {$shout_text}
    			</td></tr>";
        }
    
    	$content .= "
    					</table>
    				</td></tr>
    			</table>
    		</form>\n";
    
        return $content;
    }
    
    ?>


    Prometheus
    ps. Almost forgot - though you should know this by now upload the gif to your templates/tmpl_XXX/images_XXX/ folder.
    Attached Images Attached Images
    Last edited by Prometheus; 02-08-2007 at 05:49 PM.

  2. #2

    Join Date
    Sep 2006
    Posts
    431

    Default

    very cool.

    And, have you shared the code for the scroll bar? If so, where is that link? I tried searching modmysite for "scroll bar" but didnt get it lol hmmmmm
    Anyone who has a banana can eat it!

    From 0 to 6.0 in 3.5

  3. #3
    Prometheus
    Guest

    Default

    I just posted it here.

    Scroll bar for Shout box



    You will be embarrassed how easy this is....lol...



    Prometheus

    Oh! Sorry... one more thing you will want to change the default maxrecords to something other than the default in your shoutbox.php to something higher.
    50 or 60 or whatever...depending on your server load and bw etc etc..this will effect your page load and refresh times.
    Last edited by Prometheus; 02-08-2007 at 05:48 PM.

  4. #4
    dave2010
    Guest

    Smile Show users online

    I really like this, but I want to show a scroll list of who's logged in, on the shoutbox any ideas how to do this?

    Thanks









    I am running Dolphin 6.04

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. move the user pic in Shoutbox to RTL?
    By lior in forum Chat / ShoutBox / Instant Messenger (non-Ray)
    Replies: 0
    Last Post: 03-11-2010, 01:43 PM
  2. Removal of Offline / Online Status
    By iscaweb in forum General Troubleshooting
    Replies: 1
    Last Post: 04-01-2008, 02:29 AM
  3. online user expanded
    By null_master in forum Negative Karma
    Replies: 1
    Last Post: 09-08-2007, 12:52 AM
  4. E-mail notification when a user status changes
    By lax33 in forum General Troubleshooting
    Replies: 1
    Last Post: 08-12-2006, 09:41 AM
  5. Split Online User Stats - Male/Female
    By Smoge in forum Wishlist
    Replies: 0
    Last Post: 06-21-2005, 10:43 PM

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
  •