Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > Free Torrent Source > Mods & Themes
Reply
  #1  
Old 28th December 2009, 10:59
Edgein's Avatar
Edgein Edgein is offline
Senior Member
 
Join Date: Sep 2008
Netherlands
Posts: 154
Smile [FTS 1.1] Make usernames by whats going on a clickable link
include/facktory.php

find

PHP Code:
    public function whatsgoingon() {
        $a = @mysql_fetch_assoc(@sql_query("SELECT id,username FROM users WHERE status='confirmed' ORDER BY id DESC LIMIT 1")) or sqlerr(__FILE__, __LINE__);
if ($CURUSER)
  $latestuser = "<a href=userdetails.php?id=" . $a["id"] . ">" . $a["username"] . "</a>";
else
  $latestuser = $a['username'];



//stats
$dt24 = gmtime() - 86400;
$arr = mysql_fetch_assoc(sql_query("SELECT * FROM avps WHERE arg='last24'")) or $no24=true;
$res=sql_query("SELECT * FROM users WHERE last_access >= '". get_date_time($dt24). "' ORDER BY username") or sqlerr(__FILE__, __LINE__);
$totalonline24 = mysql_num_rows($res);

$_ss24 = ($totalonline24 != 1) ? 's':'';

$last24record = get_date_time($arr["value_u"]);
$last24 = $arr["value_i"];
if ($no24 || $totalonline24 > $last24 )
{
$last24 = $totalonline24;

$period = strtotime(gmdate("Y-m-d H:i:s"));
sql_query(($no24 ? 'INSERT':'UPDATE'). " avps SET value_i = $last24 , value_u = $period ". ($no24 ? ", arg='last24'":"WHERE arg='last24'")) or sqlerr();
}
while ($arr = mysql_fetch_assoc($res))
{
if ($activeusers24) $activeusers24 .= ",\n";

   $arr["username"] = get_style($arr['class'],$arr['username']);

if($donator = $arr["donor"] === "yes");
$activeusers24 .= "<nobr>";
if ($warned = $arr["warned"] === "yes")
$activeusers24 .= "<nobr>";
if ($CURUSER)
$activeusers24 .= "<a href=userdetails.php?id={$arr["id"]}><b>{$arr["username"]}</b></a>";
else
$activeusers24 .= "<b>{$arr["username"]}</b>";
if ($donator)
$activeusers24 .= "<img src={$pic_base_url}star.gif alt='Donated {$$arr["donor"]}'></nobr>";
if ($warned)
$activeusers24 .= "<img src={$pic_base_url}warned.gif alt='Warned {$$arr["warned"]}'></nobr>";
}

if (!$activeusers24)
$activeusers24 = "There have been no active users in the last 24 hours.";
$dt = gmtime() - 180;
$dt = sqlesc(get_date_time($dt));
$res = sql_query("SELECT id, username, class FROM users WHERE last_access >= $dt ORDER BY username") or print(mysql_error());
while ($arr = mysql_fetch_assoc($res))
{
    
  if ($activeusers) $activeusers .= ",\n";
  $arr['username'] = get_style($arr['class'],$arr['username']);
  
  $dispclass = get_user_class_name($arr['class']);
  $donator = $arr["donated"] > 0;
  if ($donator)
    $activeusers .= "<nobr>";
  if ($CURUSER)
    $activeusers .= "<a href=userdetails.php?id=" . $arr["id"] . "><b>" . $arr["username"] . "</b></a>";
  else
    $activeusers .= "<b>$arr[username]</b>";
  if ($donator)
    $activeusers .= "<img src=pic/star.gif alt='Donated $$arr[donated]'></nobr>";
}
if (!$activeusers)
  $activeusers = "There have been no active users in the last 15 minutes.";
    echo _br;
    global $BASEURL;
    collapses('whatisgon','<b>Whats goin on?</b>');
$activeusers24 = explode(",",$activeusers24);
$activeusers = explode(",",$activeusers);
?>
<center>
<?=$totalonline24?> Member<?=$_ss24?> has visited during the last 24 hours <a href="javascript:klappe_news('u24')"><img border="0" src='<?$BASEURL?>/pic/plus.gif' id="pica0"/></a> <br>
<div id="ku24" style="display: none;">
<?php
$i 
;
foreach(
$activeusers24 as $fts) {
    
$perrow 17 ;
    echo 
$fts;
    print ( (
$i && $i $perrow == 0) ? "<br>" "" ) ;
    
$i++;
}
?>
</div>
Welcome to our newest member, <b><?=$latestuser?></b>!<br>
Active users     <a href="javascript:klappe_news('a0')"><img border="0" src='<?$BASEURL?>/pic/plus.gif' id="pica0"/></a>
                <div id="ka0" style="display: none;">
                    <p align="justify">
                    <?php
                    
foreach($activeusers as $fts) {
    
$perrow 17 ;
    echo 
$fts;
    print ( (
$i && $i $perrow == 0) ? "<br>" "" ) ;
    
$i++;
}
                    
?></p>
                </div>
</center>

<?php
collapsee
();
    }
and replace with

PHP Code:
    public function whatsgoingon() {
$a = @mysql_fetch_assoc(@sql_query("SELECT id,username FROM users WHERE status='confirmed' ORDER BY id DESC LIMIT 1")) or sqlerr(__FILE__, __LINE__);
if ($CURUSER)
  $latestuser = "<a href=userdetails.php?id=" . $a["id"] . ">" . $a["username"] . "</a>";
else
  $latestuser = "<a href=userdetails.php?id=" . $a["id"] . ">" . $a["username"] . "</a>";


//stats
$dt24 = gmtime() - 86400;
$arr = mysql_fetch_assoc(sql_query("SELECT * FROM avps WHERE arg='last24'")) or $no24=true;
$res=sql_query("SELECT * FROM users WHERE last_access >= '". get_date_time($dt24). "' ORDER BY username") or sqlerr(__FILE__, __LINE__);
$totalonline24 = mysql_num_rows($res);

$_ss24 = ($totalonline24 != 1) ? 's':'';

$last24record = get_date_time($arr["value_u"]);
$last24 = $arr["value_i"];
if ($no24 || $totalonline24 > $last24 )
{
$last24 = $totalonline24;

$period = strtotime(gmdate("Y-m-d H:i:s"));
sql_query(($no24 ? 'INSERT':'UPDATE'). " avps SET value_i = $last24 , value_u = $period ". ($no24 ? ", arg='last24'":"WHERE arg='last24'")) or sqlerr();
}
while ($arr = mysql_fetch_assoc($res))
{
if ($activeusers24) $activeusers24 .= ",\n";

   $arr["username"] = get_style($arr['class'],$arr['username']);

if($donator = $arr["donor"] === "yes");
$activeusers24 .= "<nobr>";
if ($warned = $arr["warned"] === "yes")
$activeusers24 .= "<nobr>";
if ($CURUSER)
$activeusers24 .= "<b><a href=userdetails.php?id={$arr["id"]}><b>{$arr["username"]}</b></a>";
else
$activeusers24 .= "<b><a href=userdetails.php?id={$arr["id"]}><b>{$arr["username"]}</b></a>";
if ($donator)
$activeusers24 .= "<img src={$pic_base_url}star.gif alt='Donated {$$arr["donor"]}'></nobr>";
if ($warned)
$activeusers24 .= "<img src={$pic_base_url}warned.gif alt='Warned {$$arr["warned"]}'></nobr>";
}

if (!$activeusers24)
$activeusers24 = "There have been no active users in the last 24 hours.";
$dt = gmtime() - 180;
$dt = sqlesc(get_date_time($dt));
$res = sql_query("SELECT id, username, class FROM users WHERE last_access >= $dt ORDER BY username") or print(mysql_error());
while ($arr = mysql_fetch_assoc($res))
{
    
  if ($activeusers) $activeusers .= ",\n";
  $arr['username'] = get_style($arr['class'],$arr['username']);
  
  $dispclass = get_user_class_name($arr['class']);
  $donator = $arr["donated"] > 0;
  if ($donator)
    $activeusers .= "<nobr>";
  if ($CURUSER)
    $activeusers .= "<b><a href=userdetails.php?id=" . $arr["id"] . "><b>" . $arr["username"] . "</b></a>";
  else
    $activeusers .= "<b><a href=userdetails.php?id=" . $arr["id"] . "><b>" . $arr["username"] . "</b></a>";
  if ($donator)
    $activeusers .= "<img src=pic/star.gif alt='Donated $$arr[donated]'></nobr>";
}
if (!$activeusers)
  $activeusers = "There have been no active users in the last 15 minutes.";
    echo _br;
    global $BASEURL;
    collapses('whatisgon','<b>Whats goin on?</b>');
$activeusers24 = explode(",",$activeusers24);
$activeusers = explode(",",$activeusers);
?>
<center>
<?=$totalonline24?> Member<?=$_ss24?> has visited during the last 24 hours <a href="javascript:klappe_news('u24')"><img border="0" src='<?$BASEURL?>/pic/plus.gif' id="pica0"/></a> <br>
<div id="ku24" style="display: none;">
<?php
$i 
;
foreach(
$activeusers24 as $fts) {
    
$perrow 17 ;
    echo 
$fts;
    print ( (
$i && $i $perrow == 0) ? "<br>" "" ) ;
    
$i++;
}
?>
</div>
Welcome to our newest member, <b><?=$latestuser?></b>!<br>
Active users     <a href="javascript:klappe_news('a0')"><img border="0" src='<?$BASEURL?>/pic/plus.gif' id="pica0"/></a>
                <div id="ka0" style="display: none;">
                    <p align="justify">
                    <?php
                    
foreach($activeusers as $fts) {
    
$perrow 17 ;
    echo 
$fts;
    print ( (
$i && $i $perrow == 0) ? "<br>" "" ) ;
    
$i++;
}
                    
?></p>
                </div>
</center>

<?php
collapsee
();
    }
greetzz Edgein
Reply With Quote
The Following 2 Users Say Thank You to Edgein For This Useful Post:
benjaminbih (28th December 2009), Darkness (1st January 2012)
  #2  
Old 28th December 2009, 11:56
yoligim yoligim is offline
Senior Member
 
Join Date: Nov 2009
Spain
Posts: 43
Default
ok, done, nice mod Edgein, thank you
Reply With Quote
Reply

Tags
11 , clickable , fts , link , make , usernames

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Make "More Smilies" and "Help" on FTS shoutbox a clickable link benjaminbih Mods & Themes 1 22nd December 2009 07:22
Whats Up? AgentChaos Introduce Yourself 2 24th August 2009 13:17
Whats up ! reality818 Introduce Yourself 1 15th July 2009 02:07
whats up? KlasiiK Introduce Yourself 0 1st April 2009 01:02
whats new? 4.3 vs. 5.0 D3SI Template Shares 4 18th June 2008 22:29



All times are GMT +2. The time now is 23:34. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.