PAGE_INDEX / viewonline.php

In diesem Forum kann man Fragen zur Programmierung stellen, die bei der Entwicklung von Mods für phpBB 3.0.x oder dem Modifizieren des eigenen Forums auftauchen.
Forumsregeln
phpBB 3.0 hat das Ende seiner Lebenszeit überschritten
phpBB 3.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 3.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf die neuste phpBB-Version, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
piero
Mitglied
Beiträge: 476
Registriert: 10.11.2008 17:15
Wohnort: Schweiz

Re: PAGE_INDEX / viewonline.php

Beitrag von piero »

Das ist dann wieder was anderes, wenns deine eigenen Server sind... Weil dann musst du kein XSS "betreiben" ;)

Du kannst dann zB. mit PHP alle 5min eine Anfrage ans Forum senden (Voraussetzung: fsockopen() muss aktiviert sein)...
Das geht dann auch notfalls mit JavaScript (und es ist dann kein XSS, weil der Server die Anfrage schickt und nicht der (Forum)Server sich die Infos holt)
Benutzeravatar
markus giersch
Mitglied
Beiträge: 674
Registriert: 03.04.2008 22:06
Wohnort: Frankfurt am Main
Kontaktdaten:

Re: PAGE_INDEX / viewonline.php

Beitrag von markus giersch »

es geht sogar noch besser :-)
ich kann die domains in die unterordener des forumsroots weiterleiten ;-)
es geht darum:
php5.2
http://mandatstraeger-online.de

wordpress php
http://rotefront.de

und forum ist ja klar.
ich schaue jetzt erstmal nochmal die hilfe-seite und berichte.
mir ist nicht klar ob ich die seite nur definieren muss in der whoisonline.php oder noch was machen muss.

OK, ich blicke da nicht mehr ganz durch.
Leider ist es nicht damit getan die Seite in der "viewonline.php" hinzu zu fügen. Wäre ja auch zu einfach.
Also ich habe jetzt in dem Unterordner root/link/ ein php5.2 Programm laufen. hier die Index.php:

Code: Alles auswählen

<?php
//===========================================================================\\
// Aardvark Topsites PHP 5.2                                                 \\
// Copyright (c) 2000-2007 Jeremy Scheff.  All rights reserved.              \\
//---------------------------------------------------------------------------\\
// http://www.aardvarktopsitesphp.com/                http://www.avatic.com/ \\
//---------------------------------------------------------------------------\\
// 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.                                                \\
//                                                                           \\
// This program is distributed in the hope that it will be useful, but       \\
// WITHOUT ANY WARRANTY; without even the implied warranty of                \\
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General \\
// Public License for more details.                                          \\
//===========================================================================\\

// Help prevent register_globals injection
define('ATSPHP', 1);
$CONF = array();
$FORM = array();
$TMPL = array();

// Change the path to your full path if necessary
$CONF['path'] = '.';
$TMPL['version'] = '5.2.0';
// Set to 1 to display SQL queries and GET/POST/COOKIE data
$CONF['debug'] = 0;

// Require some classes and start the timer
require_once("{$CONF['path']}/sources/misc/classes.php");
$TIMER = new timer;

// Connect to the database
// Set the last argument of $DB->connect to 1 to enable debug mode
require_once("{$CONF['path']}/settings_sql.php");
require_once("{$CONF['path']}/sources/sql/{$CONF['sql']}.php");
$DB = "sql_{$CONF['sql']}";
$DB = new $DB;
$DB->connect($CONF['sql_host'], $CONF['sql_username'], $CONF['sql_password'], $CONF['sql_database'], $CONF['debug']);

// Settings
$settings = $DB->fetch("SELECT * FROM {$CONF['sql_prefix']}_settings", __FILE__, __LINE__);
$CONF = array_merge($CONF, $settings);

$ad_breaks = explode(',', $CONF['ad_breaks']);
$CONF['ad_breaks'] = array();
foreach ($ad_breaks as $key => $value) {
  $CONF['ad_breaks'][$value] = $value;
}

$result = $DB->query("SELECT category, skin FROM {$CONF['sql_prefix']}_categories ORDER BY category", __FILE__, __LINE__);
while (list($category, $skin) = $DB->fetch_array($result)) {
  $CONF['categories'][$category] = $skin;
}

$CONF['skins_path'] = "{$CONF['path']}/skins";
$CONF['skins_url'] = "{$CONF['list_url']}/skins";
$TMPL['skins_url'] = $CONF['skins_url'];
$TMPL['list_name'] = $CONF['list_name'];
$TMPL['list_url'] = $CONF['list_url'];

// Combine the GET and POST input
$FORM = array_merge($_GET, $_POST);

// The language file
require_once("{$CONF['path']}/languages/{$CONF['default_language']}.php");

// Determine the category and skin
if (isset($FORM['cat']) && isset($CONF['categories'][$FORM['cat']])) {
  $TMPL['skin_name'] = $CONF['categories'][$FORM['cat']];
}
else {
  $TMPL['skin_name'] = $CONF['default_skin'];
}
if (!is_dir("{$CONF['path']}/skins/{$TMPL['skin_name']}/") || !$TMPL['skin_name']) {
  $TMPL['skin_name'] = $CONF['default_skin'];
}
if (!is_dir("{$CONF['path']}/skins/{$CONF['default_skin']}/")) {
  $TMPL['skin_name'] = 'fusion';
}
require_once("{$CONF['path']}/sources/misc/skin.php");

// Is it a new day/week/month?
list($last_new_day, $last_new_week, $last_new_month, $TMPL['original_version']) = $DB->fetch("SELECT last_new_day, last_new_week, last_new_month, original_version FROM {$CONF['sql_prefix']}_etc", __FILE__, __LINE__);
$time = time() + (3600*$CONF['time_offset']);
$current_day = date('d', $time);
$current_week = date('W', $time);
$current_month = date('m', $time);
if ($last_new_day != $current_day) {
  require_once("{$CONF['path']}/sources/misc/new_day.php");
  new_day($current_day);
}
if ($last_new_week != $current_week) {
  require_once("{$CONF['path']}/sources/misc/new_day.php");
  new_week($current_week);
}
if ($last_new_month != $current_month) {
  require_once("{$CONF['path']}/sources/misc/new_day.php");
  new_month($current_month);
}

// Adjust the output text based on days, weeks, or months
if ($CONF['ranking_period'] == 'weekly') {
  $LNG['g_this_period'] = $LNG['g_this_week'];
  $LNG['g_last_period'] = $LNG['g_last_week'];
}
elseif ($CONF['ranking_period'] == 'monthly') {
  $LNG['g_this_period'] = $LNG['g_this_month'];
  $LNG['g_last_period'] = $LNG['g_last_month'];
}
else {
  $LNG['g_this_period'] = $LNG['g_today'];
  $LNG['g_last_period'] = $LNG['g_yesterday'];
}

// Check if installer is there
if (file_exists("{$CONF['path']}/install/")) {
  $TMPL['header'] = $LNG['g_error'];
  $base = new base;
  $base->error($LNG['g_delete_install']);
}

// Check for hits in
require_once("{$CONF['path']}/sources/in.php");
$in = new in;

// Array containing the valid .php files from the sources directory
$action = array(
            'admin' => 1,
            'in' => 1,
            'join' => 1,
            'lost_pw' => 1,
            'out' => 1,
            'page' => 1,
            'rankings' => 1,
            'rate' => 1,
            'search' => 1,
            'stats' => 1,
            'user_cpl' => 1
          );

// Require the appripriate file
if (isset($FORM['a']) && isset($action[$FORM['a']])) {
  $page_name = $FORM['a'];
}
else {
  $page_name = 'rankings';
}

require_once("{$CONF['path']}/sources/{$page_name}.php");
$page = new $page_name;

// Display the page
$skin = new main_skin('wrapper');
echo $skin->make();

$DB->close();

// Print out debugging info, if necessary
if ($CONF['debug']) {
  echo '<div style="clear: both;">';
  foreach ($DB->queries as $value) {
    echo "<hr /><pre>{$value}</pre>";
  }
  echo '<hr /><pre>';
  print_r($_REQUEST);
  echo '</pre>';
  echo '</div>';
}
?>
denn jetzt ist die Frage, welchen Teil von der phpbb3 Vorlage füge ich hinzu?

Code: Alles auswählen

<?php
/**
*
* @author Original Autor Benutzername autor_email@domain.de - http://meine-seite.de
* @author Anderer Autor Benutzername andere_email@domain.de - http://domain.de
*
* @package {PACKAGENAME}
* @version $Id$
* @copyright (c) 2007 Dein Gruppen Name
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
* @ignore
*/
// Benötigte Dateien und Variablen von phpBB 
define('IN_PHPBB', true);
$phpbb_root_path = './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);

// Da wir weiter unten noch einen Avatar anzeigen lassen wollen,
// benötigen wir noch die dazu passende Funktion 
// die in der Datein includes/functions_display.php vorhanden ist.
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);

// Session auslesen und Benutzer-Informationen laden
$user->session_begin();  // Session auslesen
$auth->acl($user->data); // Benutzer-Informationen laden
$user->setup('mods/meine_sprach_datei'); // Sprachvariablen aus eigener Sprach Datei 
Oder muss ich sogar noch was an der Datenbank machen?
Ach ja, die User sollen auf den anderen Seiten nur mit gezählt werden. Funktionen sollen sie dort keine ausführen.
phpbb wird noch mindestens 40 Jahre existieren!!! Wo? Hier: D-A-F | Demokratische Armee Fraktion! Darum brauchen wir euch noch min. 40 Jahre!!!
Antworten

Zurück zu „[3.0.x] Mod Bastelstube“