Код: Выделить всё
###########################################################################################
## Hack Title: Random Quotes
## Hack Version: 2.0
## Author: Yo^Bam <yobam@linux.nu>
## Fixed by: Acid <acid_junky@web.de
## Adapted to phpBB3 by: Capmaster <admin@convopit.org>
## Description: Displays a random quote on your phpBB.
##
## Files To Edit: index.php, index_body.html
## Create File: quotes.txt
###########################################################################################
##
## Create a .txt file named "quotes.txt". Add each quote on a new line and upload the file to your phpBB root dir.
##
###########################################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
###########################################################################################
#
#-----[ OPEN /index.php ]------------------------------
#
#
#-----[ FIND ]-----------------------------------
#
$template->assign_vars(array(
'TOTAL_POSTS' => sprintf($user->lang[$l_total_post_s], $total_posts),
#
#-----[ REPLACE WITH ]-------------------------------------------
#
srand ((double) microtime() * 1000000);
$zitate = file("quotes.txt");
$i = count($zitate)-1;
$template->assign_vars(array(
'QUOTE' => $zitate[rand(0,$i)],
'TOTAL_POSTS' => sprintf($user->lang[$l_total_post_s], $total_posts),
#
#-----[ OPEN /styles/XXXXX/template/index_body.html ]------------------------------
#
#
#-----[ ADD wherever you want ]-----------------------------------
#
<span class="gen">{QUOTE}</span>
#
#-----[ SAVE/CLOSE ALL FILES ]-----------------------------------
# EoMНашел вот такой простой мод. Но мне нужно чтобы в overall_header были цитаты, поэтому правки в index.php недостаточно. Помогите пожалуйста сделать хук файл, чтобы на любой странице цитаты были. У меня получилось добавить ещё во viewtopic.php, viewforum.php и т.д., но оно ж неправильно.







