» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Online Users: 67
0 members and 67 guests
No Members online
Most users ever online was 611, 03-21-2008 at 11: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
Oral Chelation - initial cleansing of your veins & arteries

Register Now! Contact Us

About this Page
This is a discussion on Block-User_Info changes within the Purged Topics forums, part of the NM Staff category; Hi , I have done some changes to this file.It will now point every link on the block to your ...


Go Back   Nukemods Forum » NM Staff » Purged Topics

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-11-2003, 04:25 AM
Junior Member
 
Join Date: Feb 2003
Location: India
Posts: 27
Send a message via MSN to bobbychat Send a message via Yahoo to bobbychat
Block-User_Info changes
Hi ,
I have done some changes to this file.It will now point every link on the block to your Forums profile and not to Your_Account.Simply copy this code and save it as block-user_info



It works with most of the themes
__________________________________________________ _____________________

<?php

/************************************************** **********/
/* */
/* Updated for PHP-Nuke 5.6 - 18 Jun 2002 NukeScripts */
/* website http://www.nukescripts.com */
/* */
/* Updated for PHP-Nuke 5.5 - 24/03/2002 Rugeri */
/* website http://newsportal.homip.net */
/* */
/* (C) 2002 */
/* All rights beyond the GPL are reserved */
/* */
/* Please give a link back to my site somewhere in your own */
/* */
/*Updated by bobbychat
/************************************************** **********/

if (eregi("block-block-User_Info.php",$PHP_SELF)) { Header("Location: index.php"); }
$content = "";
global $user, $cookie, $prefix, $user_prefix, $dbi, $anonymous;
cookiedecode($user);
$username = $cookie[1];

$result = sql_query("select uname from $user_prefix"._users." order by uid DESC limit 0,1", $dbi);
list($lastuser) = sql_fetch_row($result, $dbi);
$numrows = sql_num_rows(sql_query("select uid from $user_prefix"._users."", $dbi), $dbi);
$result2 = sql_query("SELECT uname,guest FROM $prefix"._session." where guest=0", $dbi);
$member_online_num = sql_num_rows($result2, $dbi);
$who_online_now = "";
$i = 1;
while ($session = sql_fetch_array($result2, $dbi)) {
if (isset($session["guest"]) and $session["guest"] == 0) {
if ($i < 10) {
$who_online_now .= "0$i:<A HREF=\"modules.php?name=Forums&file=profile&mode=v iewprofile&u=$session[username]\">$session[username]</a>
\n";
} else {
$who_online_now .= "$i:<A HREF=\"modules.php?name=Forums&file=profile&mode=v iewprofile&u=$session[username]\">$session[username]</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,$pmonth,$pmday,$pyear,1);

//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."%";

//Executing SQL Today
$result2 = sql_query("SELECT COUNT(UID) AS userCount from $user_prefix"._users." WHERE user_regdate LIKE '$curDate2'", $dbi);
list($userCount) = sql_fetch_row($result2, $dbi);
//end

//Executing SQL Today
$result3 = sql_query("SELECT COUNT(UID) AS userCount from $user_prefix"._users." WHERE user_regdate LIKE '$curDateP'", $dbi);
list($userCount2) = sql_fetch_row($result3, $dbi);
//end

$result = sql_query("SELECT uname FROM ".$prefix."_session where guest=1", $dbi);
$guest_online_num = sql_num_rows($result, $dbi);

$result = sql_query("SELECT uname FROM ".$prefix."_session where guest=0", $dbi);
$member_online_num = sql_num_rows($result, $dbi);

$who_online_num = $guest_online_num + $member_online_num;
$content = "<form action="modules.php?name=Your_Account&redirect=Page Ranking ivmsg&folder=inbox" method="post">";

if (is_user($user)) {
$content .= "
<img src=\"images/blocks/group-4.gif\" height=\"14\" width=\"17\"> "._BWEL.", $username.
\n<hr>\n";
$result = sql_query("select uid from $user_prefix"._users." where uname='$username'", $dbi);
list($uid) = sql_fetch_row($result, $dbi);
$result2 = sql_query("select to_userid from $prefix"._priv_msgs." where to_userid='$uid' and read_msg='0'", $dbi);
$newpms = sql_num_rows($result2, $dbi);
$result3 = sql_query("select to_userid from $prefix"._priv_msgs." where to_userid='$uid' and read_msg='1'", $dbi);
$oldpms = sql_num_rows($result3, $dbi);
$content .= "<img src=\"images/blocks/email-y.gif\" height=\"10\" width=\"14\"> <a href=\"modules.php?name=Private_Messages\">"._BPM."</a>
\n";
$content .= "<img src=\"images/blocks/email-r.gif\" height=\"10\" width=\"14\"> "._BUNREAD.": $newpms
\n";
$content .= "<img src=\"images/blocks/email-g.gif\" height=\"10\" width=\"14\"> "._BREAD.": $oldpms
\n<hr>\n";
} else {
$content .= "<img src=\"images/blocks/group-4.gif\" height=\"14\" width=\"17\"> "._BWEL.", $anonymous\n<hr>";
$content .= ""._NICKNAME." <input type=\"text\" name=\"uname\" size=\"10\" maxlength=\"25\">
";
$content .= ""._PASSWORD." <input type=\"password\" name=\"pass\" size=\"10\" maxlength=\"20\">
";
$content .= "<input type=\"hidden\" name=\"op\" value=\"login\">";
$content .= "<input type=\"submit\" value=\""._LOGIN."\">\n (<a href=\"modules.php?name=forums&file=profile&mode=r egister\">"._BREG."</a>)<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=forums&file=profile&mode=v iewprofile&u=$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>";

?>
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



All times are GMT -5. The time now is 08:06 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