← Desenvolvimento

Problema com php...

Lida 1075 vezes

Offline

knife 
Membro
Mensagens 157 Gostos 0
Troféus totais: 27
Trófeus: (Ver todos)
Linux User Mobile User Windows User Super Combination Combination Topic Starter Level 5 Level 4 Level 3 Level 2

Boas, hoje instalei um mod no meu fórum isto não é bem um problema mas é como se fosse... ora veja:



Tipo instalei esse mod Top Users mas como vêm o mopd fica mais largo co layot do fórum eo gostava de saber como posso encurtar a tabemla  :D

O mod é este:

Código: [Seleccione]
#################################################################
## MOD Title: Top Posters on Index
## MOD Author: Spinebuster < Spinebuster27@hotmail.com >
## MOD Description: This mod will add the top posting members to your index page.  You can set the amount of users in your board configuration.
## MOD Version: 1.0.1
##
## Installation Level: Easy
## Installation Time: 5 Minutes
## Files To Edit: includes/page_header.php
##  admin/admin_board.php
##  language/lang_english/lang_main.php
##  templates/*/admin/board_config_body.tpl
##  templates/*/index_body.tpl
## Included Files: n/a
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##############################################################
## For security purposes, please check: http://www.phpbb-customs.com
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb-customs.com
##############################################################
## Author Notes: Please run the SQL command that I have provided in this file prior to installing this mod.
##
##############################################################
## MOD History:
##
##   2006-1-22 - Version 1.0.1
##      - Fixed a few minor issues and added code for if you had aUsTiN's AUC mod installed.
##   2005-12-29 - Version 1.0.0
##      - Initial Release
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ SQL ]---------------------------------------------
#
INSERT INTO phpbb_config (config_name, config_value) VALUES ('top_posters','10');
#
#-----[ OPEN ]---------------------------------------------
#
includes/page_header.php
#
#-----[ FIND ]---------------------------------------------
#
if ( empty($online_userlist) )
{
$online_userlist = $lang['None'];
}
#
#-----[ BEFORE, ADD ]---------------------------------------------
#
// Begin Top Posters on Index
if ($board_config['top_posters'])
{
$top_posters = $board_config['top_posters'];

$sql = "SELECT username, user_id, user_level, user_posts
        FROM " . USERS_TABLE . "
        WHERE user_id <> " . ANONYMOUS . "
        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);
}

$user_count = $db->sql_numrows($result);
$user_data = $db->sql_fetchrowset($result);

$firstcount = $user_data[0]['user_posts'];
$total_posts = get_db_stat('postcount');
$total_top_posters = 0;
$top_posters_userlist = '';
$seperator = ', ';

for ($i = 0; $i < $user_count; $i++)
{
if ($user_data[$i]['user_level'] == ADMIN)
{
$user_data[$i]['username'] = '<b><span style="color:#'. $theme['fontcolor3'] .'">'. $user_data[$i]['username'] .'</span></b>';
}
else if ($user_data[$i]['user_level'] == MOD)
{
$user_data[$i]['username'] = '<b><span style="color:#'. $theme['fontcolor2'] .'">'. $user_data[$i]['username'] .'</span></b>';
}
else
{
$user_data[$i]['username'] = '<b><span style="color:#'. $theme['fontcolor1'] .'">'. $user_data[$i]['username'] .'</span></b>';
}

$top_posters_userlist .= (( ($top_posters_userlist) && ($user_data[$i]['user_id']) ) ? $seperator : '') .'<a alt="'. $alt .'" title="'. $alt .'" href="profile.'. $phpEx .'?mode=viewprofile&amp;u='. $user_data[$i]['user_id'] .'" class="copyright">'. $user_data[$i]['username'] .'</a>('. $user_data[$i]['user_posts'] .')';

$total_top_posters++;
}
}
// End Top Posters on Index
#
#-----[ FIND ]---------------------------------------------
#
'PRIVMSG_IMG' => $icon_pm,
#
#-----[ AFTER, ADD ]---------------------------------------------
#
// Top Posters on Index
'L_TOP_POSTERS' => $lang['Top_Posters'],
'TOP_POSTERS' => $top_posters_userlist,
#
#-----[ OPEN ]---------------------------------------------
#
#
admin/admin_board.php
#
#-----[ FIND ]---------------------------------------------
#
"S_CONFIG_ACTION" => append_sid("admin_board.$phpEx"),
#
#-----[ AFTER, ADD ]---------------------------------------------
#
//Top Posters on Index
'L_TOP_POSTERS' => $lang['Top_Posters'],
'L_TOP_POSTERS_EXP' => $lang['Top_Posters_Exp'],
'TOP_POSTERS' => $board_config['top_posters'],
#
#-----[ OPEN ]---------------------------------------------
#
#
language/lang_english/lang_main.php
#
#-----[ FIND ]---------------------------------------------
#
//
// That's all, Folks!
#
#-----[ BEFORE, ADD ]---------------------------------------------
#
// Top Posters on Index
$lang['Top_Posters'] = 'Top Posting Members';
$lang['Top_Posters_Exp'] = 'Amount of Top Posting Members on Index Page.';
#
#-----[ OPEN ]---------------------------------------------
#
#
templates/*/admin/board_config_body.tpl
#
#-----[ FIND ]---------------------------------------------
#
<tr>
<td class="row1">{L_ENABLE_PRUNE}</td>
<td class="row2"><input type="radio" name="prune_enable" value="1" {PRUNE_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="prune_enable" value="0" {PRUNE_NO} /> {L_NO}</td>
</tr>
#
#-----[ AFTER, ADD ]---------------------------------------------
#
<!-- Begin: Top Posters on Index -->
<tr>
<td class="row1">{L_TOP_POSTERS}<br /><span class="gensmall">{L_TOP_POSTERS_EXP}</span></td>
<td class="row2"><input type="text" class="post" size="3" maxlength="4" value="{TOP_POSTERS}" name="top_posters"></td>
</tr>
<!-- End: Top Posters on Index -->
#
#-----[ OPEN ]---------------------------------------------
#
#
templates/*/index_body.tpl
#
#-----[ FIND ]---------------------------------------------
#
<table width="100%" cellpadding="1" cellspacing="1" border="0">
<tr>
<td align="left" valign="top"><span class="gensmall">{L_ONLINE_EXPLAIN}</span></td>
</tr>
</table>
#
#-----[ AFTER, ADD ]---------------------------------------------
#
<!-- Begin: Top Posters on Index -->
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
<tr>
<td class="catHead" align ="left" colspan="2" nowrap="nowrap"><span class="genmed"><b>{L_TOP_POSTERS}</b></span></td>
</tr>
<tr>
<td class="row1" align="left" valign="middle" width="100%"><span class="genmed">{TOP_POSTERS}</span></td>
</tr>
</table>
<!-- End: Top Posters on Index -->
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM


Help :/
Offline

MarKo 
Administrador
Mensagens 4610 Gostos 10
Feedback +1

Troféus totais: 37
Trófeus: (Ver todos)
Level 6 Windows User Super Combination Combination Topic Starter 50 Poll Votes 10 Poll Votes Poll Voter 10 Polls Poll Starter

Tenham calma...  :roll:
Offline

asturmas 
Administrador
Mensagens 19734 Gostos 49
Feedback +2

Troféus totais: 39
Trófeus: (Ver todos)
Mobile User Windows User Super Combination Combination Topic Starter 100 Poll Votes 50 Poll Votes 10 Poll Votes Poll Voter Poll Starter

Epa ..acho que era mais facil ajudarem logo do que quase "andarem a pancada.."
Sinceramente nao sei o que pode causar o teu prob..
Offline

gaya 
Membro
Mensagens 366 Gostos 0
Troféus totais: 27
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Poll Voter Level 5 Level 4 Level 3 Level 2 Level 1 100 Posts

Bom, vão-se insultar em privado se faz favor