CZ User Info Block Issues..........

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   re: CZ User Info Block Issues..........
Themis
CZ Newbie
 Codezwiz Site Donator
wyoming.gif
Age: 71
Gender: Female
Website:
Status: Offline
Joined: Nov 19, 2003
0.00 posts per day
Posts: 19
Points: 108
AIM Address  MSN Messenger 
Well I got rid of the parse error by changing things back to the way they were. But I still have the last step to do correctly.

Here is what is there now:

function online() {
global $nsnst_const, $user, $cookie, $prefix, $db;
if(!file_exists('includes/nukesentinel.php')) {
$ip = $_SERVER['REMOTE_ADDR'];
} else {
$ip = $nsnst_const['remote_ip'];
}
$guest = 0;
if (is_user($user)) {
cookiedecode($user);
$uname = $cookie[1];
if (!isset($uname)) {
$uname = $ip;
$guest = 1;
}
} else {
$uname = $ip;
$guest = 1;
}
$past = time()-3600;
$sql = "DELETE FROM ".$prefix."_session WHERE time < '$past'";
$db->sql_query($sql);
$sql = "SELECT time FROM ".$prefix."_session WHERE uname='$uname'";
$result = $db->sql_query($sql);
$ctime = time();
if (!empty($uname)) {
$uname = substr($uname, 0,25);
$row = $db->sql_fetchrow($result);
if ($row) {
$db->sql_query("UPDATE ".$prefix."_session SET uname='$uname', time='$ctime', host_addr='$ip', guest='$guest' WHERE uname='$uname'");
} else {
$db->sql_query("INSERT INTO ".$prefix."_session (uname, time, host_addr, guest) VALUES ('$uname', '$ctime', '$ip', '$guest')");
}
}


Here is the replacement function...
function online() {
global $user, $cookie, $prefix, $db, $name;
cookiedecode($user);
$ip = $_SERVER['REMOTE_ADDR'];
$url = $_SERVER['REQUEST_URI'];
$uname = $cookie[1];
if (!isset($uname)) {
$uname = "$ip";
$guest = 1;
}
$past = time()-1800;
$db->sql_query("DELETE FROM ".$prefix."_session WHERE time < '$past'");
$result = $db->sql_query("SELECT time FROM ".$prefix."_session WHERE uname='$uname'");
$ctime = time();
$custom_title = addslashes($name);
$url = ereg_replace("&", "&", $url);
if ($uname!="") {
$uname = substr("$uname", 0,25);
if ($row = $db->sql_fetchrow($result)) {
$db->sql_query("UPDATE ".$prefix."_session SET uname='$uname', time='$ctime', host_addr='$ip', guest='$guest', module='$custom_title', url='$url' WHERE uname='$uname'");
} else {
$db->sql_query("INSERT INTO ".$prefix."_session (uname, time, host_addr, guest, module, url) VALUES ('$uname', '$ctime', '$ip', '$guest', '$custom_title', '$url')");
}
}
}


Not sure what to do here as the directions show a function that is slighly different due to the Nuke Sentinel stuff.

Thanks once again

Shonie



Back to top Reply with quote
#2   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,475
   
Read this one....

[ Register or login to view links on this board. ]




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#3   re: CZ User Info Block Issues..........
Themis
CZ Newbie
 Codezwiz Site Donator
wyoming.gif
Age: 71
Gender: Female
Website:
Status: Offline
Joined: Nov 19, 2003
0.00 posts per day
Posts: 19
Points: 108
AIM Address  MSN Messenger 
Oops guess we posted at the same time. Well I replaced as you suggested and got:

arse error: parse error, unexpected '}' in /home/shoshone/public_html/mainfile.php on line 676

That according to Crimson Editor puts it here.........

$db->sql_query("INSERT INTO ".$prefix."_session (uname, time, host_addr, guest, module, url) VALUES ('$uname', '$ctime', '$ip', '$guest', '$custom_title', '$url')");
}
}
}$db->sql_freeresult($result);
}

That bottom bracket.

Thanks again for your help Telli icon_smile.gif



Back to top Reply with quote
#4   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,475
   
Attach your mainfile.php in a zip file...




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#5   re: CZ User Info Block Issues..........
Themis
CZ Newbie
 Codezwiz Site Donator
wyoming.gif
Age: 71
Gender: Female
Website:
Status: Offline
Joined: Nov 19, 2003
0.00 posts per day
Posts: 19
Points: 108
AIM Address  MSN Messenger 
Here you go Thanks for the great help. Have to get the cat groomed, icon_razz.gif I'll be back in about an hour.



Attached Files
mainfile.zip (13.5 KB, Downloaded: 5236 Time(s))


Back to top Reply with quote
#6   re: CZ User Info Block Issues..........
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,475
   
Try this one...



Attached Files
Themis.zip (13.57 KB, Downloaded: 5242 Time(s))



_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#7   re: CZ User Info Block Issues..........
Themis
CZ Newbie
 Codezwiz Site Donator
wyoming.gif
Age: 71
Gender: Female
Website:
Status: Offline
Joined: Nov 19, 2003
0.00 posts per day
Posts: 19
Points: 108
AIM Address  MSN Messenger 
Whooohooo!! All fixed! Thanks so much Telli for taking the time out to help me icon_biggrin.gif

Even if your avatar IS sCAARryy , you are very nice new_silly.gif



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
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
You cannot attach files in this forum
You cannot download files in this forum