I found this hack, I can do it with regualr pages, but not sure how I could add it in the templates since I can't have php in the templates, and ideas? Code: <?php //Dynamic phpBB template by AJ Quick //www.ajquick.com define('IN_PHPBB', true); $site_root_path = '/home/jayhost/public_html'; //<-- Modify $phpbb_root_path2 = '/forums/'; //<-- Modify $phpbb_root_path = $site_root_path . $phpbb_root_path2; include($phpbb_root_path . 'extension.inc'); include($phpbb_root_path . 'common.php'); $userdata = session_pagestart($user_ip, PAGE_INDEX); init_userprefs($userdata); //Private Message Throughout Site //By AJ Quick if($userdata['session_logged_in']){//logged in if ( $userdata['user_new_privmsg'] )//private messages { $l_message_new = ( $userdata['user_new_privmsg'] == 1 ) ? $lang['New_pm'] : $lang['New_pms']; $l_privmsgs_text = sprintf($l_message_new, $userdata['user_new_privmsg']); if ( $userdata['user_last_privmsg'] > $userdata['user_lastvisit'] ) { $sql = "UPDATE " . USERS_TABLE . " SET user_last_privmsg = " . $userdata['user_lastvisit'] . " WHERE user_id = " . $userdata['user_id']; if ( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not update private message new/read time for user', '', __LINE__, __FILE__, $sql); } $s_privmsg_new = 1; $icon_pm = $images['pm_new_msg']; } else { $s_privmsg_new = 0; $icon_pm = $images['pm_no_new_msg']; } } else { $l_privmsgs_text = $lang['No_new_pm']; $s_privmsg_new = 0; $icon_pm = $images['pm_no_new_msg']; } if ( $userdata['user_unread_privmsg'] ) { $l_message_unread = ( $userdata['user_unread_privmsg'] == 1 ) ? $lang['Unread_pm'] : $lang['Unread_pms']; $l_privmsgs_text_unread = sprintf($l_message_unread, $userdata['user_unread_privmsg']); } else { $l_privmsgs_text_unread = $lang['No_unread_pm']; } }// User Logged In ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <title>Site Name</title> <?php if ( !empty($userdata['user_popup_pm']) ){ ?> <script language="Javascript" type="text/javascript"> <!-- if (<?php echo $s_privmsg_new ?>) { window.open('<?php echo "$phpbb_root_pathprivmsg.".$phpEx."?mode=newpm" ?>', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400');; } //--> </script> <?php } ?> <body> <?php if($userdata['session_logged_in']){ ?> <a href="<?php echo $phpbb_root_path2 ?>privmsg.php?folder=inbox"><?php echo $l_privmsgs_text ?></a><br><br> <?php } //That's It! Go Back and look over what you don't need. //Written By AJ Quick, [email]aj@ajquick.com[/email] //Now Go Have Some Fun! ?> </body> </html>
you can add php to templates. put this PHP code into a separate file, then include it into smarty templates using the following statement: {include_php file="include.php"} http://smarty.php.net/manual/en/language.function.include.php.php