Top Posters on Index

Here my mods and history gets moved when validated and released to the phpbb.com MODDB

Top Posters on Index

Postby lefty » Sun Jul 01, 2007 6:47 pm

MOD Title: Top Posters on Index
MOD Description: Shows the top x posters on the Index page. The number of top posters can be changed in the board settings. In addition shows the top posters in the last x hours, also defined in the board settings.
MOD Version: 1.0.0a

MOD Download: Top Posters on Index Page 1.0.0a
phpbb3 version: Gold

Demo Board: Demoboard
Image
Demo Username: test
Demo Password: testtest

Credits: To Spinebuster who wrote this mod for phpbb2
Last edited by lefty on Tue Oct 30, 2007 11:26 pm, edited 5 times in total.
lefty aka The Heikze! :eyebrowe:

Heiko Carstens
http://www.lefty74.com

Would you like me to install one of my mods for you? Read here for details
lefty
Abschlussklasse R10c
 
Posts: 1357
Joined: Mon Feb 06, 2006 1:20 am
Location: Den Haag - NL

Postby lefty » Mon Jul 02, 2007 9:20 pm

updated to Beta and provided install instructions :cheer:
lefty aka The Heikze! :eyebrowe:

Heiko Carstens
http://www.lefty74.com

Would you like me to install one of my mods for you? Read here for details
lefty
Abschlussklasse R10c
 
Posts: 1357
Joined: Mon Feb 06, 2006 1:20 am
Location: Den Haag - NL

Postby lefty » Thu Jul 05, 2007 10:56 pm

added top posters in last x hours, first post updated!
lefty aka The Heikze! :eyebrowe:

Heiko Carstens
http://www.lefty74.com

Would you like me to install one of my mods for you? Read here for details
lefty
Abschlussklasse R10c
 
Posts: 1357
Joined: Mon Feb 06, 2006 1:20 am
Location: Den Haag - NL

Postby lefty » Tue Oct 30, 2007 11:27 pm

updated to 0.1.1.
Code: Select all
## 2007-10-30 - Version 0.1.1
##      -changed query to make more phpbb3 compliant

to update
Code: Select all
OPEN INDEX.PHP
//
//Comment basically this will correct
//   if( !($result = $db->sql_query($sql)) )
//   {
//        message_die(GENERAL_ERROR, 'Could not Query Top Posting Users', '', __LINE__, __FILE__, $sql);
//   }
//
// to
//         $result = $db->sql_query($sql);
//
// but I noticed that I also duplicated a lot of code by accident which below replace will take care of
//

FIND
//Generate top poster list if required

if ($config['amount_top_posters'])
{
   $top_posters = $config['amount_top_posters'];

   $sql = "SELECT username, user_id, user_colour, user_posts
          FROM " . USERS_TABLE . "
          WHERE user_id <> " . ANONYMOUS . "
         AND user_posts > 0
          ORDER BY user_posts DESC LIMIT $top_posters";
   if( !($result = $db->sql_query($sql)) )
   {
       message_die(GENERAL_ERROR, 'Could not Query Top Posting Users', '', __LINE__, __FILE__, $sql);
   }

   $top_posters_list = '';

   while ($row = $db->sql_fetchrow($result))
   {
      if ($row['user_colour'])
         {
            $user_colour = ' style="color:#' . $row['user_colour'] . '"';
            $row['username'] = '<strong>' . $row['username'] . '</strong>';
         }
      else
         {
            $user_colour = '';
         }
      $top_posters_list  .= (($top_posters_list  != '') ? ', ' : '') . '<a' . $user_colour . ' href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $row['user_id']) . '">' . $row['username'] . '</a> ('. $row['user_posts'] .')';

   }
   $db->sql_freeresult($result);
}
//Generate top poster list if required

if ($config['amount_top_posters'])
{
   $top_posters = $config['amount_top_posters'];

   
   // count top x posters
   $sql = "SELECT username, user_id, user_colour, user_posts
          FROM " . USERS_TABLE . "
          WHERE user_id <> " . ANONYMOUS . "
         AND user_posts > 0
          ORDER BY user_posts DESC LIMIT $top_posters";
   if( !($result = $db->sql_query($sql)) )
   {
       message_die(GENERAL_ERROR, 'Could not Query Top Posting Users', '', __LINE__, __FILE__, $sql);
   }
   $top_posters_list = '';

   while ($row = $db->sql_fetchrow($result))
   {
      if ($row['user_colour'])
         {
            $user_colour = ' style="color:#' . $row['user_colour'] . '"';
            $row['username'] = '<strong>' . $row['username'] . '</strong>';
         }
      else
         {
            $user_colour = '';
         }
      $top_posters_list  .= (($top_posters_list  != '') ? ', ' : '') . '<a' . $user_colour . ' href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $row['user_id']) . '">' . $row['username'] . '</a> ('. $row['user_posts'] .')';

   }
   $db->sql_freeresult($result);


   // count x top posters in the last x hours
   if ( $config['top_posters_hours'] )
   {
   $xhours = ( $config['top_posters_hours'] * 3600 );
   
   $time = time() - $xhours;
   $sql = "SELECT u.user_id, u.username, u.user_colour, COUNT(p.post_id) as total_posts
          FROM " . USERS_TABLE . " u, " . POSTS_TABLE . " p
         WHERE p.post_time > " . $time . "
         AND u.user_id = p.poster_id
         AND u.user_id <> " . ANONYMOUS . "
         GROUP BY u.user_id
         ORDER BY total_posts DESC LIMIT $top_posters";
   if( !($result = $db->sql_query($sql)) )
   {
       message_die(GENERAL_ERROR, 'Could not Query Top Posting Users', '', __LINE__, __FILE__, $sql);
   }
   $top_posters_hours_list = '';

   while ($row = $db->sql_fetchrow($result))
   {
      if ($row['user_colour'])
         {
            $user_colour = ' style="color:#' . $row['user_colour'] . '"';
            $row['username'] = '<strong>' . $row['username'] . '</strong>';
         }
      else
         {
            $user_colour = '';
         }
      $top_posters_hours_list  .= (($top_posters_hours_list  != '') ? ', ' : '') . '<i><a' . $user_colour . ' href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $row['user_id']) . '">' . $row['username'] . '</a> ('. $row['total_posts'] .')</i>';

   }
   $db->sql_freeresult($result);
   }
   
   $top_posters_hours = ( $config['top_posters_hours'] == 1 ) ? $user->lang['TOP_POSTERS_HOUR'] : sprintf($user->lang['TOP_POSTERS_HOURS'],$config['top_posters_hours']);
}


REPLACE WITH
//Generate top poster list if required

if ($config['amount_top_posters'])
{
   $top_posters = $config['amount_top_posters'];

   
   // count top x posters
   $sql = "SELECT username, user_id, user_colour, user_posts
          FROM " . USERS_TABLE . "
          WHERE user_id <> " . ANONYMOUS . "
         AND user_posts > 0
          ORDER BY user_posts DESC LIMIT $top_posters";
         $result = $db->sql_query($sql);
   $top_posters_list = '';

   while ($row = $db->sql_fetchrow($result))
   {
      if ($row['user_colour'])
         {
            $user_colour = ' style="color:#' . $row['user_colour'] . '"';
            $row['username'] = '<strong>' . $row['username'] . '</strong>';
         }
      else
         {
            $user_colour = '';
         }
      $top_posters_list  .= (($top_posters_list  != '') ? ', ' : '') . '<a' . $user_colour . ' href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $row['user_id']) . '">' . $row['username'] . '</a> ('. $row['user_posts'] .')';

   }
   $db->sql_freeresult($result);


   // count x top posters in the last x hours
   if ( $config['top_posters_hours'] )
   {
   $xhours = ( $config['top_posters_hours'] * 3600 );
   
   $time = time() - $xhours;
   $sql = "SELECT u.user_id, u.username, u.user_colour, COUNT(p.post_id) as total_posts
          FROM " . USERS_TABLE . " u, " . POSTS_TABLE . " p
         WHERE p.post_time > " . $time . "
         AND u.user_id = p.poster_id
         AND u.user_id <> " . ANONYMOUS . "
         GROUP BY u.user_id
         ORDER BY total_posts DESC LIMIT $top_posters";
         $result = $db->sql_query($sql);
   $top_posters_hours_list = '';

   while ($row = $db->sql_fetchrow($result))
   {
      if ($row['user_colour'])
         {
            $user_colour = ' style="color:#' . $row['user_colour'] . '"';
            $row['username'] = '<strong>' . $row['username'] . '</strong>';
         }
      else
         {
            $user_colour = '';
         }
      $top_posters_hours_list  .= (($top_posters_hours_list  != '') ? ', ' : '') . '<i><a' . $user_colour . ' href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $row['user_id']) . '">' . $row['username'] . '</a> ('. $row['total_posts'] .')</i>';

   }
   $db->sql_freeresult($result);
   }
   
   $top_posters_hours = ( $config['top_posters_hours'] == 1 ) ? $user->lang['TOP_POSTERS_HOUR'] : sprintf($user->lang['TOP_POSTERS_HOURS'],$config['top_posters_hours']);
}

lefty aka The Heikze! :eyebrowe:

Heiko Carstens
http://www.lefty74.com

Would you like me to install one of my mods for you? Read here for details
lefty
Abschlussklasse R10c
 
Posts: 1357
Joined: Mon Feb 06, 2006 1:20 am
Location: Den Haag - NL

Re: [Beta] Top Posters on Index Page 0.1.2

Postby lefty » Wed Jan 16, 2008 12:10 am

updated to 0.1.2

Code: Select all
## 2008-01-15 - Version 0.1.2
##      -changed code to prepare for RC
lefty aka The Heikze! :eyebrowe:

Heiko Carstens
http://www.lefty74.com

Would you like me to install one of my mods for you? Read here for details
lefty
Abschlussklasse R10c
 
Posts: 1357
Joined: Mon Feb 06, 2006 1:20 am
Location: Den Haag - NL

Re: [Beta] Top Posters on Index Page 0.2.0

Postby lefty » Sun Jan 20, 2008 5:30 pm

updated to beta 0.2.0
Code: Select all
## 2008-01-20 - Version 0.2.0
##      -added the possibility to exclude admins, mods and specific user_ids

ugrade instructions are in the contrib folder
lefty aka The Heikze! :eyebrowe:

Heiko Carstens
http://www.lefty74.com

Would you like me to install one of my mods for you? Read here for details
lefty
Abschlussklasse R10c
 
Posts: 1357
Joined: Mon Feb 06, 2006 1:20 am
Location: Den Haag - NL

Re: [RC] Top Posters on Index Page 1.0.0

Postby lefty » Wed Feb 27, 2008 10:14 pm

Code: Select all
## 2008-02-26 - Version 1.0.0
##      -repackaged for RC and submission to Mods DB

to upgrade, find the instructions in the contrib folder
lefty aka The Heikze! :eyebrowe:

Heiko Carstens
http://www.lefty74.com

Would you like me to install one of my mods for you? Read here for details
lefty
Abschlussklasse R10c
 
Posts: 1357
Joined: Mon Feb 06, 2006 1:20 am
Location: Den Haag - NL

Re: [RC2] Top Posters on Index Page 1.0.0a

Postby lefty » Tue Mar 11, 2008 8:55 pm

Code: Select all
## 2008-03-11 - Version 1.0.0a
##      -fixed some code after MOD denial
lefty aka The Heikze! :eyebrowe:

Heiko Carstens
http://www.lefty74.com

Would you like me to install one of my mods for you? Read here for details
lefty
Abschlussklasse R10c
 
Posts: 1357
Joined: Mon Feb 06, 2006 1:20 am
Location: Den Haag - NL

Re: Top Posters on Index

Postby lefty » Sun Mar 30, 2008 12:57 pm

This mod has been validated and approved to the phpbb.com MODDB.
http://www.phpbb.com/community/viewtopi ... 5#p4917325
lefty aka The Heikze! :eyebrowe:

Heiko Carstens
http://www.lefty74.com

Would you like me to install one of my mods for you? Read here for details
lefty
Abschlussklasse R10c
 
Posts: 1357
Joined: Mon Feb 06, 2006 1:20 am
Location: Den Haag - NL

Re: Top Posters on Index

Postby rahul » Thu Jun 05, 2008 9:50 am

hi lefty....
i downloaded ur top posters mod....
i even installed the mod in phpbb3 according to all the steps given in install.xml
but after completion i cant see the top posters module anywhere....
not even on the board index page nor in the ACP....
so please help me out with the same asap.... :newcry2:
give me a solution to install the top_posters mod in phpbb3...
rahul
Newbie/Neuling
 
Posts: 3
Joined: Thu Jun 05, 2008 9:37 am

Re: Top Posters on Index

Postby lefty » Thu Jun 05, 2008 11:44 am

you would see the ACP part in the Board Settings.
did you clear your chache and refresh your templates after installing?
lefty aka The Heikze! :eyebrowe:

Heiko Carstens
http://www.lefty74.com

Would you like me to install one of my mods for you? Read here for details
lefty
Abschlussklasse R10c
 
Posts: 1357
Joined: Mon Feb 06, 2006 1:20 am
Location: Den Haag - NL

Re: Top Posters on Index

Postby rahul » Thu Jun 05, 2008 1:16 pm

yes i did refresh the cache and the templates......
but to no avail i cannot see the mod anywhere...not on the board settings nor on the main page....
but lemme still try nd install the mod again....
but does dis mod works with phpBB-3.0.1 properly???
rahul
Newbie/Neuling
 
Posts: 3
Joined: Thu Jun 05, 2008 9:37 am

Re: Top Posters on Index

Postby rahul » Thu Jun 05, 2008 1:48 pm

hi lefty...
thank you sooo much for ur support....
i re-installed the mod again....nd figured out the problem...
there was sum prob of the table prefixes...and inserting the values....i fixed it up...
thank you sooo much for ur concern again....!!! :new_grin:
rahul
Newbie/Neuling
 
Posts: 3
Joined: Thu Jun 05, 2008 9:37 am

Re: Top Posters on Index

Postby yberf » Tue Jul 08, 2008 9:51 pm

hi lefty74, thank you for all the work you did on Olympus! :)
I have a travel board but a lot of users post a lot also in an Off Topic forum; just a question: is there the possibility to esclude from the count all the messages posted in specific forums in order to have a "real" list?

thank you very much! :)
yberf
yberf
Newbie/Neuling
 
Posts: 2
Joined: Tue Jul 08, 2008 9:47 pm

Re: Top Posters on Index

Postby lefty » Wed Jul 09, 2008 7:14 pm

i am sure it is, i will try to have a look later this week as i am rather tied up with other things at the moment.
lefty aka The Heikze! :eyebrowe:

Heiko Carstens
http://www.lefty74.com

Would you like me to install one of my mods for you? Read here for details
lefty
Abschlussklasse R10c
 
Posts: 1357
Joined: Mon Feb 06, 2006 1:20 am
Location: Den Haag - NL

Re: Top Posters on Index

Postby yberf » Wed Jul 09, 2008 8:23 pm

you're great! :)
yberf
Newbie/Neuling
 
Posts: 2
Joined: Tue Jul 08, 2008 9:47 pm

Re: Top Posters on Index

Postby Bound » Sun Aug 31, 2008 8:06 am

I have two errors :(
SQL ERROR [ mysqli ]

Duplicate entry 'top_posters_excl_adm' for key 1 [1062]

SQL

INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('top_posters_excl_adm', 0, 0)

BACKTRACE


FILE: includes/db/mysqli.php
LINE: 143
CALL: dbal->sql_error()

FILE: includes/functions.php
LINE: 156
CALL: dbal_mysqli->sql_query()

FILE: includes/acp/acp_board.php
LINE: 423
CALL: set_config()

FILE: includes/functions_module.php
LINE: 471
CALL: acp_board->main()

FILE: adm/index.php
LINE: 74
CALL: p_master->load_active()
Bound
Forum Member
 
Posts: 12
Joined: Thu Aug 28, 2008 5:43 pm

Re: Top Posters on Index

Postby Bound » Sun Aug 31, 2008 9:21 am

I also tried to restore mysql I made a backup before starting with the mod,but that gave an error also :(

Now I have on top of my acp pannel this errors:
[phpBB Debug] PHP Notice: in file /includes/acp/acp_board.php on line 809: Invalid argument supplied for foreach()
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 821: Invalid argument supplied for foreach()
[phpBB Debug] PHP Notice: in file /adm/index.php on line 150: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2975)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 152: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2975)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 153: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2975)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 154: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2975)

Also the statistics are gone on the bottom of the index page and all buttons have changed.
Bound
Forum Member
 
Posts: 12
Joined: Thu Aug 28, 2008 5:43 pm

Re: Top Posters on Index

Postby lefty » Sun Aug 31, 2008 9:48 am

hi, you need to get in the habit to purge your cache and refreshing templates after you install a mod. the error message you indicated in your first post normally is normally not seen if you purge your cache. ;)

as for the second message, what exactly did you do? just restore an old sql backup or also file backup?
lefty aka The Heikze! :eyebrowe:

Heiko Carstens
http://www.lefty74.com

Would you like me to install one of my mods for you? Read here for details
lefty
Abschlussklasse R10c
 
Posts: 1357
Joined: Mon Feb 06, 2006 1:20 am
Location: Den Haag - NL

Re: Top Posters on Index

Postby Bound » Sun Aug 31, 2008 9:53 am

I just restored a sql backup from just before I made mod.
And also dit a file restore I did backup the files before modifying them
As for the purging the cache I did :(
I have dissabled the board now as its all messed up on the index page old posts are back on page 1

Thx for helping
Bound
Forum Member
 
Posts: 12
Joined: Thu Aug 28, 2008 5:43 pm

Re: Top Posters on Index

Postby lefty » Sun Aug 31, 2008 9:57 am

that's the first time my mod would have caused such problems.

do you have msn? i can try and see if i can help...
lefty aka The Heikze! :eyebrowe:

Heiko Carstens
http://www.lefty74.com

Would you like me to install one of my mods for you? Read here for details
lefty
Abschlussklasse R10c
 
Posts: 1357
Joined: Mon Feb 06, 2006 1:20 am
Location: Den Haag - NL

Re: Top Posters on Index

Postby demetris20 » Mon Oct 20, 2008 8:39 pm

hello
i have install this mod but its seems its not showing the top posters on the index
i have clear my cache refresh the tempates but nothing seems to work

i use the fisubsilver2 style

here is the code of that style

Code: Select all
<!-- INCLUDE overall_header.html -->

<!-- IF U_MCP -->
   <div id="pageheader">
      <p class="linkmcp">[ <a href="{U_MCP}">{L_MCP}</a> ]</p>
   </div>

   <br clear="all" /><br />
<!-- ENDIF -->

<!-- INCLUDE forumlist_body.html -->

<span class="gensmall"><!-- IF not S_IS_BOT --><a href="{U_DELETE_COOKIES}">{L_DELETE_COOKIES}</a><!-- ENDIF --> | <a href="{U_TEAM}">{L_THE_TEAM}</a></span><br />

<br clear="all" />

<!-- INCLUDE breadcrumbs.html -->

<!-- IF S_DISPLAY_ONLINE_LIST -->
   <br clear="all" />

   <table class="tablebg" width="100%" cellspacing="1">
   <tr>
      <td class="cat" colspan="2"><!-- IF U_VIEWONLINE --><h4><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a></h4><!-- ELSE --><h4>{L_WHO_IS_ONLINE}</h4><!-- ENDIF --></td>
   </tr>
   <tr>
   
   <!-- IF LEGEND -->
      <td class="row1" rowspan="2" align="center" valign="middle"><img src="{T_THEME_PATH}/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>
   <!-- ELSE -->
      <td class="row1" align="center" valign="middle"><img src="{T_THEME_PATH}/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>
   <!-- ENDIF -->
      <td class="row1" width="100%"><span class="genmed">{TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN})<br />{RECORD_USERS}<br /><br />{LOGGED_IN_USER_LIST}</span></td>
   </tr>
   
   <!-- IF LEGEND -->
      <tr>
         <td class="row1"><b class="gensmall">{L_LEGEND} :: {LEGEND}</b></td>

      </tr>
               
   <!-- ENDIF -->
   </table>
<!-- ENDIF -->
<!-- IF TOP_POSTERS_LIST -->
   <h3>{L_TOP_POSTERS}</h3>
   <p>{TOP_POSTERS_LIST}<br />
<!-- IF TOP_POSTERS_HOURS_LIST -->
   <i>{TOP_POSTERS_HOURS}</i>    
   {TOP_POSTERS_HOURS_LIST}
<!-- ENDIF -->
</p>
<!-- ENDIF -->

<!-- IF S_DISPLAY_BIRTHDAY_LIST -->
   <br clear="all" />

   <table class="tablebg" width="100%" cellspacing="1">
   <tr>
      <td class="cat" colspan="2"><h4>{L_BIRTHDAYS}</h4></td>
   </tr>
   <tr>
      <td class="row1" align="center" valign="middle"><img src="{T_THEME_PATH}/images/happy_birthday.gif" alt="{L_BIRTHDAYS}" /></td>
      <td class="row1" width="100%"><p class="genmed"><!-- IF BIRTHDAY_LIST -->{L_CONGRATULATIONS}: <b>{BIRTHDAY_LIST}</b><!-- ELSE -->{L_NO_BIRTHDAYS}<!-- ENDIF --></p></td>
   </tr>
   </table>
<!-- ENDIF -->

<br clear="all" />

<table class="tablebg" width="100%" cellspacing="1">
<tr>
   <td class="cat" colspan="2"><h4>{L_STATISTICS}</h4></td>
</tr>
<tr>
   <td class="row1"><img src="{T_THEME_PATH}/images/whosonline.gif" alt="{L_STATISTICS}" /></td>
   <td class="row1" width="100%" valign="middle"><p class="genmed">{TOTAL_POSTS} | {TOTAL_TOPICS} | {TOTAL_USERS} | {NEWEST_USER}</p></td>      
</tr>

<tr>
   <!-- IF not S_IS_BOT --><br /><br />
   <td class="row1" colspan="2"><font style="font-size:8pt">{USERS_24HOUR_TOTAL}: <!-- BEGIN lastvisit -->{lastvisit.USERNAME_FULL}<!-- IF not lastvisit.S_LAST_ROW -->, <!-- ENDIF --><!-- END lastvisit --></font></td>
   <!-- ENDIF -->
   </tr>
<!-- IF not S_IS_BOT -->
   <td class="row1" colspan="2"><h3 id="24hour_stats">{L_24HOUR_STATS}</h3>
   <p>{24HOUR_POSTS} &bull; {24HOUR_TOPICS} &bull; {24HOUR_USERS}</p></td>
   <!-- ENDIF -->
</table>

<!-- IF not S_USER_LOGGED_IN -->
   <br clear="all" />

   <form method="post" action="{S_LOGIN_ACTION}">
   
   <table class="tablebg" width="100%" cellspacing="1">
   <tr>
      <td class="cat"><h4><a href="{U_LOGIN_LOGOUT}">{L_LOGIN_LOGOUT}</a></h4></td>
   </tr>
   <tr>
      <td class="row1" align="center"><span class="genmed">{L_USERNAME}:</span> <input class="post" type="text" name="username" size="10" />&nbsp; <span class="genmed">{L_PASSWORD}:</span> <input class="post" type="password" name="password" size="10" />&nbsp; <!-- IF S_AUTOLOGIN_ENABLED --> <span class="gensmall">{L_LOG_ME_IN}</span> <input type="checkbox" class="radio" name="autologin" /><!-- ENDIF -->&nbsp; <input type="submit" class="btnmain" name="login" value="{L_LOGIN}" /></td>
   </tr>
   </table>
   {S_FORM_TOKEN}
   </form>
<!-- ENDIF -->

<br clear="all" />

<table class="legend">
<tr>
   <td width="20" align="center">{FORUM_NEW_IMG}</td>
   <td><span class="gensmall">{L_NEW_POSTS}</span></td>
   <td>&nbsp;&nbsp;</td>
   <td width="20" align="center">{FORUM_IMG}</td>
   <td><span class="gensmall">{L_NO_NEW_POSTS}</span></td>
   <td>&nbsp;&nbsp;</td>
   <td width="20" align="center">{FORUM_LOCKED_IMG}</td>
   <td><span class="gensmall">{L_FORUM_LOCKED}</span></td>
</tr>
</table>

<!-- INCLUDE overall_footer.html -->


also something else
this mod will display the top poster of the last 24 hours or 30 day or it will display the top posters of all the times
any help will be appreciated
demetris20
Forum Member
 
Posts: 15
Joined: Mon Oct 20, 2008 8:34 pm

Re: Top Posters on Index

Postby lefty » Mon Oct 20, 2008 9:23 pm

hi,
this mod displays the overall top posters as well as the top posters in the last x hours (you can define in the acp how many hours).

for subsilver2 based styles, i would always recommend to use the subsilver2 template change.

try if this works: (dont forget to purge cache and refresh your template
Code: Select all
<!-- INCLUDE overall_header.html -->

<!-- IF U_MCP -->
   <div id="pageheader">
     <p class="linkmcp">[ <a href="{U_MCP}">{L_MCP}</a> ]</p>
   </div>

   <br clear="all" /><br />
<!-- ENDIF -->

<!-- INCLUDE forumlist_body.html -->

<span class="gensmall"><!-- IF not S_IS_BOT --><a href="{U_DELETE_COOKIES}">{L_DELETE_COOKIES}</a><!-- ENDIF --> | <a href="{U_TEAM}">{L_THE_TEAM}</a></span><br />

<br clear="all" />

<!-- INCLUDE breadcrumbs.html -->

<!-- IF S_DISPLAY_ONLINE_LIST -->
   <br clear="all" />

   <table class="tablebg" width="100%" cellspacing="1">
   <tr>
     <td class="cat" colspan="2"><!-- IF U_VIEWONLINE --><h4><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a></h4><!-- ELSE --><h4>{L_WHO_IS_ONLINE}</h4><!-- ENDIF --></td>
   </tr>
   <tr>
   
   <!-- IF LEGEND -->
     <td class="row1" rowspan="2" align="center" valign="middle"><img src="{T_THEME_PATH}/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>
   <!-- ELSE -->
     <td class="row1" align="center" valign="middle"><img src="{T_THEME_PATH}/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>
   <!-- ENDIF -->
     <td class="row1" width="100%"><span class="genmed">{TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN})<br />{RECORD_USERS}<br /><br />{LOGGED_IN_USER_LIST}</span></td>
   </tr>
   
   <!-- IF LEGEND -->
     <tr>
       <td class="row1"><b class="gensmall">{L_LEGEND} :: {LEGEND}</b></td>

     </tr>
            
   <!-- ENDIF -->
   </table>
<!-- ENDIF -->

<!-- IF TOP_POSTERS_LIST -->
<br clear="all" />

<table class="tablebg" width="100%" cellspacing="1">
<tr>
   <td class="cat" colspan="2"><h4>{L_TOP_POSTERS}</h4></td>
</tr>
<tr>
   <td class="row1" <!-- IF TOP_POSTERS_HOURS_LIST --> rowspan="2" <!-- ENDIF -->><img src="{T_THEME_PATH}/images/whosonline.gif" alt="{TOP_POSTERS}" /></td>
   <td class="row1" width="100%" valign="middle"><p class="genmed">{TOP_POSTERS_LIST}</p></td>
</tr>
<!-- IF TOP_POSTERS_HOURS_LIST -->
<tr>
   <td class="row1" width="100%" valign="middle"><p class="genmed"><i>{TOP_POSTERS_HOURS}</i>    
   {TOP_POSTERS_HOURS_LIST}</p></td>
</tr>
<!-- ENDIF -->
</table>
<!-- ENDIF -->


<!-- IF S_DISPLAY_BIRTHDAY_LIST -->
   <br clear="all" />

   <table class="tablebg" width="100%" cellspacing="1">
   <tr>
     <td class="cat" colspan="2"><h4>{L_BIRTHDAYS}</h4></td>
   </tr>
   <tr>
     <td class="row1" align="center" valign="middle"><img src="{T_THEME_PATH}/images/happy_birthday.gif" alt="{L_BIRTHDAYS}" /></td>
     <td class="row1" width="100%"><p class="genmed"><!-- IF BIRTHDAY_LIST -->{L_CONGRATULATIONS}: <b>{BIRTHDAY_LIST}</b><!-- ELSE -->{L_NO_BIRTHDAYS}<!-- ENDIF --></p></td>
   </tr>
   </table>
<!-- ENDIF -->

<br clear="all" />

<table class="tablebg" width="100%" cellspacing="1">
<tr>
   <td class="cat" colspan="2"><h4>{L_STATISTICS}</h4></td>
</tr>
<tr>
   <td class="row1"><img src="{T_THEME_PATH}/images/whosonline.gif" alt="{L_STATISTICS}" /></td>
   <td class="row1" width="100%" valign="middle"><p class="genmed">{TOTAL_POSTS} | {TOTAL_TOPICS} | {TOTAL_USERS} | {NEWEST_USER}</p></td>     
</tr>

<tr>
   <!-- IF not S_IS_BOT --><br /><br />
   <td class="row1" colspan="2"><font style="font-size:8pt">{USERS_24HOUR_TOTAL}: <!-- BEGIN lastvisit -->{lastvisit.USERNAME_FULL}<!-- IF not lastvisit.S_LAST_ROW -->, <!-- ENDIF --><!-- END lastvisit --></font></td>
   <!-- ENDIF -->
   </tr>
<!-- IF not S_IS_BOT -->
   <td class="row1" colspan="2"><h3 id="24hour_stats">{L_24HOUR_STATS}</h3>
   <p>{24HOUR_POSTS} &bull; {24HOUR_TOPICS} &bull; {24HOUR_USERS}</p></td>
   <!-- ENDIF -->
</table>

<!-- IF not S_USER_LOGGED_IN -->
   <br clear="all" />

   <form method="post" action="{S_LOGIN_ACTION}">
   
   <table class="tablebg" width="100%" cellspacing="1">
   <tr>
     <td class="cat"><h4><a href="{U_LOGIN_LOGOUT}">{L_LOGIN_LOGOUT}</a></h4></td>
   </tr>
   <tr>
     <td class="row1" align="center"><span class="genmed">{L_USERNAME}:</span> <input class="post" type="text" name="username" size="10" />&nbsp; <span class="genmed">{L_PASSWORD}:</span> <input class="post" type="password" name="password" size="10" />&nbsp; <!-- IF S_AUTOLOGIN_ENABLED --> <span class="gensmall">{L_LOG_ME_IN}</span> <input type="checkbox" class="radio" name="autologin" /><!-- ENDIF -->&nbsp; <input type="submit" class="btnmain" name="login" value="{L_LOGIN}" /></td>
   </tr>
   </table>
   {S_FORM_TOKEN}
   </form>
<!-- ENDIF -->

<br clear="all" />

<table class="legend">
<tr>
   <td width="20" align="center">{FORUM_NEW_IMG}</td>
   <td><span class="gensmall">{L_NEW_POSTS}</span></td>
   <td>&nbsp;&nbsp;</td>
   <td width="20" align="center">{FORUM_IMG}</td>
   <td><span class="gensmall">{L_NO_NEW_POSTS}</span></td>
   <td>&nbsp;&nbsp;</td>
   <td width="20" align="center">{FORUM_LOCKED_IMG}</td>
   <td><span class="gensmall">{L_FORUM_LOCKED}</span></td>
</tr>
</table>

<!-- INCLUDE overall_footer.html -->
lefty aka The Heikze! :eyebrowe:

Heiko Carstens
http://www.lefty74.com

Would you like me to install one of my mods for you? Read here for details
lefty
Abschlussklasse R10c
 
Posts: 1357
Joined: Mon Feb 06, 2006 1:20 am
Location: Den Haag - NL

Re: Top Posters on Index

Postby demetris20 » Mon Oct 20, 2008 10:26 pm

thanks a lot that one work
only one problem
in the 24 hours top posters it keeps display the top posters instead of the actual day posters
and its there any way to change it and display the 30 days top posters

thanks a lot mate
demetris20
Forum Member
 
Posts: 15
Joined: Mon Oct 20, 2008 8:34 pm

Re: Top Posters on Index

Postby lefty » Mon Oct 20, 2008 10:55 pm

do you happen to have a url that i coudl look at?

thanks
lefty aka The Heikze! :eyebrowe:

Heiko Carstens
http://www.lefty74.com

Would you like me to install one of my mods for you? Read here for details
lefty
Abschlussklasse R10c
 
Posts: 1357
Joined: Mon Feb 06, 2006 1:20 am
Location: Den Haag - NL

Next

Return to [3.0.x] MOD Database Releases

Who is online

Users browsing this forum: No registered users and 2 guests

cron