NukeXchange Network

          

Nuke Sites Link Directory
Nuke Fixes · NukeForums · NukeZone Hosting · NukeUnited · Nuke Sites · Nuke Skins · NukeLance
Nuke Resources
 :: Home  :: Downloads  :: Your Account  :: Forums  :: Advertise :: 
Login or Register
Main Menu
General
 Main
 AvantGo
 Banner_Clients
 cfaq
 Donations
 Downloads
 Forums
 Members_List
 Private_Messages
 Search
 Stories_Archive
 Submit_News
 Surveys
 Topics
 Web_Links
 Your_Account

Your Account
 Login
 Register
 Lost Pass

Modules
Quick Links
· CMS Focus
· Domain Names
. Game Quest
· Learning Linux
. MateMaker
· NukeFixes
· NukeForums
· NukeLance
· Nuke Sites
· Nuke Skins
· NukeZone Hosting
. SearchDevil
Other Options

Download Resources
· Nuke Downloads
· Add a Link
· New Files
· Top Rated
· Most Popular

Web Site Resources
· Nuke Sites
· Add A Site
· New Sites
· Top Rated
· Most Popular

Support
· NukeZone Hosting
· NukeSkins.com
· NukeForums.com
· phpnuke.org
· NukeFixes.com
Information
NukeForums
·Please Help Question about Siggy's
·time doesn't appear when I post a new
·Install problems
·Security about Embeding into news articles.
·I get nomail in my phpnuke :(
·Hi My name is Rukasuzu, where is the introduction?
·I get an bug TinyMCE_basic_getEditorTemplate?
·MYSQL ERROR HELP ME PLEASE
·Creating a Gaming PHP Nuke Site - Newbie
·Issues with GIF Images

read more...
Top10 Links
· 1: Nuke Forums
· 2: PHPNukeFiles
· 3: NukeSkins
· 4: Nuke Templates
· 5: EcomJunk
· 6: MDesign
· 7: Windows Installation: PHP
· 8: FLASH-FOR-NUKE
· 9: Dezina
· 10: Global Dream News Sharing Portal!
Site Visitors
User Login:

Nickname:
Password:
Security Code: Security Code
Type Security Code Here:

Members List Membership:
Latest: churchy
Today: 3
Yesterday: 1
Overall: 15033

Visitation:
Guests: 452
Members: 1
Total: 453


You are Anonymous user. You can register for free by clicking here
Sponsor Links
Need to find your IP fast?
Need to find your IP fast?

NukeResources :: View topic - Chatserv tell me how to make this
NukeResources Forum Index

NukeResources Forum Index -> Bug Fixes -> Chatserv tell me how to make this
Post new topic  Reply to topic    View previous topic :: View next topic 
Chatserv tell me how to make this
PostPosted: Sun Apr 25, 2004 12:29 am Reply with quote
siyawash
Resource Newbie
Resource Newbie
 
Joined: Jan 16, 2004
Posts: 41




Hi

Chatserv bro i know you can do this Smile
I want to make a block which will show logged in members their buddy list.
For example if a member is logged in then he see two options like this.
Online Buddies:
- buddy 1
- buddy 2

Offline Buddies:
- buddy 3
- buddy 4

Something like that would be awesome. I have included the code below which I think is made to show online/offline buddies through forum. Could you please help me set it up for a phpnuke block.
Code:

$current_time = time ();
$session_time = 300;
$end_session = $current_time - $session_time;

$sql = "SELECT b.buddy_id, u.username AS buddy_name, u.user_email AS buddy_email, u.user_viewemail, u.user_allow_viewonline, u.user_session_time
                FROM ".$prefix."_bbbuddies b, ".$prefix."_users u
                WHERE b.user_id = " . $userdata['user_id'] . "
                        AND u.user_id = b.buddy_id
                ORDER BY u.username ASC";


$buddies_online = array ();
$buddies_offline = array ();
while ($row = $db->sql_fetchrow ($result)) {
        if (($row['user_allow_viewonline'] || $userdata['user_level'] == ADMIN) && ($row['user_session_time'] >= $end_session)) {
                $buddies_online[] = $row;
                }
        else {
                $buddies_offline[] = $row;
                }
        }


//
// Dump vars to template
//


//
// Okay, let's build the online buddies list
//
if (count($buddies_online) == 0) {
        }
else {
        for ($i = 0; $i < count($buddies_online); $i++) {
                $buddy_id = $buddies_online[$i]['buddy_id'];
                $buddy_name = $buddies_online[$i]['buddy_name'];
                $buddy_profile = append_sid ("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=$buddy_id");
                $buddy_url = '<a href="' . $buddy_profile . '">' . $buddy_name . '</a>';

                $buddy_temp_url = append_sid ("privmsg.$phpEx?mode=post&amp;" . POST_USERS_URL . "=$buddy_id");
                $buddy_pm_img = '<a href="' . $buddy_temp_url . '"><img src="' . $images['icon_pm'] . '" alt="' . $lang['Send_private_message'] . '" title="' . $lang['Send_private_message'] . '" border="0" /></a>';
                $buddy_pm = '<a href="' . $buddy_temp_url . '">' . $lang['Send_private_message'] . '</a>';

                $buddy_temp_url = append_sid ("privmsg.$phpEx?buddy_action=remove&amp;b=$buddy_id");
                $buddy_remove_img = '<a href="' . $buddy_temp_url . '"><img src="' . $images['icon_delpost'] . '" alt="' . $lang['Delete'] . '" title="' . $lang['Delete'] . '" border="0" /></a>';
                $buddy_remove = '<a href="' . $buddy_temp_url . '">' . $lang['Delete'] . '</a>';

                $row_color = (!($i % 2)) ? $theme['td_color1'] : $theme['td_color2'];
                $row_class = (!($i % 2)) ? $theme['td_class1'] : $theme['td_class2'];

                $template->assign_block_vars ('buddy_list.listrow_online',
                        array (
                                'ROW_COLOR' => '#' . $row_color,
                                'ROW_CLASS' => $row_class,
                                'BUDDY_URL' => $buddy_url,
                                'PM_IMG' => $buddy_pm_img,
                                'PM' => $buddy_pm,
                                'REMOVE_IMG' => $buddy_remove_img,
                                'REMOVE' => $buddy_remove
                                )
                        );
                }
        }


//
// Okay, let's build the offline buddies list
//
if (count($buddies_offline) == 0) {
        }
else {
        for ($i = 0; $i < count($buddies_offline); $i++) {
                $buddy_id = $buddies_offline[$i]['buddy_id'];
                $buddy_name = $buddies_offline[$i]['buddy_name'];
                $buddy_email = $buddies_offline[$i]['buddy_email'];
                $buddy_profile = append_sid ("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=$buddy_id");
                $buddy_url = '<a href="' . $buddy_profile . '">' . $buddy_name . '</a>';

                $buddy_temp_url = append_sid ("privmsg.$phpEx?mode=post&amp;" . POST_USERS_URL . "=$buddy_id");
                $buddy_pm_img = '<a href="' . $buddy_temp_url . '"><img src="' . $images['icon_pm'] . '" alt="' . $lang['Send_private_message'] . '" title="' . $lang['Send_private_message'] . '" border="0" /></a>';
                $buddy_pm = '<a href="' . $buddy_temp_url . '">' . $lang['Send_private_message'] . '</a>';

                $buddy_temp_url = append_sid ("privmsg.$phpEx?buddy_action=remove&amp;b=$buddy_id");
                $buddy_remove_img = '<a href="' . $buddy_temp_url . '"><img src="' . $images['icon_delpost'] . '" alt="' . $lang['Delete'] . '" title="' . $lang['Delete'] . '" border="0" /></a>';
                $buddy_remove = '<a href="' . $buddy_temp_url . '">' . $lang['Delete'] . '</a>';

                $row_color = (!($i % 2)) ? $theme['td_color1'] : $theme['td_color2'];
                $row_class = (!($i % 2)) ? $theme['td_class1'] : $theme['td_class2'];

                $template->assign_block_vars ('buddy_list.listrow_offline',
                        array (
                                'ROW_COLOR' => '#' . $row_color,
                                'ROW_CLASS' => $row_class,
                                'BUDDY_URL' => $buddy_url,
                                'PM_IMG' => $buddy_pm_img,
                                'PM' => $buddy_pm,
                                'REMOVE_IMG' => $buddy_remove_img,
                                'REMOVE' => $buddy_remove
                                )
                        );
                }
        }


Thanks, Siyawash
View user's profile Send private message
PostPosted: Fri May 07, 2004 9:12 pm Reply with quote
siyawash
Resource Newbie
Resource Newbie
 
Joined: Jan 16, 2004
Posts: 41




Anyone pleaseeeeeee Sad
View user's profile Send private message
Chatserv tell me how to make this
 NukeResources Forum Index -> Bug Fixes
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 4 Hours  
Page 1 of 1  

  
  
 Post new topic  Reply to topic     



Powered by phpBB © 2001-2005 phpBB Group.     Theme created by Vjacheslav Trushkin.
There have been 174 unique hit(s) in the past 24 hours.
Forums ©
Nuke Sites Link Directory


Best viewed with a Browser
All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2001 - 2007 by NukeResources.com
You can syndicate our news using the file .backend.php or ultramode.txt
PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.50 Seconds

:: Eos phpbb2 style by Cyberalien :: PHP-Nuke theme by www.nukemods.com ::