Integrate Color Groups with Top Posters on Index

Propuneri şi proiecte în curs de desfăşurare de Extensii, traduceri, stiluri, teme, avataruri şi butoane.
Reguli forum
Aveti o problema si vreti sa primiti ajutor? Click aici ! Nu uitati si de regulamentul forumului !
Avatar utilizator
thecrewstyle
Utilizator înregistrat
Mesaje: 1180
Membru din: 26-Mar-2007, 09:26:21
Versiune: 3.0.6
Ext: Da
Server: UNIX/Linux
Nivel phpBB: Puţin experimentat
Localitate: Underground
Contact:

Integrate Color Groups with Top Posters on Index

Mesaj de thecrewstyle »

Salut,
am facut o mica modificare, care integreaza modul Color Groups cu Top Posters on Index , deoarece nu am gasit nimic care sa ma poata ajuta pe phpbbhacks.com si aveam mare nevoie pentru forumul meu :)
Ce face mai exact acest "mod"?
Face ca, culorile care apar in legenda (cand folosesti color groups) sa apara si la utilizatorii din Top Posters on Index.

#################################################################
## MOD Title: Integrate Color Groups with Top Posters on Index
## MOD Author: TheCrewStyle < office@whatsfunny.ro >
## MOD Description: This mod will show the colors which apear on legend ( color groups) to apear exactly on Top Posting Members block.
## MOD Version: 1.0.0
##
## Installation Level: Very Easy
## Installation Time: 1 Minute
## Files To Edit: includes/page_header.php
## Included Files: n/a
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##############################################################
## MOD History:
## 2007-11-27 - Version 1.0.0
## - Initial Release
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]---------------------------------------------
#
includes/page_header.php
#
#-----[ FIND ]---------------------------------------------
#
// 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&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
#
#-----[ Replace With ]---------------------------------------------
#
// 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>'. $user_data[$i]['username'] .'</span></b>';
}
else if ($user_data[$i]['user_level'] == MOD)
{
$user_data[$i]['username'] = '<b><span>'. $user_data[$i]['username'] .'</span></b>';
}
else
{
$user_data[$i]['username'] = '<b><span>'. $user_data[$i]['username'] .'</span></b>';
}

$top_posters_userlist .= (( ($top_posters_userlist) && ($user_data[$i]['user_id']) ) ? $seperator : '') .color_group_colorize_name($user_data[$i]['user_id']). color_group_colorize_name($user_data[$i]['username']) .'</a>('. $user_data[$i]['user_posts'] .')';

$total_top_posters++;
}
}
// End Top Posters on Index
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM

Download
Imagine

Sper sa va fie de folos :)
O sa incerc o integrare intre Color Groups si Birthday Hack, dar asta cand o sa am timp.
Bafta.
Comunitatea What's Funny
misucatinas

Mesaj de misucatinas »

FELICITARI dmx ;) ;) tine-o tot asa man
succes in continuare :)
Avatar utilizator
bluestar
Utilizator înregistrat
Mesaje: 787
Membru din: 07-Iun-2007, 22:23:24
Ext: Nu
Server: Windows
Nivel phpBB: Mediu
Nivel php: Mediu
Contact:

Mesaj de bluestar »

Bravo! Primul tau mod nu? :) La mai mult ;)
I`m back on phpBB.ro!
bluestar - also known as komAk
komAk`s blog - Life goes on...
Avatar utilizator
bilo182
Utilizator înregistrat
Mesaje: 495
Membru din: 28-Sep-2007, 14:19:45
Ext: Nu
Server: Windows
Nivel phpBB: Mediu
Nivel php: Mediu
Localitate: ../Romania/Bucuresti
Contact:

Mesaj de bilo182 »

bun bun, posteaza-l si pe phpbb.com ;)
Avatar utilizator
thecrewstyle
Utilizator înregistrat
Mesaje: 1180
Membru din: 26-Mar-2007, 09:26:21
Versiune: 3.0.6
Ext: Da
Server: UNIX/Linux
Nivel phpBB: Puţin experimentat
Localitate: Underground
Contact:

Mesaj de thecrewstyle »

Mersi. Sper sa va fie de folos.
@bilo182 O sa il postez. Dar peste vreo ora ca sunt putin ocupat acum :)
Comunitatea What's Funny
0pt!0NaL / NeVe
Utilizator înregistrat
Mesaje: 156
Membru din: 11-Noi-2007, 20:38:25

Mesaj de 0pt!0NaL / NeVe »

bravo ....foarte frumos , de cand cautam asta :D
Avatar utilizator
53rg1u
Utilizator înregistrat
Mesaje: 457
Membru din: 23-Iun-2007, 13:07:25
Ext: Nu
Server: Windows
Nivel phpBB: Mediu
Nivel php: Mediu
Localitate: sGz.ro

Mesaj de 53rg1u »

thecreqstyle you rock...exact de asta aveam nevoie :D
Imi rezerv dreptul de a scrie cu greseli gramaticale !!!

GodClanCS | Blog
r3mIx
Utilizator înregistrat
Mesaje: 26
Membru din: 16-Ian-2008, 13:45:14

Mesaj de r3mIx »

si ce anume fac cu codu ala sau cum pot sa instalez pe forumul meu asa ceva...sunt bata asa ca nu ma injurati :))
Avatar utilizator
Poseidon
Utilizator înregistrat
Mesaje: 926
Membru din: 02-Iun-2007, 15:58:19
Ext: Nu
Server: Windows
Nivel phpBB: Mediu
Nivel php: Mediu
Localitate: Only phpBB.ro !
Contact:

Mesaj de Poseidon »

Felicitari! functioneaza perfect :D
Avatar utilizator
thecrewstyle
Utilizator înregistrat
Mesaje: 1180
Membru din: 26-Mar-2007, 09:26:21
Versiune: 3.0.6
Ext: Da
Server: UNIX/Linux
Nivel phpBB: Puţin experimentat
Localitate: Underground
Contact:

Mesaj de thecrewstyle »

r3mIx scrie:si ce anume fac cu codu ala sau cum pot sa instalez pe forumul meu asa ceva...sunt bata asa ca nu ma injurati :))
Faci ce scrie in fisierul de mai sus :) text defapt :)
Comunitatea What's Funny
Închis

Înapoi la “Proiecte”

Cine este conectat

Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 29 vizitatori