NukeXchange Network

          

Nuke Sites Link Directory
Nuke Fixes · NukeForums · NukeZone Hosting · Nuke Sites · Nuke Skins
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
· Domain Names
. Game Quest
· Learning Linux
. MateMaker
· NukeFixes
· NukeForums
· 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
·Email not sending from forum
·Can't add articles
·Adding 'All' as a selection on Reviews
·php nuke background
·Php nuke one click install on plesk 10.4
·Blocks
·vbulletin migration
·How would I add a clickable link in a Modules Block?
·eregi_replace() is deprecated
·Admin Security login jpeg not showing

read more...
Top10 Links
· 1: Nuke Forums
· 2: Windows Installation: PHP
· 3: PHPNukeFiles
· 4: NukeSkins
· 5: Nuke Templates
· 6: EcomJunk
· 7: MDesign
· 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: born
Today: 0
Yesterday: 0
Overall: 16031

Visitation:
Guests: 209
Members: 0
Total: 209


You are Anonymous user. You can register for free by clicking here
Sponsor Links
Nuke Sites Link Directory
Nuke Sites Link Directory

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
PostPosted: Thu Jul 22, 2010 7:02 am Reply with quote
john10099
Resource Seeker
Resource Seeker
 
Joined: Jul 12, 2010
Posts: 12




interest payable to the 640-460 governement for the soft loan on pkfz a loss or gain to the government? when you purchase a house for say RM500K and part finance it with a loan for twenty years, you F50-521 may have at the end of repayment paid a sum of RM1 million but the house would worth more than RM1miilion at the event of repayment. likewise PKFz may cost 12.5 billion at the end of repayment period but its value may be more than 12.5 billion at that time. if we have not constructed KLCC, it would cost us more now to build. R we not proud of KLCC the twin tower. uncle kit siang please just be fair and not so vengeful. be magnanimous. to be a stateman you got to behave like one. Being an 1Y0-A09 opposition leader does not give you the god damn right to condemn everyone and everything under the skies. Please spend more time teaching your son how to stand up to DSAI first uncle kit siang. i think he needs a "tongkat". At least OTK got the courage to make change 642-515 and be progressive.
View user's profile Send private message
PostPosted: Mon Aug 08, 2011 10:35 pm Reply with quote
Yingchun
Resource Seeker
Resource Seeker
 
Joined: Aug 08, 2011
Posts: 6




thank you for sharing .


coach factory outlet store
coach handbags
Coach outlet
Chanel CoCo
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 65 unique hit(s) in the past 24 hours.
Forums ©
Download the Best Archiver in the World


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.75 Seconds

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