ich habe irgend wo dieses MOD im Netzt aufgetrieben. Damit kann ich wenn ich es richtig verstehe die popup´s für PN auch in den Rest meiner Homepage includen. Nun habe ich aber Probleme dises Skript in meiner Homepage einzubinden, denn ich weis nicht welchen Teil ich wo in meiner HP einfügen muß und wie ich den Text anpassen muß. Gibt es hier php Profis die mir dabei behilflich sein könnten ????
wer sich vorab meine Seite ansehen möchte hier der Link http://www.model-voting.de
edit: text in quote box gesetzt########################################################
## Mod Title: Add PM Support To Your Entire Site
## Mod Version: 1.0.0
## Author: AJ Quick, (http://www.ajquick.com/)
##
## Description:
## This mod will add the ability to get private messages
## pop-ups when viewing your main site, if you have the
## hack that allows viewers to be logged in your site,
## other than just your forums.
## It was designed for PHPBB 2.0+
##
## Installation Level: Complex!
## Installation Time: As long as it takes.
##
## Notes..
## You must have some form of the login through base address
## hack installed. See example:
##
########################################################
#
#-----[ You Must Have Something Like This: ]------------------------------------------
#
<?php
define('IN_PHPBB', true);
$site_root_path = '/';//site path
$phpbb_root_path = '/forums/'; //forums path
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.php');
include($phpbb_root_path . 'config.php');
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
?>
#
#-----[ //end of example ]------------------------------------------
#
#
#-----[ Add This Above Your Head Tags: ]------------------------------------------
#
<?php
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'];
}
?>
#
#-----[ Add This In Your Head Tags: ]------------------------------------------
#
<?php
//Private Message Hack by AJQuick.com
if ( !empty($userdata['user_popup_pm']) ){
?>
<script language="Javascript" type="text/javascript">
<!--
if (<?php echo $s_privmsg_new ?>)
{
window.open('<?php echo "/forums/privmsg.".$phpEx."?mode=newpm" ?>', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400');;
}
//-->
</script>
<?php
}
//Change the path to forums to approbriate name
?>
#
#-----[ If you want PM statuses add this somewhere: ]------------------------------------------
#
<a href="/forums/privmsg.php?folder=inbox"><?php echo $l_privmsgs_text ?></a>
//change the path to the file
# That's It!
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
mfg saerdnaer