Problem - ezportal_top_posters_mod

Du hast Probleme beim Einbau oder bei der Benutzung eines Mods? In diesem Forum bist du richtig.
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Antworten
Paragoliat86
Mitglied
Beiträge: 1
Registriert: 28.12.2004 09:14

Problem - ezportal_top_posters_mod

Beitrag von Paragoliat86 »

Hallo

Ich habe einen Mod gedownloadet:

den ''ezportal_top_posters_mod''

Code: Alles auswählen

############################################################## 
## MOD Title: Top posters on index or ezPortal
## MOD Author: Antony, antony_bailey@lycos.co.uk, Antony Bailey, http://rapiddr3am.slackslash.net
## MOD Description: Displays the top posters with a percentage on index or portal.
## MOD Version: 0.0.1
## 
## Installation Level: Easy
## Installation Time: 3 Minutes 
## Files To Edit: index.php or portal.php index_body.tpl or portal_body.tpl
## Included Files: n/a
############################################################## 
## For Security Purposes, Please Check: http://www.phpbb.com/mods/downloads/ for the 
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code 
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered 
## in our MOD-Database, located at: http://www.phpbb.com/mods/downloads/ 
############################################################## 
## Author Notes: Different people want it in different places so I'm not specifing were to put it.
## 
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 

# 
#-----[ OPEN ]------------------------------------------ 
# 
index.php or portal.php
# 
#-----[ FIND ]------------------------------------------ 
# 
// Fenerate page
# 
#-----[ BEFORE ADD ]------------------------------------------ 
# 
// Start Top 5 Posters hack 
$sql = "SELECT post_id FROM " . POSTS_TABLE . " ORDER BY post_id DESC LIMIT 1"; 
$result = $db->sql_query($sql); 
$row = $db->sql_fetchrow($result); 
$total_post_perc = $row['post_id']; 
$perc_mult = 3; 
$perc_mult_set = 0; 
$rank = 0; 
$sql = "SELECT user_id, username, user_posts FROM " . USERS_TABLE ." WHERE user_id <> -1 ORDER BY user_posts DESC LIMIT 5"; 
$result = $db->sql_query($sql); 
while( $row = $db->sql_fetchrow($result)) { 
   $rank++; 
   if (!($rank % 2)) $class = 'row2'; else $class= 'row1'; 
   $percentage = round(100 * $row['user_posts'] / get_db_stat('postcount'),0); 
   $bar_perc = round($percentage * $perc_mult,0); 
   $template->assign_block_vars("users", array( 
      'RANK' => $rank, 
      'CLASS' => $class, 
      'USERNAME' => $row['username'], 
      'PERCENTAGE' => $percentage, 
      'URL' => $phpbb_root_path . "profile.php?mode=viewprofile&u=" . $row['user_id'], 
      'BAR' => $bar_perc, 
      'POSTS' => $row['user_posts']) 
   ); 
} 
// End Top 5 Posters hack 
# 
#-----[ OPEN ]------------------------------------------ 
#
portal_body.tpl or index_body.tpl
# 
#-----[ ADD WERE REQUIRED ]------------------------------------------ 
#
      <br /> 

        <table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline"> 
         <tr> 
         <td class="rowpic" colspan="4" align="left" height="25"><span class="genmed"><b>Top 5 Posters</b></span></td> 
         </tr> 
         <tr> 
         <td class="row1" align="center"><span class="genmed">Member</span></td> 
         <td class="row1" align="center"><span class="genmed">Posts</span></td>    
         <td class="row1" align="center"><span class="genmed">Percent</span></td>    
         <td class="row1" align="center"><span class="genmed">Graph</span></td> 
         </tr> 
         <tr> 
      <!-- BEGIN users --> 
         <td class="row1" align="left"><span class="gensmall"><a href="{users.URL}">&nbsp;{users.USERNAME}</a></span></td> 
         <td class="row1" align="center"><span class="gensmall"><b>&nbsp;&nbsp;{users.POSTS}</b></span></td>    
         <td class="row1" align="center"><span class="gensmall">&nbsp;&nbsp;{users.PERCENTAGE}%</span></td>    
         <td class="row1" align="left">&nbsp;<img src="templates/subSilver/images/voting_bar.gif" height="10" width="{users.BAR}%"></td> 
         </tr> 
      <!-- END users --> 
        </table> 

# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM 
Ich würde diesen Mod gerne etwas erweitern.

Im Mod werden bis jetzt ''Member'', ''Posts'', ''Percent'' & ''Graph'' angezeigt.

mit ''Percent'' sind die Prozente aller geschreibenen Beiträge im Forum gemeint, Ich hätte gerne aber zusätzlich noch eine anzeige, wo die Beiträge des Tages angezeigt werden.

Wie muss ich das einfügen, damit das Klappt ?
Antworten

Zurück zu „phpBB 2.0: Mod Support“