Nukemods Forum  
» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Online Users: 89
7 members and 82 guests
breakinguptomak, cycwcwlinlt2gti, danansceclasqe6, denzk9tistw6iwp, horbd4aseracidn, robaaerteqjc6xs, ssefqarchmar2dx
Most users ever online was 611, 03-21-2008 at 11:10 PM.
» .::.
tattoo fonts
http://www.checkoutmyink.com/category/tattoo-fonts-tattoo

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

Reply
 
LinkBack Thread Tools Display Modes
User Info Block doesnt display users registered today or Yes
Old
  (#1 (permalink))
Junior Member
 
Status: Offline
Posts: 4
Join Date: Jun 2003
Location: Portugal
User Info Block doesnt display users registered today or Yes - 06-22-2003, 12:17 PM

Hi there!

This is my first post here in Nukemods.com and I tryed to find some post related to my problem but I didn't find it, so I guess this is the first time someone posts this problem...

It's regarding the User Info Block (with Security Check).
What happens is that mine is not working properly... I mean when someone registers, it appears the name in "Latest" (so far so good), but what is not working is the "New Today" and "New Yesterday", because they are always 0 (zero).

In the MS Site Info module I have installed I have the fields correctly, but in the User Info Block its always zero!!

Can anyone give some help please?
I already went to 2 forums and no one was able (or willing) to give me a solution for my problem... :cry:

Thanks in advance! :wink:


_____________________________________________

www.dancefactor.net

Dance Music Community Website
_____________________________________________
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#2 (permalink))
Moderator
 
Status: Offline
Posts: 737
Join Date: Nov 2002
06-22-2003, 01:56 PM

This is the first time I've ever heard of this, but lets poke around a bit and see if we can't get it worked out.

Which user info block are you using? There are several with the security image. Does it show the users av?

When a user registers does it go through the forum or through Nuke?
   
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: 4
Join Date: Jun 2003
Location: Portugal
06-22-2003, 02:38 PM

Ok, so this one doesn't show the users avatar and in the registering process is goes through Nuke...

You can see it working (or not working properly) in my website: www.dancefactor.net

Thanks! :wink:


_____________________________________________

www.dancefactor.net

Dance Music Community Website
_____________________________________________
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#4 (permalink))
Moderator
 
Status: Offline
Posts: 737
Join Date: Nov 2002
06-22-2003, 02:48 PM

Ah yes I see the problem.

There are a couple user info blocks available here, why don't you try to install one of them and see if it fixes it. Otherwise can you post the code to the block?

It would appear that it isn't pulling the necessary info.
   
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: 4
Join Date: Jun 2003
Location: Portugal
06-22-2003, 03:17 PM

Sure, no problem.

Here it is:

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

$content = "";

global $user, $cookie, $prefix, $user_prefix, $db, $anonymous, $mode, $t, $f, $redirect, $random_num;
cookiedecode($user);
$uname = $cookie[1];

$sql = "SELECT username FROM $user_prefix"._users." ORDER BY user_id DESC LIMIT 0,1";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$lastuser = $row[username];
$numrows = $db->sql_numrows($db->sql_query("SELECT user_id FROM $user_prefix"._users.""));

$sql = "SELECT uname, guest FROM $prefix"._session." WHERE guest=0";
$result = $db->sql_query($sql);
$member_online_num = $db->sql_numrows($result);
$who_online_now = "";
$i = 1;
while ($session = $db->sql_fetchrow($result)) {
if (isset($session["guest"]) and $session["guest"] == 0) {
if ($i < 10) {
$who_online_now .= "0$i:&<A HREF=\"modules.php?name=Your_Account&op=userinfo&u sername=$session[uname]\">$session[uname]</a>
\n";
} else {
$who_online_now .= "$i:&<A HREF=\"modules.php?name=Your_Account&op=userinfo&u sername=$session[uname]\">$session[uname]</a>
\n";
}
$who_online_now .= ($i != $member_online_num ? " " : "");
$i++;
}
}
$Today = getdate();
//Formatting Current Date
$month = $Today['month'];
$mday = $Today['mday'];
$year = $Today['year'];
//Formatting Previous Date
$pmonth = $Today['month'];
$pmday = $Today['mday'];
$pmday = $mday-1;
$pyear = $Today['year'];
//Month conversion into numeric mode
if ($pmonth=="January") { $pmonth=1; } else
if ($pmonth=="February") { $pmonth=2; } else
if ($pmonth=="March") { $pmonth=3; } else
if ($pmonth=="April") { $pmonth=4; } else
if ($pmonth=="May") { $pmonth=5; } else
if ($pmonth=="June") { $pmonth=6; } else
if ($pmonth=="July") { $pmonth=7; } else
if ($pmonth=="August") { $pmonth=8; } else
if ($pmonth=="September") { $pmonth=9; } else
if ($pmonth=="October") { $pmonth=10; } else
if ($pmonth=="November") { $pmonth=11; } else
if ($pmonth=="December") { $pmonth=12; };
$test = mktime (0,0,0,$pmday,pmonth,$pyear,1);

//Creating SQL parameter
$curDate2 = "%".$mday."%".$month[0].$month[1].$month[2]."%".$year."%";
$preday = strftime ("%d",$test);
$premonth = strftime ("%B",$test);
$preyear = strftime ("%Y",$test);
$curDateP = "%".$preday."%".$premonth[0].$premonth[1].$premonth[2]."%".$preyear."%";

//Executing SQL Today
$sql = "SELECT COUNT(user_id) AS userCount FROM $user_prefix"._users." WHERE user_regdate LIKE '$curDate2'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$userCount = $row[userCount];
//end

//Executing SQL Today
$sql = "SELECT COUNT(user_id) AS userCount FROM $user_prefix"._users." WHERE user_regdate LIKE '$curDateP'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$userCount2 = $row[userCount];
//end

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

$who_online_num = $guest_online_num + $member_online_num;
$content .= "<form action=\"modules.php?name=Your_Account\" method=\"post\">";

if (is_user($user)) {
$content .= "<center>"._BWEL." $uname
<a href=\"modules.php?name=Your_Account&op=logout\">" ._LOGOUT."</a></center>\n<hr>\n";
$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];
$newpms = $db->sql_numrows($db->sql_query("SELECT privmsgs_to_userid FROM $prefix"._bbprivmsgs." WHERE privmsgs_to_userid='$uid' AND (privmsgs_type='5' OR privmsgs_type='1')"));
$oldpms = $db->sql_numrows($db->sql_query("SELECT privmsgs_to_userid FROM $prefix"._bbprivmsgs." WHERE privmsgs_to_userid='$uid' AND privmsgs_type='0'"));
$content .= "<center><a href=\"modules.php?name=Private_Messages\">"._BPM."</a></center>
\n";
$content .= "<big>&</big> "._BUNREAD.": $newpms
\n";
$content .= "<big>&</big> "._BREAD.": $oldpms
\n<hr>\n";
} else {
$content .= "<center>"._BWEL.", $anonymous
(<a href=\"modules.php?name=Your_Account&op=new_user\" >"._BREG."</a>)</center>\n<hr>";
$content .= ""._NICKNAME." <input type=\"text\" name=\"username\" size=\"10\" maxlength=\"25\">
";
$content .= ""._PASSWORD." <input type=\"password\" name=\"user_password\" size=\"10\" maxlength=\"20\">

";
if (extension_loaded("gd")) {
mt_srand ((double)microtime()*1000000);
$maxran = 1000000;
$random_num = mt_rand(0, $maxran);
$content .="Check Code [img]modules.php?name=Your_Account&op=gfx&random_num=$r andom_num[/img]
\n";
$content .="Re-Type Code <input type=\"text\" NAME=\"gfx_check\" SIZE=\"11\" MAXLENGTH=\"10\">
\n";
$content .="<input type=\"hidden\" name=\"random_num\" value=\"$random_num\">
\n";
}
$content .="<input type=\"hidden\" name=\"redirect\" value=$redirect>\n";
$content .="<input type=\"hidden\" name=\"mode\" value=$mode>\n";
$content .="<input type=\"hidden\" name=\"f\" value=$f>\n";
$content .="<input type=\"hidden\" name=\"t\" value=$t>\n";

$content .= "<input type=\"hidden\" name=\"op\" value=\"login\">";
$content .= "<center><input type=\"submit\" value=\""._LOGIN."\">\n</center><hr>";
}
$content .= "<img src=\"images/blocks/group-2.gif\" height=\"14\" width=\"17\"> <u>"._BMEMP.":</u>
\n";
$content .= "<img src=\"images/blocks/ur-moderator.gif\" height=\"14\" width=\"17\"> "._BLATEST.": <A HREF=\"modules.php?name=Your_Account&op=userinfo&u sername=$lastuser\">$lastuser</a>
\n";
$content .= "<img src=\"images/blocks/ur-author.gif\" height=\"14\" width=\"17\"> "._BTD.": $userCount
\n";
$content .= "<img src=\"images/blocks/ur-admin.gif\" height=\"14\" width=\"17\"> "._BYD.": $userCount2
\n";
$content .= "<img src=\"images/blocks/ur-guest.gif\" height=\"14\" width=\"17\"> "._BOVER.": $numrows
\n<hr>\n";
$content .= "<img src=\"images/blocks/group-3.gif\" height=\"14\" width=\"17\"> <u>"._BVISIT.":</u>\n
\n";
$content .= "<img src=\"images/blocks/ur-anony.gif\" height=\"14\" width=\"17\"> "._BVIS.": $guest_online_num
\n";
$content .= "<img src=\"images/blocks/ur-member.gif\" height=\"14\" width=\"17\"> "._BMEM.": $member_online_num
\n";
$content .= "<img src=\"images/blocks/ur-registered.gif\" height=\"14\" width=\"17\"> "._BTT.": $who_online_num
\n";
if ($member_online_num > 0) {
$content .= "<hr>\n<img src=\"images/blocks/group-1.gif\" height=\"14\" width=\"17\"> <u>"._BON.":</u>
$who_online_now";
}
$content .= "</form>";

?>


Hope this helps with the bug search... :wink:


_____________________________________________

www.dancefactor.net

Dance Music Community Website
_____________________________________________
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#6 (permalink))
Moderator
 
Status: Offline
Posts: 737
Join Date: Nov 2002
06-22-2003, 05:08 PM

Try changing this:
Code:
//Creating SQL parameter 
$curDate2 = "%".$mday."%".$month[0].$month[1].$month[2]."%".$year."%"; 
$preday = strftime ("%d",$test); 
$premonth = strftime ("%B",$test); 
$preyear = strftime ("%Y",$test); 
$curDateP = "%".$preday."%".$premonth[0].$premonth[1].$premonth[2]."%".$preyear."%";
to this:
Code:
//Creating SQL parameter
$curDate2 = "%".$month[0].$month[1].$month[2]."%".$mday."%".$year."%";
$preday = strftime ("%d",$test);
$premonth = strftime ("%B",$test);
$preyear = strftime ("%Y",$test);
$curDateP = "%".$premonth[0].$premonth[1].$premonth[2]."%".$preday."%".$preyear."%";
The ordering is slightly different. See if that works
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#7 (permalink))
Junior Member
 
Status: Offline
Posts: 4
Join Date: Jun 2003
Location: Portugal
06-22-2003, 05:16 PM

Aparently it works now!

I really appreciate the time you took to help me!
Thanks a lot! :wink:


_____________________________________________

www.dancefactor.net

Dance Music Community Website
_____________________________________________
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#8 (permalink))
Moderator
 
Status: Offline
Posts: 737
Join Date: Nov 2002
06-22-2003, 05:21 PM

No problem

Glad it works now
   
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
User Info Block SouthernPoet Nuke 7.x - Blocks 1 01-15-2006 03:31 PM
Home Modules for Anonymous and Registered Users Sarmaul Nuke 7.x - General 0 02-23-2005 06:52 AM
User Info Block Groove Nuke 7.x - Blocks 3 07-27-2004 04:53 PM
Display Avatar User Menu Block for PHP-Nuke 6.5 Peer Nuke 6.5 to 6.9 - Blocks 22 04-18-2003 06:46 AM
User Info Block won't log users in icevirus Purged Topics 6 11-22-2002 01:47 AM




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