[MOD] Replace popup for new private messages

This forum contains member submitted mods and hacks for IntegraMOD/IM Portal versions

*please read the "Read Me" post*

Moderator: Integra Moderator

[MOD] Replace popup for new private messages

PostAuthor: evolver » Fri Apr 14, 2006 2:57 am

The 'Private Messages'-popup doesn't work when you brower doesn't allow popups... (a standard option in Firefox)
Because of that, visitors might forget to look at them...

I've applied this very small MOD to my site...
This gives a Javascript box instead of a popup.

I've tested it on my IntegraMOD site.
Very easy to install... works like a charm


Code: Select all
################################################################ MOD Title]http://www.phpbb.hotschi.de/#[/url]# MOD Description:  As everybody has a popup blocker today, this mod replaces the popup for new##           private messages with a confirmation Java Script Box. It tells you, that##           you have a new private message (or even how many, if you have more than one)##           and asks you if you want to go to your privat messages.##           Then you can click on Ok, or Abort.## MOD Version:       1.0.0#### Installation Level:   Easy## Installation Time:    2 Minute## Files To Edit:    3##           includes/page_header.php ##           templates/overall_header.tpl##           language/lang_english/lang_main.php###### Included Files:   n/a################################################################ For Security Purposes, Please Check: [url=http://www.phpbb.com/mods/]http://www.phpbb.com/mods/[/url] 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: [url=http://www.phpbb.com/mods/#]http://www.phpbb.com/mods/#[/url]############################################################### MOD History:####   2005-08-13 - Version 1.0.0##   - First release################################################################## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD##############################################################  # #-----[ OPEN ]------------------------------------------#  includes/page_header.php  # #-----[ FIND ]------------------------------------------#         $template->assign_block_vars('switch_enable_pm_popup', array());  # #-----[ AFTER, ADD ]------------------------------------------#                 $l_new_message = ( $userdata['user_new_privmsg'] == 1 ) ? $lang['You_new_pm'] : $lang['You_new_pms'];                 $l_new_message_text = sprintf($l_new_message, $userdata['user_new_privmsg']);                 $href = append_sid("privmsg.".$phpEx."?folder=inbox");                 $template->assign_vars(array(                 'L_MESSAGE' => $l_new_message_text,                 'U_HREF' => $href));  # #-----[ OPEN ]------------------------------------------#  templates/overall_header.tpl  # #-----[ FIND ]------------------------------------------#         window.open('{U_PRIVATEMSGS_POPUP}', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400');;  # #-----[ REPLACE WITH ]------------------------------------------#         if ( confirm("{L_MESSAGE}") )         {             top.location.href="{U_HREF}";         }  # #-----[ 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 ]------------------------------------------#$lang['You_new_pm'] = 'A new private message is waiting for you in your Inbox.nDo you want to go to your private messages?';$lang['You_new_pms'] = '%d new private messages are waiting for you in your InboxnDo you want to go to your private messages?';      # #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------# # EoM
Last edited by evolver on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
ImageAlways remember you're unique, just like everyone else.
We are born naked, wet and hungry. Then things get worse.
Don't take life too seriously, you won't get out alive.
User avatar
evolver
Sr Integra Member
Sr Integra Member
 
Posts: 420
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 12:46 pm
Cash on hand: 0.00
Location: Oostende

Re: [MOD] Replace popup for new private messages

PostAuthor: found it » Wed May 03, 2006 4:46 am

I can clarify this works as I have it on 2 sites..

nice one

:mrgreen:
Last edited by found it on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[url=http]themes.[/url]
http://www.founditforum.com :: [url=http]Joining people together[/url]

[url=http][img=left]http://www.bbful.com/bbful_banner2.png[/img][/url]
User avatar
found it
Dev Team
Dev Team
 
Posts: 792
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 3:29 am
Cash on hand: 0.00

PostAuthor: Bush » Wed May 03, 2006 7:57 am

I do as well, works great and no one missing the clan meetings b/c of some stupid pop-up blocker!
Last edited by Bush on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
no signature.

Bush
Integra Member
Integra Member
 
Posts: 191
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 7:55 am
Cash on hand: 0.00

Re: [MOD] Replace popup for new private messages

PostAuthor: Dr. Bantham » Wed May 17, 2006 3:49 pm

I like this mod, but I dislike the fact that the main page in the background clears to a blank screen when the pop-up initiates. It is disorienting and perhaps even alarming for some members, as it appears that something has gone wrong. Can it be affixed after the page_footer instead?

Also, would a javascript window statement call for the original method not accomplish the same intent, or do pop-up blockers eat these without discretion?
Last edited by Dr. Bantham on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
User avatar
Dr. Bantham
Integra Member
Integra Member
 
Posts: 152
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 08, 2006 5:25 pm
Cash on hand: 0.00

Re: [MOD] Replace popup for new private messages

PostAuthor: Sadasius2 » Tue Jun 13, 2006 7:34 am

Works great, awesome. Thank you very much!
Last edited by Sadasius2 on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[url=http][img=left]http://www.houseofottawa.com/dd.gif[/img][/url]
User avatar
Sadasius2
Newbie
Newbie
 
Posts: 14
Likes: 0 post
Liked in: 0 post
Joined: Sun Jun 11, 2006 5:16 pm
Cash on hand: 0.00


Return to Mods/Hacks

Who is online

Registered users: Bing [Bot], Google [Bot], Helter, Majestic-12 [Bot]