Author Topic: phpBB und 4images Popup by PM´s  (Read 4708 times)

0 Members and 2 Guests are viewing this topic.

Offline Gabi

  • Jr. Member
  • **
  • Posts: 94
    • View Profile
    • http://www.gabis-traum.de
phpBB und 4images Popup by PM´s
« on: March 18, 2003, 01:15:41 PM »
Hallo zusammen,

zum PhpBB gehören ja auch bei den meisten Themplates poups für die PM`s dazu. Ich dachte mir das es doch genial wäre diese auch auserhalb des Forums als in der Gallerie zu haben. Ich habe die MODs bei phpBB durchgesehen und habe dazu folgendes gefunden :

########################################################
## 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


Gibt es hier jemanden der weis in welche Seiten die Codes eingefügt werden müssen und was man evtl. daran modifizieren müsste ??? Ich denke das die Änderungen ne Kleinigkeit sind fü jemanden der php beherscht, oder ???

Lg

Gabi

Offline party-cam.org

  • Jr. Member
  • **
  • Posts: 52
    • View Profile
    • http://www.party-cam.org
phpBB und 4images Popup by PM´s
« Reply #1 on: March 19, 2003, 08:34:19 PM »
http://www.4homepages.de/forum/viewtopic.php?t=4695

hier steht ne lösung - eine, aber nicht die beste...

Offline ThomasJ

  • Pre-Newbie
  • Posts: 2
    • View Profile
    • http://www.model-voting.de
hab das mal bei phpbb gepostet
« Reply #2 on: March 31, 2003, 02:26:49 PM »
Quote from: party-cam.org
http://www.4homepages.de/forum/viewtopic.php?t=4695

hier steht ne lösung - eine, aber nicht die beste...


Hy,

da ich gerne ne richtige Lösung dafür hätte, hab ich das mal bei phpbb Hilfeforum gepostet.
Dort gibt es auch jemanden der mir das alles einbauen würde. Welche Daten von 4images müsste ich ihm dafür zur verfügung stellen???
Logisch das ich dann wenns funzt hier ne to do Liste posten würde.

Gruß

Thomas