» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Online Users: 91
0 members and 91 guests
No Members online
Most users ever online was 611, 03-21-2008 at 10:10 PM.
» .::.
Web Hosting - web hosting, dedicated servers and web design services
Online Degree - search for 1000+ online degrees, online colleges & online universities.
tattoo - we are a group of tattoo enthusiasts
Gexa Energy - your absolute best choice in electric service
Texas electricity - save on electric rates
Rimonabant - combat obesity and smoking at the same time
Football Betting - best nfl betting promotions at sportsbook.com.
Poker Chips - Clay and composite poker chips for home games.

Register Now! Contact Us

About this Page
This is a discussion on My who's online block... within the Nuke 6.5 to 6.9 - Blocks forums, part of the PHP-Nuke 6.5 to 6.9 category; Ok, heres some edited code for the who's online block. I just wante dit to say how many people ...



Go Back   Nukemods Forum » PHP-Nuke 6.5 to 6.9 » Nuke 6.5 to 6.9 - Blocks

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-15-2003, 09:02 PM
Junior Member
 
Join Date: Apr 2003
Location: Northern Virginia
Posts: 29
Send a message via AIM to Foolio882 Send a message via MSN to Foolio882 Send a message via Yahoo to Foolio882
My who's online block...
Ok, heres some edited code for the who's online block. I just wante dit to say how many people were on total (and i dont have any registered members, disabled that too) so tell me what you think!



Code:
<?php 

######################################################################## 
# PHP-Nuke Block: Who_is_Online v0.2                                   # 
#                                                                      # 
# Copyright (c) 2003 by C. Wade (wadece@offreviews.com)                # 
#                                                                      # 
######################################################################## 
# This program is free software. You can redistribute it and/or modify # 
# it under the terms of the GNU General Public License as published by # 
# the Free Software Foundation; either version 2 of the License.       # 
######################################################################## 

if (eregi("block-Who_is_Online.php", $_SERVER['PHP_SELF'])) { 
    Header("Location: index.php"); 
    die(); 
} 

global $user, $cookie, $prefix, $db, $user_prefix; 

cookiedecode($user); 
$ip = $_SERVER["REMOTE_ADDR"]; 
$uname = $cookie[1]; 
if (!isset($uname)) { 
    $uname = "$ip"; 
    $guest = 1; 
} 

$nmh = "people looking at OffReviews.com.";

$guest_online_num = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_session WHERE guest='1'")); 
$member_online_num = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_session WHERE guest='0'")); 

$who_online_num = $guest_online_num + $member_online_num; 
$who_online = "<center><font class=\"content\">"._CURRENTLY." $guest_online_num ".$nmh." 
"; 

$content = "$who_online"; 

if (is_user($user)) { 
    if (is_active("Private_Messages")) { 
   $sql = "SELECT user_id FROM ".$user_prefix."_users WHERE username='$uname'"; 
   $result = $db->sql_query($sql); 
   $row = $db->sql_fetchrow($result); 
   $uid = $row[user_id]; 
   $newpm = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_bbprivmsgs WHERE privmsgs_to_userid='$uid' AND (privmsgs_type='5' OR privmsgs_type='1')")); 
    } 
} 

$sql = "SELECT title FROM ".$prefix."_blocks WHERE bkey='online'"; 
$result = $db->sql_query($sql); 
$row = $db->sql_fetchrow($result); 
$title = $row[title]; 

?>
The only problem is, after the word "Currently" there is an annoying comma that i cant seem to get rid of. You can check what i mean by going to... www.offreviews.com and looking on the left side, down a little bit.

Any help would be much appreciated

also, if this has been done before, i apologize, the only people i could find who did it did it by hand and wouldnt tell me how.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-15-2003, 09:13 PM
Senior Member
 
Join Date: Sep 2002
Posts: 2,905
Open your main language file and look for
_CURRENTLY
That definition probably is where the comma is.

Code:
define("_CURRENTLY","There are currently,");
mikem
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-15-2003, 09:36 PM
Junior Member
 
Join Date: Apr 2003
Location: Northern Virginia
Posts: 29
Send a message via AIM to Foolio882 Send a message via MSN to Foolio882 Send a message via Yahoo to Foolio882
thanks man, and as per your sig, i'm gonna tell someone from another website (no shameless plugs) who is having the same problem I had how to fix it... you rule

Edit: spelling, i was tired
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-19-2003, 04:08 AM
Junior Member
 
Join Date: Apr 2003
Posts: 1
re: Block - block-User_Info
hi there,

I've installed new version 6.5 and I'm using BlueBuy Theme,
I wanted to activate new Block - block-User_Info
and everything went fine, aprat from some problems that occured, like :

when you wanna a have a look at profile of Latest User hyperlink is /modules.php?name=Your_Account&op=userinfo&username =adrian

I wanted to change to /modules.php?name=Forums&file=profile&mode=viewprof ile&u=2
but the problem is that in module Your_Account works with username
while in module Forums it works with USER Id

Same thing happens with Online User, when you wanna a have a look at their profile :cry:

anybody has a clue, how could I fix this problem
thank you
I look forward to hear from anybody
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-19-2003, 12:03 PM
Senior Member
 
Join Date: Sep 2002
Posts: 2,905
You'll have to look at a block that does work as intended. LIke one from our site.
You will have to add the calss to the database to grab the user_id number so it can be displayed in a link.

You need somthing like this to call that info from the database.

Code:
   $result = sql_query( "select user_id from $prefix"._users." where username='$username'", $dbi);
   list( $user_id ) = sql_fetch_row( $result, $dbi );
mikem
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
IRC Who's Online Block? Dracarys Nuke 7.x - General 0 08-18-2005 05:34 AM
WHO IS ONLINE BLOCK HELP killerbee Open topics 1 12-13-2004 10:14 PM
Site Visitors Block Online Now Link? jsterling Nuke 6.5 to 6.9 - Blocks 0 08-03-2003 11:43 PM
Site Visitors Block and Hide online status IACOJ Nuke 6.5 to 6.9 - Blocks 5 05-20-2003 11:13 PM
parts of my who's online block just stopped working smallfry Purged Topics 1 03-11-2003 03:34 AM


All times are GMT -5. The time now is 05:20 AM.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.

LinkBacks Enabled by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31