Greetings,
It's really quite simple...
1. popup.php in root of forum
2. popup.tpl in templates/<style>
[code filename="popup.php"]<?
/*
PopUp script control
Written 27 May 2005
(c) 2005 UseLess
This script is supplied as is, your free to use/modify this script to
suit your needs but the copyright notice above should remain.
*/
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
//
$gen_simple_header = TRUE;
$page_title = 'Another annoying PopUP Window';
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array('body' => 'popup.tpl'));
// Assign common vars
$template->assign_vars(array(
'L_WELCOME_TEXT' => 'Welcome Guest',
'L_WELCOME_MSG_1' => 'Already registered then',
'L_WELCOME_MSG_2' => ', if you want to register and get rid of this annoying box then you may do so here',
));
$template->pparse('body');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>[/code]
popup.tpl
[code filename="popup.tpl"]<div class="forumline nav-div">
<p class="nav-header">{L_WELCOME_TEXT}</p>
<p align="left" style="padding: 2px;">{L_WELCOME_MSG_1} <a href="{U_LOGIN_LOGOUT}">{L_LOGIN_LOGOUT}</a>{L_WELCOME_MSG_2}: <a href="{U_REGISTER}">{L_REGISTER}</a></p>
</div>[/code]
Assuming your using Aphrodite.
1. Place the popup function in 'scripts.js' (without the switches)
2. Place this in overall_header.tpl, the end of the file will do
- Code: Select all
<!-- BEGIN switch_user_logged_out -->
<script language="javascript">
popUp('popup.php');
</script>
<!-- END switch_user_logged_out -->
There you have it, yet another annoying popup....