Install problem of CZUserInfo V5 Universal

  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: Install problem of CZUserInfo V5 Universal
-Duke-
CZ Newbie
 Codezwiz Site Donator
-Duke- has been a member for over 19 year's 19 Year Member
canada.gif
Age: 56
Gender: Male
Website:
Status: Offline
Joined: Jul 31, 2004
0.00 posts per day
Posts: 27
Points: 4,896
AIM Address  MSN Messenger 
I've never been able to get this to work either. Sadly I'm no .php expert so I've never been able to figure out how to get this block to work with the mainfile.php that comes with Ravennuke 7.6.



Back to top Reply with quote
#2   re: Install problem of CZUserInfo V5 Universal
floppydrivez
CZ Addict
 Codezwiz Site Donator
floppydrivez has been a member for over 18 year's 18 Year Member
usa.gif mississippi.gif
Occupation: graphic design
Age: 42
Gender: Male
Website:
Status: Offline
Joined: Feb 26, 2006
0.08 posts per day
Posts: 518
Points: 4,848
AIM Address Yahoo Messenger MSN Messenger 
I can't remember what it tells you to insert, but I got mine working. Post the code it tells you to insert.



Back to top Reply with quote
#3   re: Install problem of CZUserInfo V5 Universal
-Duke-
CZ Newbie
 Codezwiz Site Donator
-Duke- has been a member for over 19 year's 19 Year Member
canada.gif
Age: 56
Gender: Male
Website:
Status: Offline
Joined: Jul 31, 2004
0.00 posts per day
Posts: 27
Points: 4,896
AIM Address  MSN Messenger 
This is what it tells me to add:


function online() {
   global $user, $cookie, $prefix, $db, $name;
   cookiedecode($user);
   $ip = $_SERVER['REMOTE_ADDR'];
   $url = $_SERVER['REQUEST_URI'];
   $uname = $cookie[1];
      $guest = 0;
   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);
      $uname = substr("$uname", 0, 25)
   $url = ereg_replace("&", "&", $url);
   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')");
   }
}


and this is the existing code from my mainfile.php for ravenuke:


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')");
    }
  }
  $db->sql_freeresult($result);
}


Thanks for the help.

Ken


Back to top Reply with quote
#4   re: Install problem of CZUserInfo V5 Universal
floppydrivez
CZ Addict
 Codezwiz Site Donator
floppydrivez has been a member for over 18 year's 18 Year Member
usa.gif mississippi.gif
Occupation: graphic design
Age: 42
Gender: Male
Website:
Status: Offline
Joined: Feb 26, 2006
0.08 posts per day
Posts: 518
Points: 4,848
AIM Address Yahoo Messenger MSN Messenger 
Here is my function online, BE SURE to backup your old mainfile.php. The forums seem to be stripping some slahses.

function online() {
  global $nsnst_const, $user, $cookie, $prefix, $db, $name;
  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')");
    }
  }
  $db->sql_freeresult($result);
}



Back to top Reply with quote
#5   re: Install problem of CZUserInfo V5 Universal
-Duke-
CZ Newbie
 Codezwiz Site Donator
-Duke- has been a member for over 19 year's 19 Year Member
canada.gif
Age: 56
Gender: Male
Website:
Status: Offline
Joined: Jul 31, 2004
0.00 posts per day
Posts: 27
Points: 4,896
AIM Address  MSN Messenger 
Thanks for your work man, much appreciated!

The only problem I have had in the past, and continue to have, is the visual confirmation code does not work no matter what I try.

Any ideas on how to correct this issue?

For an idea of what I mean, go to [ Register or login to view links on this board. ]

I don't believe this to be a theme issue so I'm confused how to get past it.



Back to top Reply with quote
#6   re: Install problem of CZUserInfo V5 Universal
floppydrivez
CZ Addict
 Codezwiz Site Donator
floppydrivez has been a member for over 18 year's 18 Year Member
usa.gif mississippi.gif
Occupation: graphic design
Age: 42
Gender: Male
Website:
Status: Offline
Joined: Feb 26, 2006
0.08 posts per day
Posts: 518
Points: 4,848
AIM Address Yahoo Messenger MSN Messenger 
Let me look at the code for now just disable it.



Back to top Reply with quote
#7   Re: re: Install problem of CZUserInfo V5 Universal
-Duke-
CZ Newbie
 Codezwiz Site Donator
-Duke- has been a member for over 19 year's 19 Year Member
canada.gif
Age: 56
Gender: Male
Website:
Status: Offline
Joined: Jul 31, 2004
0.00 posts per day
Posts: 27
Points: 4,896
AIM Address  MSN Messenger 


Originally posted by floppydrivez @ Sun Jul 16, 2006 11:00 pm:

Let me look at the code for now just disable it.


Thanks my friend!



Back to top Reply with quote
#8   re: Install problem of CZUserInfo V5 Universal
floppydrivez
CZ Addict
 Codezwiz Site Donator
floppydrivez has been a member for over 18 year's 18 Year Member
usa.gif mississippi.gif
Occupation: graphic design
Age: 42
Gender: Male
Website:
Status: Offline
Joined: Feb 26, 2006
0.08 posts per day
Posts: 518
Points: 4,848
AIM Address Yahoo Messenger MSN Messenger 
think I fixed it, it fixed mine

Comment out these lines with: (Just add // in front of them)
   if ($Version_Num < 7.5) {
       $security_code_url = "modules.php?name=Your_Account&op=gfx&random_num=$random_num";
   } elseif ($Version_Num >= 7.5) {
       $security_code_url = "?gfx=gfx&amp;random_num=$random_num";
   }


Then find this line
   $content .= "<tr><td colspan='2'>"._CZ_SECURITYCODE." <img src='$security_code_url' border='1' alt='"._SECURITYCODE."' title='"._SECURITYCODE."'></td></tr>n";


In line find
$security_code_url


Replace with
?gfx=gfx&amp;random_num=$random_num


Let me know if it works for you.


Back to top Reply with quote
#9   re: Install problem of CZUserInfo V5 Universal
floppydrivez
CZ Addict
 Codezwiz Site Donator
floppydrivez has been a member for over 18 year's 18 Year Member
usa.gif mississippi.gif
Occupation: graphic design
Age: 42
Gender: Male
Website:
Status: Offline
Joined: Feb 26, 2006
0.08 posts per day
Posts: 518
Points: 4,848
AIM Address Yahoo Messenger MSN Messenger 
Oh yeah icon_smile.gif need to do all that in block-CZUser-Info.php.

I added some breaks after the language request to make it look better. View it here. [ Register or login to view links on this board. ]
its a modded version of CZUsers-Info, but you get the idea.

Very simple just add <br> directly after these

"._CZ_SECURITYCODE."

"._CZ_TYPESECCODE."


Should look like this now
"._CZ_SECURITYCODE."<br>

"._CZ_TYPESECCODE."<br>



Back to top Reply with quote
#10   re: Install problem of CZUserInfo V5 Universal
-Duke-
CZ Newbie
 Codezwiz Site Donator
-Duke- has been a member for over 19 year's 19 Year Member
canada.gif
Age: 56
Gender: Male
Website:
Status: Offline
Joined: Jul 31, 2004
0.00 posts per day
Posts: 27
Points: 4,896
AIM Address  MSN Messenger 
I'll give it a shot and definately get back to you.

BTW, I couldn't view your website url, it merely returned a blank page.



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