[ Príspevok: 1 ] 
AutorSpráva
Offline

Prevádzkovateľ fóra
Prevádzkovateľ fóra
PM Popup Blocker Fix

Registrovaný: 01.05.05
Príspevky: 12419
Témy: 1447 | 1447
Bydlisko: Bratislava
Vek: 32
NapísalOffline : 14.10.2006 14:49 | PM Popup Blocker Fix

Kód:
##############################################################
## MOD Title: PM Popup Blocker Fix
## MOD Author: tomlevens < tom@tomlevens.co.uk > (Tom Levens) http://www.tomlevens.co.uk/
## MOD Description: The PM notification popup window is blocked by most browsers "Popup Blockers" - this MOD fixes it by displaying the notification as a dialog box instead.
## MOD Version: 1.0.0
##
## Installation Level: Easy
## Installation Time: 3 Minutes
## Files To Edit: includes/page_header.php
##              language/lang_english/lang_main.php
##                templates/subSilver/overall_header.tpl
## Included Files: n/a
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
## The idea of this mod is quite simple! Browsers featuring "Popup Blockers" stop the user from
## seeing PM notification popup. This MOD gets around this problem by using a dialog box (not
## blocked) for the notification instead of the popup window.
##
## This mod was inspired by the system used in vBulletin (Boo Hiss!) ;)
##
##############################################################
## MOD History:
##
##Ę Ę2004-08-10 - Version 1.0.0
##Ę Ę Ę - Initial Release
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ OPEN ]------------------------------------------
#
includes/page_header.php

#
#-----[ FIND ]------------------------------------------
#
   'L_PRIVATEMSGS' => $lang['Private_Messages'],

#
#-----[ AFTER, ADD ]------------------------------------------
#
   // MOD: PM Popup Blocker Fix - by tomlevens (tom@tomlevens.co.uk)
   // (1 line added)
   //
   'L_PRIVATEMSG_NEW' => ($userdata['user_new_privmsg'] == 1) ? $lang['You_new_pm'] : $lang['You_new_pms'],
   //
   // END MOD

#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php

#
#-----[ FIND ]------------------------------------------
#
$lang['You_new_pm'] = 'A new private message is waiting for you in your Inbox';
$lang['You_new_pms'] = 'New private messages are waiting for you in your Inbox';

#
#-----[ REPLACE WITH ]------------------------------------------
#
# NOTE: This step isn't really necessary. All it does is changes the
# dialog message to tell the user to click OK to display their Inbox.
#
// MOD: PM Popup Blocker Fix - by tomlevens (tom@tomlevens.co.uk)
// (2 lines replaced - original lines follow)
//
// $lang['You_new_pm'] = 'A new private message is waiting for you in your Inbox';
// $lang['You_new_pms'] = 'New private messages are waiting for you in your Inbox';
//
$lang['You_new_pm'] = 'A new private message is waiting for you in your Inbox. Click OK to view it.';
$lang['You_new_pms'] = 'New private messages are waiting for you in your Inbox. Click OK to view them.';
//
// END MOD

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/overall_header.tpl

#
#-----[ FIND ]------------------------------------------
#
# NOTE: you will need to do this for all your templates!
#
<!-- BEGIN switch_enable_pm_popup -->
<script language="Javascript" type="text/javascript">
<!--
   if ( {PRIVATE_MESSAGE_NEW_FLAG} )
   {
      window.open('{U_PRIVATEMSGS_POPUP}', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400');;
   }
//-->
</script>
<!-- END switch_enable_pm_popup -->

#
#-----[ REPLACE WITH ]------------------------------------------
#
<!-- BEGIN switch_enable_pm_popup -->
<script language="javascript" type="text/javascript">
<!--
// MOD: PM Popup Blocker Fix - by tomlevens (tom@tomlevens.co.uk)
// (4 lines replaced - original lines follow)
//
//   if ( {PRIVATE_MESSAGE_NEW_FLAG} )
//   {
//      window.open('{U_PRIVATEMSGS_POPUP}', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400');;
//   }
//
   if({PRIVATE_MESSAGE_NEW_FLAG})
   {
      new_pm_prompt = confirm('{L_PRIVATEMSG_NEW}');
      if(new_pm_prompt == true) {
         // Redirect to Inbox if OK is clicked
         window.location = '{U_PRIVATEMSGS}';
      }
      else {
         // Close prompt if cancel is clicked
      }
   }
//
// END MOD
//-->
</script>
<!-- END switch_enable_pm_popup -->

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM


_________________
SilverStone SST CS01 | Corsair SF600 600W SFX | ASRock X99E-ITX/ac | Intel Xeon E5-2683 v4 (16 Cores / 32 Threads) & Noctua NH-U9DX i4 | Kingston HyperX Savage 32 GB DDR4 2400 MHz | PNY NVIDIA Quadro K1200 DP 4 GB DDR5 | Intel SSD 750 1.2 TB NVMe & Intel SSD 730 240 GB SATA & Seagate BackUp Plus Portable 12 TB USB | 31.5" 4K LCD EIZO FlexScan EV3237 & 2 x 24" LCD EIZO FlexScan EV2451 | Ergotron LX Wall Mount Keyboard Arm | Logitech Craft | Logitech Wireless G700s | Harman Kardon Nova | Microsoft Windows 7 Ultimate | APC Back-UPS ES 700 | Lenovo ThinkPad X250 - Intel Core i7 5600U, 8 GB DDR3 1600 MHz, Intel HD Graphics 5500, SanDisk SSD 512 GB, 12.5 FHD LED IPS, WWAN 3G 4G LTE, Microsoft Windows 7 Ultimate | Nintendo Classic Mini | BlackBerry Passport 96 GB
 [ Príspevok: 1 ] 


PM Popup Blocker Fix



Podobné témy

 Témy  Odpovede  Zobrazenia  Posledný príspevok 
V tomto fóre nie sú ďalšie neprečítané témy.

JavaSkript Error Blocker

v Redakčné systémy

0

309

14.10.2006 14:53

JanoF

V tomto fóre nie sú ďalšie neprečítané témy.

Outlook fix

v Sieťové a internetové programy

0

37

30.12.2012 9:56

vladoff

V tomto fóre nie sú ďalšie neprečítané témy.

png fix

v HTML, XHTML, XML, CSS

17

900

09.02.2009 15:43

tomco3131

V tomto fóre nie sú ďalšie neprečítané témy.

Acceleration registry fix

v Externé zariadenia

1

802

29.05.2006 11:19

Harlequin

V tomto fóre nie sú ďalšie neprečítané témy.

IE6 .png fix

v HTML, XHTML, XML, CSS

2

503

27.12.2009 23:32

luster

V tomto fóre nie sú ďalšie neprečítané témy.

PNG fix for IE6

v HTML, XHTML, XML, CSS

6

773

04.02.2011 13:01

1daemon1

V tomto fóre nie sú ďalšie neprečítané témy.

Windows XP MBR fix alternatíva

v Operačné systémy Microsoft

2

287

06.04.2011 21:53

c5x83x™

V tomto fóre nie sú ďalšie neprečítané témy.

POPUP

v JavaScript, VBScript, Ajax

10

458

28.04.2010 16:45

djsulo

V tomto fóre nie sú ďalšie neprečítané témy.

popup box

v JavaScript, VBScript, Ajax

7

133

25.02.2013 21:12

shaggy

V tomto fóre nie sú ďalšie neprečítané témy.

POPUP okno

v JavaScript, VBScript, Ajax

7

707

07.06.2009 9:49

shaggy

V tomto fóre nie sú ďalšie neprečítané témy.

popup reklama

v JavaScript, VBScript, Ajax

0

115

31.08.2013 16:04

boss382

V tomto fóre nie sú ďalšie neprečítané témy.

Restart celého desktopu a modrá obrazovka - Fix?

v Kôš

1

99

07.02.2017 21:42

brmbo

V tomto fóre nie sú ďalšie neprečítané témy.

POPUP okno, stylovanie

v JavaScript, VBScript, Ajax

11

504

08.07.2010 20:01

Ďuri

V tomto fóre nie sú ďalšie neprečítané témy.

Popup okno v Delphi

v Delphi, Visual Basic

16

1082

28.07.2010 13:06

newby

V tomto fóre nie sú ďalšie neprečítané témy.

Z popup okna do textarei

v JavaScript, VBScript, Ajax

7

553

15.03.2008 2:20

chrono

V tomto fóre nie sú ďalšie neprečítané témy.

[RoR] vytvorenie popup okna v urcitom case

v Perl, Python, Ruby, CGI

1

143

04.02.2015 14:41

chrono



© 2005 - 2017 PCforum, edited by JanoF