Joined: Apr 26, 2008 Posts: 60 Location: Windy City
Posted:
Wed Jul 16, 2008 1:19 pm
Quote:
<?php
/************************************************************************/
/* PHP-NUKE: Web Portal System */
/* =========================== */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/*
Only registered users can see links on this board! Get registered or login to the forums!
*/
/* */
/* 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. */
/************************************************************************/
/************************************************************************/
/* Heavily Modified by Gaylen Fraley (aka Raven) */
/* Support and Only Authorized Download Site:
Only registered users can see links on this board! Get registered or login to the forums!
/* Version: 2.2.2 */
/* Change History: See File CHANGES */
/* (C) 2002-2005 RavenWebServices */
/* All rights beyond the GPL are reserved */
/* */
/* Please give a link back to my site somewhere in your own */
/************************************************************************/
/* 2.2.2 */
/* Corrected $patchLevelGE29 to $patchLevelGE30 - reported by Montego */
/* Added Captcha code to RavenNuke v2.10.00 */
/* Added $nameMaxLength check to $lastusername - reported by Hitwalker */
/* Fixed errant / that appeared at the bottom of the block by Guest's */
/* Made fully XHTML Compliant */
/* Changed all $user_prefix to $prefix */
/* 2.2.1 (2.2.0 was Internal) */
/* Released:3/12/2006 */
/* Because new features have been added version is changed from 2.1.2 */
/* Added formatting to numeric fields */
/* Added code to allow for DST in date calculations. */
/* Fixed bug in $nameMaxLength logic as reported by Darrel3831 in */
/*
Only registered users can see links on this board! Get registered or login to the forums!
*/
/* Added $showHidden setting to allow/notAllow viewing of Hidden member*/
/* totals to everyone. Setting this to TRUE will only allow admins */
/* to see the counts. Setting this to FALSE will allow all to see it*/
/* 2.1.2 */
/* Modified block to not show Anonymous users anything except Login and*/
/* Register links. */
/* 2.1.0: */
/* Because of all the changes since v2.0, I bumped the version to 2.1.0*/
/* Modified code to always show the IP of who's visiting. */
/* Added title property for the admin to show IP when mouseing over the*/
/* index number of the people online now. */
/* Modified the member online number to not include hidden when logged */
/* in as admin. Hidden should be a separate total. */
/* Fixed the bug that was dropping the first guest IP from the list. */
/************************************************************************/
/*********************************************************************************************************/
/* Setup - Use these settings to control how some of the user info block displays to users/admins. */
/*********************************************************************************************************/
$showGuests = FALSE; //Allow/notAllow displaying of guest ip's partial or otherwise.
$showGuestsAdmin = TRUE; //Allow/notAllow displaying of guest ip's partial or otherwise to Admins.
$showServerDateTime = TRUE; //Allow/notAllow displaying of Server Date/Time.
$showServerDateTimeAdmin = TRUE; //Allow/notAllow displaying of Server Date/Time to Admins.
$whoisServerString = 'www.dnsstuff.com/tools/whois.ch?ip=';
$nameMaxLength = 13; //Max length for username display. Will truncate with ....
$patchLevelGE30 = TRUE; //Are you using Chatserv's patch level Greater Than or Equal To 3.0?
$showHidden = FALSE; //Allow/notAllow displaying of Hidden counts. FALSE=Admin Only TRUE=ALL
/*********************************************************************************************************/
/* You should not need to modify anything below this line */
/*********************************************************************************************************/
if ( ($patchLevelGE30 AND !defined('BLOCK_FILE')) OR (!$patchLevelGE30 AND eregi("$blockfile",$_SERVER['PHP_SELF'])) ) {
$redirectURL = '/'.str_replace('http://','',$nukeurl);
Header("Location: $redirectURL");
die();
}
function convertIP ($xip) {
global $admin;
if (is_admin($admin)) return $xip;
$xipx = explode('.',$xip);
for ($i=2;$i<count($xipx);$i++) {
$xipx[$i] = preg_replace ('/(0|1|2|3|4|5|6|7|8|9)/', 'x', $xipx[$i]);
}
return implode('.',$xipx);
}
$content = '';
if (!isset($lastUserNameModified)) $lastUserNameModified = '';
cookiedecode($user);
if (count($cookie)<2) $uname='';
else $uname = $cookie[1];
// Get the last user added to the database and the total users, minus anonymous
$sql = 'SELECT username,user_id FROM '.$user_prefix.'_users ORDER BY user_id DESC LIMIT 0,1';
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$lastusername = $row['username'];
$lastuser = $row['user_id'];
$numrows = $db->sql_fetchrow($db->sql_query('SELECT count(user_id) user_id FROM '.$user_prefix.'_users'));
$numrows = $numrows['user_id'];
$numrows1 = $numrows-1;
/* Hits for Today */
$t_time = time()-$todayDST; // 2.2.0
$t_year = date('Y', $t_time);
$t_month = date('n', $t_time);
$t_date = date('j', $t_time);
$result = $db->sql_query('SELECT hits FROM '.$prefix.'_stats_date WHERE year='.$t_year.' AND month='.$t_month.' AND date='.$t_date);
list($today) = $db->sql_fetchrow($result);
if (is_admin($admin)) {
/* Hits for Yesterday */
$y_time = $t_time - 86400 - $yesterdayDST; // 2.2.0
$y_year = date('Y', $y_time);
$y_month = date('n', $y_time);
$y_date = date('j', $y_time);
$result = $db->sql_query('SELECT hits FROM '.$prefix.'_stats_date WHERE year='.$y_year.' AND month='.$y_month.' AND date='.$y_date);
list($yesterday) = $db->sql_fetchrow($result);
}
/* Hits in Total */
$totalhits = 0;
$result = $db->sql_query('SELECT sum(hits) FROM '.$prefix.'_stats_year');
list($totalhits) = $db->sql_fetchrow($result);
$content .= '<center><small>'._WERECEIVED.'</small><br />'."\n";
$content .= '<b>'.number_format($totalhits,0).'</b><br />'."\n";
$content .= '<small>'._PAGESVIEWS.'<br />'.$startdate.'</small></center>';
$content .= '<hr noshade="noshade" />';
$content .= '<center>'._BHITS.' '._BTD.': <b>'.number_format($today,0).'</b><br />';
if (is_admin($admin)) $content .= _BHITS.' '._BYD.': <b>'.number_format($yesterday,0).'</b><br />';
$content .= '</center>';
}
if ($showServerDateTime OR ($showServerDateTimeAdmin AND is_admin($admin))) {
if (is_user($user) OR is_admin($admin)) {
$content .= '<hr noshade="noshade" />';
}
$sdt = date('j F Y'."\n".'H:i:s T');
$zone = date('Z')/3600;
if ($zone >= 0) {
$zone = '+'.$zone;
}
$content .= '<center>'._SERDT.'<br />'.$sdt.' (GMT '.$zone.')</center>';
}
else {
$hr = "\n".'<hr noshade="noshade" />'."\n";
$content .= $hr;
}
$content .= '</form>';
?>
Guys I need your help. I'm trying to change the captcha code in the (User_Info block) that comes with the RavenNuke(tm) Version 2.20.01 above to the one below, the captcha code of the (User_Login block) that come with the new (CNB Your Account module) I've installed for my site. I've tried to do it on my own but unable to. My coding skills are very limited. What I learned I got mostly from the tutorials I read in the net & from reading forum posts on some Nuke support sites. Your help is very much appreciated.
Quote:
<?php
/*********************************************************************************/
/* CNB Your Account: An Advanced User Management System for phpnuke */
/* ============================================ */
/* */
/* Copyright (c) 2004 by Comunidade PHP Nuke Brasil */
/*
Only registered users can see links on this board! Get registered or login to the forums!
&
Only registered users can see links on this board! Get registered or login to the forums!
*/
/* */
/* Contact author:
Only registered users can see links on this board! Get registered or login to the forums!
*/
/* International Support Forum:
Only registered users can see links on this board! Get registered or login to the forums!
*/
/* */
/* 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. */
/* */
/*********************************************************************************/
/* CNB Your Account it the official successor of NSN Your Account by Bob Marion */
/*********************************************************************************/
/********************************************************/
/* User Login Block for PHP-Nuke */
/* By: NukeScripts Network (webmaster@nukescripts.net) */
/*
Only registered users can see links on this board! Get registered or login to the forums!
Joined: Aug 29, 2004 Posts: 9136 Location: Arizona
Posted:
Thu Jul 17, 2008 6:59 am
The provided RavenNuke User-Info block appears to be working without modification on our RNYA version that is in works. Have you tried just using the block from the RavenNuke distro?
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