Statistik Mod als Popup ?

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.
Benutzeravatar
Henne
Ehemaliges Teammitglied
Beiträge: 4520
Registriert: 04.01.2002 01:00
Wohnort: Lage (Lippe)
Kontaktdaten:

Beitrag von Henne »

top10.php:

Code: Alles auswählen

<?php
/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//

//
// Generate page
//
$page_title = $lang['Index'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);

$template->set_filenames(array(
	'body' => 'top10_body.tpl')
);

###### start most posts_#####
    $sql = "SELECT user_id, username, user_posts
        FROM " . USERS_TABLE . "
        WHERE user_id <> " . ANONYMOUS . "
        ORDER BY user_posts DESC
        LIMIT 10";
    if ( !($result = $db->sql_query($sql)) )
    {
            message_die(GENERAL_ERROR, 'Could not obtain user/online forums information', '', __LINE__, __FILE__, $sql);
    }

    while ($row = $db->sql_fetchrow($result))
    {
        $user_id=$row['user_id'];
            $template->assign_block_vars("most_posts", array(
                'USERNAME' => $row['username'],
                'POSTS' => $row['user_posts'],
            	'U_VIEWPROFILE' => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$user_id"))
            );
    }
##### end most posts_#######

$template->pparse('body');

include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

?>
Kannst da uch noch $gen_simple_header = true; einfügen, dann haste im PopUp nicht den normalen phpBB Header...

top10_body.tpl siehe einige Posts weiter oben...
tschekowski
Mitglied
Beiträge: 180
Registriert: 18.05.2003 16:44

Beitrag von tschekowski »

Funktioniert einwandfrei..........


Vieeeeeeeeeeeeeeelen Dank !!!
Antworten

Zurück zu „phpBB 2.0: Mod Support“