Latest Posts



· Exciting Marketplace Sale!
· Do you use cron jobs?
· WS Games v2 Theme Released
· Plug in Writers
· v4 on PHP 5
· New Western Studios Marketplace Website!
· Best free antivirus software



Radio Free Texas
The best and largest Texas/Red Dirt/Americana Music station on the web.
www.radiofreetexas.org

Live Tutorials
PHP, Photoshop, flash, illustrator tutorials.
www.live-tutorials.com

Comic Monsters
Comic Monsters News
www.comicmonsters.com

PHP Nuke Subscription
The #1 php nuke subscription module.
www.westernstudios.net

PHP Nuke Downloads
The latest and best in php nuke downloads.
www.westernstudios.net


Advertise Here


Western Studios :: View topic - Last Visit forum mod
 Forum FAQForum FAQ   SearchSearch   UsergroupsUsergroups     ProfileProfile   Log inLog in 


Last Visit forum mod



 
Post new topic   Reply to topicprinter friendly version    Western Studios Forum Index -> Hack and Mods
Western Studios

X-perienced
X-perienced

Platinum Subscriber

Posts: 124
Next Group: 26 posts
godfirst wrote:

I stumbled on a pretty good mod for my forum, and I'm trying to convert this for phpnuke. I've gotten everything done, but 1 file is puzzling.

Code:
#
#-----[ OPEN ]------------------------------------------------
#
search.php

#
#-----[ FIND ]------------------------------------------------
#
      $sql = "SELECT session_id
         FROM " . SESSIONS_TABLE;

#
#-----[ REPLACE WITH ]----------------------------------------
#

// Start replacement - Last visit MOD
   $expiry_time = $current_time - $board_config['session_length'];
      $sql = "SELECT session_id
         FROM " . SESSIONS_TABLE ." WHERE session_time>$expiry_time";
// Start replacement - Last visit MOD


The actual request line isn't there. I have found aline close and wonder if I should continue

Code:
//
      // Flood control
      //
      $where_sql = ($userdata['user_id'] == ANONYMOUS) ? "se.session_ip = '$user_ip'" : 'se.session_user_id = ' . $userdata['user_id'];
      $sql = 'SELECT MAX(sr.search_time) AS last_search_time
         FROM ' . SEARCH_TABLE . ' sr, ' . SESSIONS_TABLE . " se
         WHERE sr.session_id = se.session_id
            AND $where_sql";
      if ($result = $db->sql_query($sql))
      {
         if ($row = $db->sql_fetchrow($result))
         {


Posted: Sun Jun 04, 2006 10:22 pm

Western Studios

Site Admin
Site Admin

Platinum Subscriber

Posts: 3176
Staff
Next Group: 1824 posts
admin(Mark) wrote:

I would not recommend replacing the codes but you could try this

Change the codes you posted to this:
Code:

// Flood control
      //
$expiry_time = $current_time - $board_config['session_length'];
      $where_sql = ($userdata['user_id'] == ANONYMOUS) ? "se.session_ip = '$user_ip'" : 'se.session_user_id = ' . $userdata['user_id'];
      $sql = 'SELECT MAX(sr.search_time) AS last_search_time
         FROM ' . SEARCH_TABLE . ' sr, ' . SESSIONS_TABLE . " se
         WHERE sr.session_id = se.session_id AND se.session_time>$expiry_time
            AND $where_sql";
      if ($result = $db->sql_query($sql))
      {
         if ($row = $db->sql_fetchrow($result))
         {
 
 
 


I have added the extra codes.

Posted: Wed Jun 07, 2006 2:31 am

Western Studios

WS Newbie
WS Newbie


Posts: 10
Next Group: 40 posts
abojehad wrote:

sorry
but it does not work with me
any one try it?

Posted: Fri Jun 09, 2006 6:06 am

Post new topic   Reply to topic    Western Studios Forum Index -> Hack and Mods All times are GMT - 5 Hours
Page 1 of 1

 
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


Related topics
 Topics   Replies   Author   Views   Last Post 
No new posts PHP paste bin added 0 admin 620 Wed Mar 23, 2005 6:47 pm
admin View latest post
No new posts PHP Nuke klips 0 admin 508 Fri Mar 18, 2005 6:52 pm
admin View latest post
No new posts Paypal success.php 1 Jabba 645 Fri Mar 04, 2005 7:00 pm
admin View latest post
No new posts Testing PHP tags 2 admin 635 Thu Mar 03, 2005 6:06 pm
admin View latest post
No new posts PHP Nuke Icons 0 admin 667 Mon Aug 23, 2004 4:05 pm
admin View latest post
 
Forums ©