[ Príspevok: 1 ] 
AutorSpráva
Offline

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

Registrovaný: 01.05.05
Príspevky: 13415
Témy: 1496 | 1496
Bydlisko: Bratislava
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


_________________
Streacom DA2 | SilverStone Titanium SX800-LTI 800W | ASRock X299E-ITX/ac | Intel Core i9-9980XE & be quiet! Dark Rock TF | Kingston HyperX Impact 64 GB DDR4 2666 MHz | NVIDIA Titan RTX 24 GB | Intel SSD Optane 905P 480 GB NVMe U.2 & Intel SSD 750 1,2 TB NVMe U.2 & Intel SSD 660p 2 TB NVMe M.2 & Seagate BackUp Plus Portable 56 TB USB | 55" 4K OLED Dell Alienware AW5520QF | Ergotron LX Wall Mount Keyboard Arm | Logitech Craft | Logitech G603 | Logitech F710 | Harman Kardon Sabre SB 35 & Sennheiser RS 175 | Microsoft Windows 11 Enterprise | APC Back-UPS BE-850 VA | Lenovo ThinkPad X250 & Microsoft Windows 11 Professional | iPhone 15 Pro 256 GB & Pitaka Aramid | SilverStone ML05B Milo | Corsair SF600 SFX 600W | ASRock X99E-ITX/ac | Intel Xeon E5-2683 v4 & NOCTUA NH-L12S | Kingston HyperX Savage 32 GB DDR4 2400 MHz | NVIDIA GeForce GT 710 1 GB | Intel SSD Optane Memory 32 GB NVMe M.2 & Intel SSD 730 240 GB SATA | Ubuntu 24.04.1 LTS
 [ 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

421

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

232

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

1207

09.02.2009 15:43

tomco3131

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

IE6 .png fix

v HTML, XHTML, XML, CSS

2

814

27.12.2009 23:32

luster

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

Acceleration registry fix

v Externé zariadenia

1

1044

29.05.2006 11:19

Harlequin

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

POPUP

v JavaScript, VBScript, Ajax

10

753

28.04.2010 16:45

djsulo

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

PNG fix for IE6

v HTML, XHTML, XML, CSS

6

1073

04.02.2011 13:01

1daemon1

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

laptop gtx1060 fix 30fps

v nVidia grafické karty

1

615

12.10.2018 12:53

void

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

POPUP okno

v JavaScript, VBScript, Ajax

7

1010

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

350

31.08.2013 16:04

boss382

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

popup box

v JavaScript, VBScript, Ajax

7

404

25.02.2013 21:12

shaggy

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

509

06.04.2011 21:53

c5x83x™

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

POPUP okno, stylovanie

v JavaScript, VBScript, Ajax

11

754

08.07.2010 20:01

Ďuri

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

Splinter cell Pandora tomorrow lightning fix

v Počítačové hry

3

426

29.07.2020 14:30

Kehoci

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

Popup okno v Delphi

v Delphi, Visual Basic

16

1437

28.07.2010 13:06

newby

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



© 2005 - 2024 PCforum, edited by JanoF