top_posters MOD
Szerző
Üzenet
Üdv.Szeretném ezt a kis statisztikai kimutatást felrakni az oldalamra de valamiért nem megy az az nem siekrül.Nem tudom mi lehet a baj.(top_posters_0_1_1 ezzet probáltam) aki letudná nekem vezetni szépen (Gondolok itt clean-re) vagy bárki aki tudna segiteni vagy tudna ajánlaini valamijen modot ami müködik.Tudom van már 1-ehez hasnlo topic de az már ugy érzem kihalt ezért itt szeretném ujra éleszteni ha nem gond.
Sajnos én sem tudok többet hozzátenni, mint amit leír a telepítési útmutató! (Top_Posters_on_Index XLM dokumentum) Nem beszélve arról, hogy nekem a 0.1.0 vezra van meg....
top_posters_0_1_0.zip
SQL ezt tessék lefuttatni phpMyAdmin felületen!
Állomány megnyitása: languages/en/acp/board.php ( ezt tessék megcsinálni a hu könyvtárban is! )
Keresés
Beillesztés elé
Állomány megnyitása: languages/en/common.php ( ezt tessék megcsinálni a hu könyvtárban is! )
Keresés
Beillesztés mögé
Állomány megnyitása: includes/acp/acp_board.php
Keresés
Beillesztés mögé
Keresés
Csere
Állomány megnyitása: index.php
Keresés
Beillesztés elé
Keresés
Beillesztés mögé
Állomány megnyitása: styles/subsilver2/template/index_body.html
Keresés
Beillesztés mögé
Ha más sablont, azaz megjelenést használsz, akkor keresd ezeket a részeket:
és a </table> után lévő sorba tedd be az előző kódot!
_________________
Clean....
top_posters_0_1_0.zip
SQL ezt tessék lefuttatni phpMyAdmin felületen!
Kód:
INSERT INTO `phpbb_config` (`config_name`, `config_value`, `is_dynamic`) VALUES ('amount_top_posters', '10', '1');
INSERT INTO `phpbb_config` (`config_name`, `config_value`, `is_dynamic`) VALUES ('top_posters_hours', '24', '1');
Állomány megnyitása: languages/en/acp/board.php ( ezt tessék megcsinálni a hu könyvtárban is! )
Keresés
Kód:
'SITE_DESC'
Beillesztés elé
Kód:
'AMOUNT_TOP_POSTERS' => 'Number of Top Posters to show on Index',
'AMOUNT_TOP_POSTERS_EXPLAIN' => 'Shows the Top X posters on the Index. Leave blank or type 0 to disable feature',
'TOP_POSTERS_HOURS' => 'Show Top Posters in the last x hours',
'TOP_POSTERS_HOURS_EXPLAIN' => 'In addition to the overall Top Posters, it shows the Top posters of the last x hours. Leave blank or type 0 to disable feature',
Állomány megnyitása: languages/en/common.php ( ezt tessék megcsinálni a hu könyvtárban is! )
Keresés
Kód:
'NEWEST_USER'
Beillesztés mögé
Kód:
'TOP_POSTERS' => 'Top Posters',
'TOP_POSTERS_HOURS' => 'of last %d hrs:',
'TOP_POSTERS_HOUR' => 'of last hour:',
Állomány megnyitása: includes/acp/acp_board.php
Keresés
Kód:
'override_user_style'
Beillesztés mögé
Kód:
'legend2' => 'TOP_POSTERS',
'amount_top_posters' => array('lang' => 'AMOUNT_TOP_POSTERS', 'validate' => 'int', 'type' => 'text:3:4', 'explain' => true),
'top_posters_hours' => array('lang' => 'TOP_POSTERS_HOURS', 'validate' => 'int', 'type' => 'text:3:4', 'explain' => true, 'append' => ' ' . $user->lang['HOURS']),
Keresés
Kód:
'legend2' => 'WARNINGS',
Csere
Kód:
'legend3' => 'WARNINGS',
Állomány megnyitása: index.php
Keresés
Kód:
// Assign index specific vars
Beillesztés elé
Kód:
//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&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&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&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']);
}
Keresés
Kód:
'BIRTHDAY_LIST' => $birthday_list,
Beillesztés mögé
Kód:
'TOP_POSTERS' => $user->lang['TOP_POSTERS'],
'TOP_POSTERS_LIST' => $top_posters_list,
'TOP_POSTERS_HOURS' => $top_posters_hours,
'TOP_POSTERS_HOURS_LIST' => $top_posters_hours_list,
Állomány megnyitása: styles/subsilver2/template/index_body.html
Keresés
Kód:
<td class="row1" width="100%" valign="middle"><p class="genmed">{TOTAL_POSTS} | {TOTAL_TOPICS} | {TOTAL_USERS} | {NEWEST_USER}</p></td>
</tr>
</table>
Beillesztés mögé
Kód:
<!-- IF TOP_POSTERS_LIST -->
<br clear="all" />
<table class="tablebg" width="100%" cellspacing="1">
<tr>
<td class="cat" colspan="2"><h4>{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}
<!-- 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 -->
</td>
</tr>
</table>
<!-- ENDIF -->
Ha más sablont, azaz megjelenést használsz, akkor keresd ezeket a részeket:
Kód:
">{TOTAL_POSTS} | {TOTAL_TOPICS} | {TOTAL_USERS} | {NEWEST_USER}</
és a </table> után lévő sorba tedd be az előző kódot!
_________________
Clean....
Köszi de nekem igyse sikerült nem tudom mi lehet a baj teljesen ugyan igy csináltaom ahogy leirtad.De valami baja volt az index.php-val.Mert az oldalt se akkarta betölteni :S
A MOD telepítése után, töröld a gyorsítótárat... illetve ftp-n keresztül töröld a cache könyvtár tartalmát!
_________________
Clean....
_________________
Clean....
Oké mostmár sikerült tökéletes köszönöm szépen! (amugy én irtam el )
Nem készíthetsz új témákat ebben a fórumban.
Nem válaszolhatsz egy témára ebben a fórumban.
Nem módosíthatod a hozzászólásaidat a fórumban.
Nem törölheted a hozzászólásaidat a fórumban.
Nem szavazhatsz ebben fórumban.
Nem válaszolhatsz egy témára ebben a fórumban.
Nem módosíthatod a hozzászólásaidat a fórumban.
Nem törölheted a hozzászólásaidat a fórumban.
Nem szavazhatsz ebben fórumban.