2 Questions - TTL / Icons

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   2 Questions - TTL / Icons
BBMB32
CZ Newbie
BBMB32 has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jul 20, 2004
0.00 posts per day
Posts: 9
Points: 386
   
Is there a way to change my TTL when someone logs in to my website and then leaves? It show's them online for about 15-30 mins after they have left....

2nd... I want to use a black theme, but when I choose one, all my icons (Your Info, Messages, Themes, Logout) have been designed for a white back ground. I don't want to manually fix those icons. Is there an Icon <gif> pack to download?

Thanks!



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
   
You can find some black themes that come with topic icons that match it. I have one here [ Register or login to view links on this board. ] if anything maybe you could use the blank and make your own.

To fix the session time open your mainfile.php and find the function online () look for the numeric time setting. It will look something like this:

$db->sql_query("DELETE FROM ".$prefix."_session WHERE time < ".($time-600));


Adjust the # to something lower. Mine is above and set at 600 seconds.



_________________
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: 2 Questions - TTL / Icons
BBMB32
CZ Newbie
BBMB32 has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jul 20, 2004
0.00 posts per day
Posts: 9
Points: 386
   
3rd person I asked.... Only one with answers!

You rock

Brandon



Back to top Reply with quote
#4   re: 2 Questions - TTL / Icons
BBMB32
CZ Newbie
BBMB32 has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jul 20, 2004
0.00 posts per day
Posts: 9
Points: 386
   
Would this be it?

function online() {
    global $user, $cookie, $prefix, $db;
    cookiedecode($user);
    $ip = $_SERVER["REMOTE_ADDR"];
    $uname = $cookie[1];
    if (!isset($uname)) {
        $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 ($row = $db->sql_fetchrow($result)) {
   $sql = "UPDATE ".$prefix."_session SET uname='$uname', time='$ctime', host_addr='$ip', guest='$guest' WHERE uname='$uname'";
   $db->sql_query($sql);
    } else {
   $sql = "INSERT INTO ".$prefix."_session (uname, time, host_addr, guest) VALUES ('$uname', '$ctime', '$ip', '$guest')";
   $db->sql_query($sql);
    }
}




Back to top Reply with quote
#5   re: 2 Questions - TTL / Icons
BBMB32
CZ Newbie
BBMB32 has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jul 20, 2004
0.00 posts per day
Posts: 9
Points: 386
   
Bump



Back to top Reply with quote
#6   
dsnail2000
CZ Super Newbie
 Codezwiz Site Donator
dsnail2000 has been a member for over 20 year's 20 Year Member
usa.gif virginia.gif
Age: 41
Gender: Male
Website:
Status: Offline
Joined: Jun 28, 2004
0.00 posts per day
Posts: 36
Points: 6,786
   
nope, do a search for:
$db->sql_query("DELETE FROM ".$prefix."_session WHERE time

that should help you find the exact place where the code telli mentioned is

then edit the number in the code that should be inline with the code you just searched for.


Back to top Reply with quote
#7   re: 2 Questions - TTL / Icons
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
   
Its a little differant in your mainfile.phph change the

$past = time()-3600;


to

$past = time()-600;




_________________
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
#8   re: 2 Questions - TTL / Icons
BBMB32
CZ Newbie
BBMB32 has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jul 20, 2004
0.00 posts per day
Posts: 9
Points: 386
   
Hmm.... I don't see that line.... The only one I see is the one I posted above.

Could I change the $past to like 5?



Back to top Reply with quote
#9   Re: re: 2 Questions - TTL / Icons
BBMB32
CZ Newbie
BBMB32 has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jul 20, 2004
0.00 posts per day
Posts: 9
Points: 386
   


Originally posted by Telli @ Thu Jul 22, 2004 4:14 am:

Its a little differant in your mainfile.phph change the

$past = time()-3600;


to

$past = time()-600;



Will try that icon_smile.gif


Back to top Reply with quote
#10   re: 2 Questions - TTL / Icons
BBMB32
CZ Newbie
BBMB32 has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jul 20, 2004
0.00 posts per day
Posts: 9
Points: 386
   
Just modified it from $past -3600 to -60 and it works like a charm icon_smile.gif

Thank you VERY much!



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