Schon gewusst Box
Verfasst: 07.11.2003 14:54
Hab mal eine Frage mit was für einem Mod ist überall die Schon gewusst box gemacht und gibt es da eine anleitung das ich sie auch auf allen Seiten bekommen kann ?
Code: Alles auswählen
## EasyMod 0.0.7 compliant
##############################################################
## MOD Title: Schon Gewusst? Box
## MOD Author: Dwing < dwing@weingarten-net.de > (Dimitri Seitz) http://www.dseitz.de
## MOD Description: Dieser Mod fügt eine 'Schon Gewusst?' Box an den Header von phpBB.
Neue Texte können in die beiligende Datei gepackt werden.
## MOD Version: 1.0
##
## Installation Level: Einfach
## Installation Time: 2 Minuten
## Files To Edit: 0
## Included Files: schon_gewusst.txt
## Erstellt mit dem phpBB.de Mod Maker
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/downloads/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/downloads/
##############################################################
## Author Notes: Nach einer Idee von Pyramide.
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
includes/page_header.php
#
#-----[ FIND ]------------------------------------------
#
// Format Timezone. We are unable to use array_pop here, because of PHP3 compatibility
$l_timezone = explode('.', $board_config['board_timezone']);
$l_timezone = (count($l_timezone) > 1 && $l_timezone[count($l_timezone)-1] != 0) ? $lang[sprintf('%.1f', $board_config['board_timezone'])] : $lang[number_format($board_config['board_timezone'])];
#
#-----[ AFTER, ADD ]------------------------------------------
#
//
// Generate 'Schon Gewusst?'
//
$random_file = $phpbb_root_path . 'schon_gewusst.txt';
$random = file($random_file);
srand();
$randomizer = rand(0, count($random) );
$znumber = rand(1, 2);
if( !isset($random[$randomizer]) )
{
$random[$randomizer] = 'Mehr Mods wie diesen gibts <a href="http://www.dseitz.de">hier</a>';
}
#
#-----[ FIND ]------------------------------------------
#
'PRIVMSG_IMG' => $icon_pm,
#
#-----[ AFTER, ADD ]------------------------------------------
#
'ZMESSAGE' => $random[$randomizer],
'ZNUMBER' => $znumber,
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/overall_header.tpl
#
#-----[ FIND ]------------------------------------------
#
</table></td>
</tr>
</table>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- Schon Gewusst -->
<table border="0" align="center" cellpadding="4" cellspacing="0" class="forumline">
<tbody>
<tr>
<th class="thHead"> Schon gewusst? </th>
</tr>
<tr>
<td class="row{ZNUMBER}"><span class="gen"> {ZMESSAGE} </span></td>
</tr>
</tbody>
</table>
<br clear="all">
<!-- Schon Gewusst -->
#
#-----[ COPY TO FOLDER ]------------------------------------------
#
schon_gewusst.txt to schon_gewusst.txt
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Code: Alles auswählen
Die Wand ist rot
Schönes Wetter heute
Noch schöneres Wetter, nicht wahr?
Welche Variablen?Floca hat geschrieben:weil im phpBB homer verzeichnis funktonieren die variablen nicht, is aber sehr wichtig für mich das die gehen...danke schon ma im vorraus.
äh und wie ? sorry ich bin nich so der php ProfiDwing hat geschrieben:Die Datei sollte ins Home Verzeichnis, aber du kannst den Pfad auch ändern:
$random_file = $phpbb_root_path . 'schon_gewusst.txt';