PHP Web Host - Quality Web Hosting For All PHP Applications Free RavenNuke(tm) Add Ons
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
nextgen
Worker
Worker


Joined: Sep 28, 2006
Posts: 135
Location: Maryland

PostPosted: Thu Feb 02, 2012 2:38 pm Reply with quote Back to top

Does anyone know of a top 5 users by points accumulated block ? Maybe with a link to edit profile, change theme and log out options.
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
Susann
Moderator


Joined: Dec 19, 2004
Posts: 3143
Location: Germany:Moderator German NukeSentinel Support

PostPosted: Thu Feb 02, 2012 3:10 pm Reply with quote Back to top

Welcome back ! I believe I had such a block but I had a different point system in Nuke.
Therefore to help you we need to know what points you are talking about.
View user's profile Send private message Visit poster's website
nextgen
Worker
Worker


Joined: Sep 28, 2006
Posts: 135
Location: Maryland

PostPosted: Thu Feb 02, 2012 3:55 pm Reply with quote Back to top

The points system installed by default in Ravennuke.
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
nextgen
Worker
Worker


Joined: Sep 28, 2006
Posts: 135
Location: Maryland

PostPosted: Fri Feb 03, 2012 10:28 am Reply with quote Back to top

here is what i found but need it to show the nuke points.

Code:
<?php

if (eregi("block-User_Login.php", $_SERVER['PHP_SELF'])) { Header("Location: index.php"); }
global $redirect, $mode, $f, $t, $sitekey, $nukeurl, $user, $cookie, $prefix, $user_prefix, $db, $anonymous, $gfx_chk;
include_once("modules/Your_Account/includes/functions.php");
$ThemeSel = get_theme();
$ya_config = ya_get_configs();
$userinfo = getusrinfo($user);
if (is_user($user)) {
$memname = $cookie[1];
$sqlab = "SELECT points AS dollars FROM ".$prefix."_users WHERE username = '$memname'";
$result = $db->sql_query($sqlab);
$row = $db->sql_fetchrow($result);
$dollars = $row[dollars];

$sqlbc = "SELECT * FROM ".$prefix."_bbconfig";
$resultbc = $db->sql_query($sqlbc);
while ( $rowbc = $db->sql_fetchrow($resultbc) )
{
$board_config[$rowbc['config_name']] = $rowbc['config_value'];
}
if ($userinfo[user_avatar_type] == 1) {
$userinfo[user_avatar] = $board_config['avatar_path']."/".$userinfo[user_avatar];
} elseif ($userinfo[user_avatar_type] == 2) {
$userinfo[user_avatar] = $userinfo[user_avatar];
} else {
$userinfo[user_avatar] = $board_config[avatar_gallery_path]."/".$userinfo[user_avatar];
}
if ($userinfo[user_avatar]) {
$sqlde = "SELECT user_posts AS postz FROM ".$prefix."_users WHERE username = '$memname'";
$result = $db->sql_query($sqlde);
$row = $db->sql_fetchrow($result);
$postz = $row[postz];

$content .= "<center><img src=\"$userinfo[user_avatar]\" alt=\"\" height=\"90\" width=\"90\"></center>\n";
$content .= "<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=\"95%\"><tr><TD class=\"rowx\">&nbsp;<b></td></tr></table>\n";
$content .= "<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=\"95%\">\n";
$content .= "<img src=\"themes/$ThemeSel/images/menu/meminfo.gif\" border=\"0\" alt=\"Your account information.\">\n";
$content .= "<TR><TD class=\"rowx\">&nbsp;Welcome: $memname<br><br>\n";
if(is_active("Private_Messages")) {
list($uid) = $db->sql_fetchrow($db->sql_query("select user_id from $user_prefix"._users." where username='$memname'"));
$newpms = $db->sql_numrows($db->sql_query("select privmsgs_to_userid from $prefix"._bbprivmsgs." where privmsgs_to_userid='$uid' and (privmsgs_type='1' OR privmsgs_type='5')"));
$savpms = $db->sql_numrows($db->sql_query("select privmsgs_to_userid from $prefix"._bbprivmsgs." where privmsgs_to_userid='$uid' and privmsgs_type='3'"));
$oldpms = $db->sql_numrows($db->sql_query("select privmsgs_to_userid from $prefix"._bbprivmsgs." where privmsgs_to_userid='$uid' and privmsgs_type='0'"));
$totpms = $newpms + $oldpms + $savpms;
$content .= "<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=\"100%\"><TR><TD class=\"rowx\">&nbsp;<a href=\"modules.php?name=Private_Messages\"><b>Messages:</b></a></td><td align=\"right\"><a href=\"modules.php?name=Private_Messages\">$newpms</a></span></td></tr></table>";


$content .= "<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=\"100%\"><TR><TD class=\"rowx\">&nbsp;<b>Total Points:</b></a></td><td align=\"right\">$points</span></td></tr></table>";

$content .= "<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=\"100%\"><TR><TD class=\"rowx\">&nbsp;<b>Your Posts:</b></a></td><td align=\"right\">$postz</span></td></tr></table>";


//$content .= "<TR><TD class=\"rowx\">&nbsp;Forum Posts:<font color=\"#ffffff\"> $postz</font></TD></TR>\n";
$content .= "<TR><TD class=\"rowx\">&nbsp;</TD></TR>\n";
$content .= "<TR><TD class=\"rowx\">&nbsp;<a href=\"forums.html&file=profile&mode=editprofile\" target=_self>Edit your Profile</a></TD></TR>\n";
$content .= "<TR><TD class=\"rowx\">&nbsp;<a href=\"modules.php?name=Your_Account&op=chgtheme\" target=_self>Change Theme</a></TD></TR>\n";
$content .= "<TR><TD class=\"rowx\">&nbsp;<a href=\"modules.php?name=Your_Account&op=logout\">"._BLOGOUT." </a><br><br>\n";
//$content .= "<TR><TD class=\"rowx\">&nbsp;</TD></TR>\n";
$content .= "<img src=\"themes/$ThemeSel/images/menu/top5.gif\" border=\"0\" alt=\"Your account information.\">\n";


$query='SELECT username, user_id, points FROM '.$prefix."_users WHERE `user_id`>'1' ORDER BY `points` DESC LIMIT 5";
$result=$db->sql_query($query);
//$content = "<TR><TD class=\"rowx\">&nbsp;Member</b></TD><TD><TR><b>Points</b></TD></TR>";
for($i = 1;$h = $db->sql_fetchrow($result);$i++)
{
$id = $h['user_id'];
$name = $h['username'];
$points = $h['points'];
$content .= "<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=\"100%\"><TR><TD class=\"rowx\">$i. <a href=\"forums.html&amp;file=profile&amp;mode=viewprofile&amp;u=$id\">$name</a></td><td align=\"right\">$points</span></td></tr></table>";
}
$content .= "</table>\n";
}
}
} else {
mt_srand ((double)microtime()*1000000);
$maxran = 10 * intval($ya_config['codesize']);
$random_num = mt_rand(0, $maxran);
$content .= "<img src=\"themes/$ThemeSel/images/menu/regged.gif\" border=\"0\" alt=\"Member Login\">\n";
$content .= "<table border=0 cellpadding=0 cellspacing=0>\n";
$content .= "<tr><form action=\"modules.php?name=Your_Account\" method=\"post\">\n";
$content .= "<td><input type=\"text\" name=\"username\" size=\"11\" maxlength=\"25\"><br>\n";
$content .= "<input type=\"password\" name=\"user_password\" size=\"11\" maxlength=\"20\" AutoComplete=\"off\"><br>\n";
if (extension_loaded("gd") AND ($ya_config['usegfxcheck'] == 2 OR $ya_config['usegfxcheck'] == 3)) {
$content .=""._BCODE.": <img src='?gfx=gfx&random_num=$random_num' border='0' alt='"._SECURITYCODE."' title='"._SECURITYCODE."'><br>\n";
$content .="<input type=\"text\" NAME=\"gfx_check\" SIZE=\"11\" MAXLENGTH=\"10\" AutoComplete=\"off\"><br>\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\">\n";
$content .= "<input type=\"submit\" value=\""._BLOGIN."\">\n";
$content .= "</td>\n";
$content .= "</form></tr>\n";
$content .= "<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=\"95%\"><tr><TD class=\"rowx\"><a href=\"modules.php?name=Your_Account&op=new_user\"><img src=\"themes/$ThemeSel/images/menu/registernow.gif\" border=\"0\" alt=\"Register as new User!\"></a></TD></TR>\n";
$content .= "</table>\n";
}
?>
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2456
Location: Pittsburgh, Pennsylvania

PostPosted: Fri Feb 03, 2012 12:34 pm Reply with quote Back to top

I did not try it, but give this rewrite a go.
Code:

<?php

if ( !defined('BLOCK_FILE') ) {
   Header('Location: ../index.php');
   die();
}

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

include_once 'modules/Your_Account/includes/functions.php';

$ThemeSel = get_theme();
$ya_config = ya_get_configs();

if (is_user($user)) {
   $userinfo = getusrinfo($user);
   $sql = 'SELECT `points` FROM `' . $user_prefix . '_users` WHERE `username` = "' . $userinfo['username'] . '"';
   $result = $db->sql_query($sql);
   list($points)= $db->sql_fetchrow($result, SQL_NUM);

   $sql = 'SELECT * FROM `' . $prefix . '_bbconfig`';
   $result = $db->sql_query($sql);
   while ( $row = $db->sql_fetchrow($result, SQL_ASSOC) ) {
      $board_config[$row['config_name']] = $row['config_value'];
   }

   if ($userinfo['user_avatar_type'] == 1) {
      $userinfo['user_avatar'] = $board_config['avatar_path'] . '/' . $userinfo['user_avatar'];
   } elseif ($userinfo['user_avatar_type'] == 2) {
      $userinfo['user_avatar'] = $userinfo['user_avatar'];
   } else {
      $userinfo['user_avatar'] = $board_config['avatar_gallery_path'] . '/' . $userinfo['user_avatar'];
   }

   if ($userinfo['user_avatar']) {
      $sql = 'SELECT `user_posts` FROM `' . $user_prefix . '_users` WHERE `username` = "' . $userinfo['username'] . '"';
      $result = $db->sql_query($sql);
      list($postz) = $db->sql_fetchrow($result, SQL_NUM);

      $content .= '<center><img src="' . $userinfo['user_avatar'] . '" alt="" height="90" width="90"></center>' . "\n"
         . '<table border="0" cellpadding="0" cellspacing="0" width="95%"><tr><td class="rowx">&nbsp;<b></td></tr></table>' . "\n"
         . '<table border="0" cellpadding="0" cellspacing="0" width="95%">' . "\n"
         . '<img src="themes/' . $themesel . '/images/menu/meminfo.gif" border="0" alt="your account information.">' . "\n"
         . '<tr><td class="rowx">&nbsp;welcome: ' . $userinfo['username'] . '<br><br>' . "\n";

      if(is_active('Private_Messages')) {
         $newpms = $db->sql_numrows($db->sql_query('SELECT `privmsgs_to_userid` FROM `' . $prefix . '_bbprivmsgs` WHERE `privmsgs_to_userid`="' . $userinfo['user_id'] . '"'
               . 'AND privmsgs_type IN(1,5)'));

         $content .= '<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td class="rowx">&nbsp;<a href="modules.php?name=private_messages"><b>messages:</b></a></td>'
               . '<td align="right"><a href="modules.php?name=private_messages">' . $newpms . '</a></span></td></tr></table>'
               . '<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td class="rowx">&nbsp;<b>total points:</b></a></td><td align="right">' . $points . '</span></td></tr></table>'
               . '<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td class="rowx">&nbsp;<b>your posts:</b></a></td><td align="right">' . $postz . '</span></td></tr></table>'
               . '<tr><td class="rowx">&nbsp;</td></tr>' . "\n"
               . '<tr><td class="rowx">&nbsp;<a href="modules.php?name=forums&amp;file=profile&amp;mode=editprofile" target="_self">edit your profile</a></td></tr>' . "\n"
               . '<tr><td class="rowx">&nbsp;<a href="modules.php?name=your_account&amp;op=chgtheme" target="_self">change theme</a></td></tr>' . "\n"
               . '<tr><td class="rowx">&nbsp;<a href="modules.php?name=your_account&amp;op=logout">' . _blogout . ' </a><br><br>' . "\n"
               . '<img src="themes/' . $themesel . '/images/menu/top5.gif" border="0" alt="your account information.">' . "\n";

         $query='SELECT `username`, `user_id`, `points` FROM `' . $user_prefix . '_users` WHERE `user_id` > "1" ORDER BY `points` DESC LIMIT 5';
         $result = $db->sql_query($query);
         for($i = 1; list($name, $id, $points) = $db->sql_fetchrow($result, SQL_NUM); $i++) {
            $content .= '<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td class="rowx">' . $i . '. '
                  . '<a href="modules.php?name=forums&amp;file=profile&amp;mode=viewprofile&amp;u=' . $id . '">' . $name . '</a></td><td align="right">' . $points . '</span></td></tr></table>';
         }

         $content .= '</table>' . "\n";
      }
   }
} else {
   $content .= '<img src="themes/' . $ThemeSel . '/images/menu/regged.gif" border="0" alt="Member Login">' . "\n"
         . '<table border="0" cellpadding="0" cellspacing="0">' . "\n"
         . '<tr><form action="modules.php?name=Your_Account" method="post">' . "\n"
         . '<td><input type="text" name="username" size="11" maxlength="25"><br>' . "\n"
         . '<input type="password" name="user_password" size="11" maxlength="20" AutoComplete="off"><br>' . "\n"
         . security_code(array(2,4,5,7), 'stacked')
         . '<input type="hidden" name="op" value="login">' . "\n"
         . '<input type="submit" value="' . _BLOGIN . '">' . "\n"
         . '</td>' . "\n"
         . '</form></tr>' . "\n"
         . '<table border="0" cellpadding="0" cellspacing="0" width="95%"><tr><td class="rowx"><a href="modules.php?name=your_account&amp;op=new_user">'
         . '<img src="themes/' . $themesel . '/images/menu/registernow.gif" border="0" alt="register as new user!"></a></td></tr>' . "\n"
         . '</table>' . "\n";
}

?>
View user's profile Send private message
nextgen
Worker
Worker


Joined: Sep 28, 2006
Posts: 135
Location: Maryland

PostPosted: Fri Feb 03, 2012 2:19 pm Reply with quote Back to top

yes friend.
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
nextgen
Worker
Worker


Joined: Sep 28, 2006
Posts: 135
Location: Maryland

PostPosted: Fri Feb 03, 2012 2:23 pm Reply with quote Back to top

Palbin, it works perfectly. Thank you so very much.
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum