Nukemods Forum  
» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Online Users: 55
1 members and 54 guests
health46ev26
Most users ever online was 611, 03-21-2008 at 10:10 PM.
» .::.
» .:.

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

Reply
 
LinkBack Thread Tools Display Modes
need help creating/modifying a block
Old
  (#1 (permalink))
Junior Member
 
Status: Offline
Posts: 46
Join Date: Jan 2003
need help creating/modifying a block - 04-11-2003, 10:16 AM

i need help creating a block or even modifying the "who is online" block
i need to see who's online [ by their username] under the line that says There are 5 members online

Code:
$member_online_num = $db->sql_numrows($result);
that shows the number of the members online i guess

what about their username ?
Code:
$content .= "<form action=\"modules.php?name=Your_Account\" method=\"post\">";

if (is_user($user)) {
    $content .= "
<img src=\"images/blocks/group-4.gif\" height=\"14\" width=\"17\"> "._BWEL.", $uname.
\n<hr>\n";
    $sql = "SELECT user_id FROM $user_prefix"._users." WHERE username='$uname'";
    $result = $db->sql_query($sql);
    $row = $db->sql_fetchrow($result);
thats it ? i would appreciate it very much
thanks =) :wink:
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#2 (permalink))
Senior Member
 
Status: Offline
Posts: 2,905
Join Date: Sep 2002
04-11-2003, 11:21 AM

are you taling about how our User Menu block shows the users names?
If so, then why not download ours and check the code in it to see what you need.
There is some SQL calls that need to be included in order for it to list the users online and their names.

mikem
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#3 (permalink))
Junior Member
 
Status: Offline
Posts: 46
Join Date: Jan 2003
04-11-2003, 11:45 AM

thats why i need help for
i need to help me call the SQL queries ..
i also need the SQL queries so that i can make a block with my Active Avatar !
its not that hard i guess
thats what i have but nothing comes out ,empty block it says
Code:
<?php
require_once("mainfile.php");
if ( ereg( "(http)", $userinfo[user_avatar]) ) 
   { 
$content .= "
<center><img src=\"$userinfo[user_avatar]\">
</center>\n"; 
} 
else 
if ($userinfo[user_avatar]) 
{ 
$content .= "
<center><img src=\"modules/Forums/images/avatars/$userinfo[user_avatar]\" alt=\"\"></center>
\n"; 
   }
	?>
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#4 (permalink))
Senior Member
 
Status: Offline
Posts: 2,905
Join Date: Sep 2002
04-11-2003, 12:16 PM

Code:
<?php 
require_once("mainfile.php"); 
global $user, $cookie, $prefix, $anonymous, $dbi, $user_prefix, $username, $stop, $module_name, $redirect, $mode, $t, $f, $admin, $userinfo;

getusrinfo($user);

if ( ereg( "(http)", $userinfo[user_avatar]) ) 
   { 
$content .= "
<center><img src=\"$userinfo[user_avatar]\">
</center>\n"; 
} 
else 
if ($userinfo[user_avatar]) 
{ 
$content .= "
<center><img src=\"modules/Forums/images/avatars/$userinfo[user_avatar]\" alt=\"\"></center>
\n"; 
   } 
   ?>
try that
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#5 (permalink))
Junior Member
 
Status: Offline
Posts: 46
Join Date: Jan 2003
04-11-2003, 02:15 PM

is there a block that shows the 10 Latest Active REPLYS ? not topics .. like the Center Up but a block to the left ? ops:
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#6 (permalink))
Junior Member
 
Status: Offline
Posts: 46
Join Date: Jan 2003
04-13-2003, 04:44 AM

Code:
<?php

global $prefix, $dbi, $sitename;

$result = sql_query("SELECT ".$prefix."_topicsbb.topic_id, ".$prefix."_topicsbb.topic_title,".$prefix."_topicsbb.forum_id,".$prefix."_forums.forum_id FROM ".$prefix."_topicsbb,".$prefix."_forums where ".$prefix."_topicsbb.forum_id=".$prefix."_forums.forum_id and auth_view=0 ORDER BY ".$prefix."_topicsbb.topic_last_post_id DESC LIMIT 10", $dbi);
$content = "
";
while(list($topic_id, $topic_title) = sql_fetch_row($result, $dbi)) {
$content .= "<big>&</big><a href=\"modules.php?name=Forums&file=viewtopic&t=$topic_id\">$topic_title</a>
";
}
$content .= "
<center>[ <a href=\"modules.php?name=Forums\">$sitename Forums</a> ]</center>";

?>
i've done this but an error comes up

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/moh-ogan/public_html/includes/sql_layer.php on line 286
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
eh ?
Old
  (#7 (permalink))
Junior Member
 
Status: Offline
Posts: 46
Join Date: Jan 2003
eh ? - 04-17-2003, 06:30 AM

eh ?
   
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
Modifying a a theme? Elethil Nuke 7.x - Themes 9 12-17-2006 06:59 PM
Request - Creating a block ... Theberge43 Nuke 7.x - Blocks 0 07-29-2005 02:06 PM
question about creating this block sorn Nuke 7.x - Blocks 3 05-21-2005 08:36 AM
Help creating block slakka Nuke 6.5 to 6.9 - Blocks 0 06-14-2003 04:24 PM
modifying smartdark machinegod Theme packs 5 03-06-2003 06:15 PM




vBulletin Skin developed by: vBStyles.com


LinkBacks Enabled by vBSEO 3.3.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