Integrate Color Groups with Top Posters on Index

Propuneri şi proiecte în curs de desfăşurare de MODificări, 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
Guru
Guru
Mesaje: 1180
Membru din: 26-Mar-2007, 08:26:21
Versiune: 3.0.6
MOD: Da
Server: UNIX/Linux
Nivel phpBB: Puţin experimentat
Localitate: Underground
Contact:

Integrate Color Groups with Top Posters on Index

Mesaj de thecrewstyle » 27-Noi-2007, 02:07:02

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 » 27-Noi-2007, 15:42:32

FELICITARI dmx ;) ;) tine-o tot asa man
succes in continuare :)

Avatar utilizator
bluestar
Membru cu statut special
Membru cu statut special
Mesaje: 787
Membru din: 07-Iun-2007, 21:23:24
MOD: Nu
Server: Windows
Nivel phpBB: Mediu
Nivel php: Mediu
Contact:

Mesaj de bluestar » 27-Noi-2007, 20:04:49

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
Membru
Membru
Mesaje: 495
Membru din: 28-Sep-2007, 13:19:45
MOD: Nu
Server: Windows
Nivel phpBB: Mediu
Nivel php: Mediu
Localitate: ../Romania/Bucuresti
Contact:

Mesaj de bilo182 » 27-Noi-2007, 20:13:49

bun bun, posteaza-l si pe phpbb.com ;)

Avatar utilizator
thecrewstyle
Guru
Guru
Mesaje: 1180
Membru din: 26-Mar-2007, 08:26:21
Versiune: 3.0.6
MOD: Da
Server: UNIX/Linux
Nivel phpBB: Puţin experimentat
Localitate: Underground
Contact:

Mesaj de thecrewstyle » 27-Noi-2007, 21:42:25

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
Membru
Membru
Mesaje: 156
Membru din: 11-Noi-2007, 20:38:25

Mesaj de 0pt!0NaL / NeVe » 27-Noi-2007, 21:50:47

bravo ....foarte frumos , de cand cautam asta :D

Avatar utilizator
53rg1u
Membru
Membru
Mesaje: 457
Membru din: 23-Iun-2007, 12:07:25
MOD: Nu
Server: Windows
Nivel phpBB: Mediu
Nivel php: Mediu
Localitate: sGz.ro

Mesaj de 53rg1u » 29-Noi-2007, 07:10:38

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

GodClanCS | Blog

r3mIx
Junior
Junior
Mesaje: 26
Membru din: 16-Ian-2008, 13:45:14

Mesaj de r3mIx » 16-Ian-2008, 13:49:29

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
Membru cu statut special
Membru cu statut special
Mesaje: 926
Membru din: 02-Iun-2007, 14:58:19
MOD: Nu
Server: Windows
Nivel phpBB: Mediu
Nivel php: Mediu
Localitate: Only phpBB.ro !
Contact:

Mesaj de Poseidon » 16-Ian-2008, 18:48:35

Felicitari! functioneaza perfect :D

Avatar utilizator
thecrewstyle
Guru
Guru
Mesaje: 1180
Membru din: 26-Mar-2007, 08:26:21
Versiune: 3.0.6
MOD: Da
Server: UNIX/Linux
Nivel phpBB: Puţin experimentat
Localitate: Underground
Contact:

Mesaj de thecrewstyle » 16-Ian-2008, 19:00:25

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

Scrie răspuns

Înapoi la “Proiecte”

Cine este conectat

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