[RC1] PHPBB3 PM Pop-UP Fix

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Suggested Hosts
Jfnyne
Registered User
Posts: 76
Joined: Tue Jun 28, 2005 4:22 am

[RC1] PHPBB3 PM Pop-UP Fix

Post by Jfnyne » Fri Sep 21, 2007 3:20 am

MOD Title: PM Pop-UP Fix
MOD Description: Mod changes the notification of a pm so that popup blockers dont block it
MOD Version: 1.0

MOD Download: download mod here
Basically its this:

Code: Select all

#
#Open \prosilver\template\overall_header.html
#Find
#
if ({S_NEW_PM})
{
window.open('{UA_POPUP_PM}', '_phpbbprivmsg', 'height=225,resizable=yes,width=400');
}
#
#Replace With
#
if ({S_NEW_PM})
{
var answer = confirm("You have a new PM. Do you want to check your messages");
if (answer)
window.location ='{U_PRIVATEMSGS}';
answer = null;
}
#
#Done
Last Stable version: N/A

Demo Board: thesithcouncil.com
Demo Username: tester
Demo Password: testing

Based on:
MOD Name: PM Popup Blocker Fix
Author: tomlevens
MOD Description: This MOD changes the private message notification to a JavaScript dialog box instead of the popup window to get around the popup blocker included in many browsers.

MOD Version: 1.0.1 (Updated 01/24/07)
Tested on phpBB Version: 2.0.22

Download File: pm_popup_blocker_fix_101a.mod
mods overview page: View
File Size: 4279 Bytes
I dont know if this is a mod or not but I love it and so does my community. So what this does:
1. before loading the page if you have a new pm and you haven't been to the messages page yet an option box will stop the page from loading and ask you if you want to view your messages.
2. If you press ok it will have the page load to the messages
3. if you press cancel the page will finish loading where you are
4. if you cancel it will not bother you again. basically, you only get this once per new message that you haven't been to your messages page. its a one time answer every time.
5. Make sure the in the users profile that the setting "Pop up window on new private message" is "YES"

FOR THE DEMO SITE!
This is a little hard to say so bare with me. When you submit a pm you go to a submit confirmation window. if you go directly back to messages it will just load the messages you will not get prompted to go there because you are heading there(there is no need). Also if you have already been to the messages since your last new message it will not prompt you even if you leave it unread because it knows that since that message you have already checked that page. So heres how to see it in action:
1. Send yourself "tester" a pm
2. You will be directed to a pm confirmation page
3. from the confirmation page after you submit the pm you need to goto the index or any other page other than the messages page so that it can tell you you have a new message
4. you should be prompted if you press cancel it will not bother you again about that new pm if you press ok you will not be bothered by it again and will be taken to the messages page.

I hope this was helpful and easy to understand

Please feel free to correct this as this is my first mod and not sure how to do the labels I have seen others do. Also I like writing out more than what is needed sometimes in code so others can see easily whats going on feel free to correct/condense it if you want.

Also if you dont want to save time by preventing the entire page from loading you can delete the find part from the overall_header.html and put the replace part in the overall_footer.html as long as its contained in a javascript tags.

Also I dont know whats needed to complete/validate this but it works 100% and is good to go. It works in firefox/ie6&7/safari/konquer. So if your a validator please move this or do whatever you need to do.
Last edited by Jfnyne on Thu Oct 04, 2007 10:18 pm, edited 8 times in total.
Image

User avatar
CrimsonThunder
Registered User
Posts: 340
Joined: Sun Sep 02, 2007 10:18 am

Re: PHPBB3 pop up blocker fix

Post by CrimsonThunder » Fri Sep 21, 2007 3:46 am

I just tested it on your site and nothing happened, I don't think I did anything wrong...

.:: Chico ::.
Registered User
Posts: 463
Joined: Fri Aug 03, 2007 6:35 am
Location: Rio de Janeiro
Contact:

Re: PHPBB3 pop up blocker fix

Post by .:: Chico ::. » Fri Sep 21, 2007 3:53 am

i've tested too, and nothing happend, i left the tester login with a 1 new message.

bye!

Jfnyne
Registered User
Posts: 76
Joined: Tue Jun 28, 2005 4:22 am

Re: PHPBB3 pop up blocker fix

Post by Jfnyne » Fri Sep 21, 2007 3:59 pm

please delete this posted added text to top post
Last edited by Jfnyne on Sun Sep 23, 2007 1:45 am, edited 3 times in total.
Image

Jfnyne
Registered User
Posts: 76
Joined: Tue Jun 28, 2005 4:22 am

Re: PHPBB3 pop up blocker fix

Post by Jfnyne » Fri Sep 21, 2007 5:18 pm

you know what I am so sorry! I went ahead and looked into it a bit but I had the "notify of new pm" for that account off somehow though I thought I had it on try it again. So so sorry. So this setting has to be set as well for the users in their profile.
Pop up window on new private message: YES
Image

User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34457
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

Re: PHPBB3 pop up blocker fix

Post by A_Jelly_Doughnut » Fri Sep 21, 2007 10:00 pm

Hello,

Please edit your topic title with a prefix as outlined in Modifications Development Forum Rules, section 3.a. This will allow people to see the development status of your modification at a glance.

Thank you,
The phpBB Modifications Team
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish

User avatar
CrimsonThunder
Registered User
Posts: 340
Joined: Sun Sep 02, 2007 10:18 am

Re: [RC1] PHPBB3 PM Pop-UP Fix

Post by CrimsonThunder » Sat Sep 22, 2007 6:09 am

Works great. :thumbsup:

Jfnyne
Registered User
Posts: 76
Joined: Tue Jun 28, 2005 4:22 am

Re: [RC1] PHPBB3 PM Pop-UP Fix

Post by Jfnyne » Sat Sep 22, 2007 6:41 am

Thanks!glad you like it! :D I am taking future ideas and even code suggestions so feel free to post that too. A future Idea maybe that if its just a single new pm the popup will just pull in that one message so you can just read it from the popup and choose to reply, goto messages, or continue what you were doing. I did have a request that this be implemented with Ajax and thats a good Idea I may look into but I like the idea that it doesn't bother you while your on a page only between pages. I may try and make it an option but I am a new to coding mods here and might need help with that if any people are willing.
Image

.:: Chico ::.
Registered User
Posts: 463
Joined: Fri Aug 03, 2007 6:35 am
Location: Rio de Janeiro
Contact:

Re: [RC1] PHPBB3 PM Pop-UP Fix

Post by .:: Chico ::. » Sat Sep 22, 2007 6:17 pm

Now worked!!

:D :D

Jfnyne
Registered User
Posts: 76
Joined: Tue Jun 28, 2005 4:22 am

Re: [RC1] PHPBB3 PM Pop-UP Fix

Post by Jfnyne » Sun Sep 23, 2007 4:58 am

alright! hope you liked it.
Image

User avatar
Xclavo
Registered User
Posts: 185
Joined: Thu Sep 20, 2007 1:54 am

Re: [RC1] PHPBB3 PM Pop-UP Fix

Post by Xclavo » Sun Sep 23, 2007 11:59 am

Geez, this fix has been around for years. you would think they knew about pop ups by now, right.

Jfnyne
Registered User
Posts: 76
Joined: Tue Jun 28, 2005 4:22 am

Re: [RC1] PHPBB3 PM Pop-UP Fix

Post by Jfnyne » Mon Sep 24, 2007 2:05 am

:) well everyone has their way of doing things I like my way because it gets around popup blockers and you dont waist your time finishing loading the page when you are going to leave it and check messages and it keeps it from being caught by the browser, and option panes in java are a little faster than having to create another window instance but there are negatives to. its not pretty and you can do more complex things with a window pop up than option pane like flash or images etc.
Image

saaiberke
Registered User
Posts: 1126
Joined: Wed Jul 20, 2005 8:13 am
Location: Gent/Belgium
Contact:

Re: [RC1] PHPBB3 PM Pop-UP Fix

Post by saaiberke » Mon Oct 22, 2007 7:22 am

I like this MOD, it works ok. Only I guess it would be interesting if the message that appears for the user could be language dependant. So the message appears in the user's language.

Grtz,

Nic

User avatar
CrimsonThunder
Registered User
Posts: 340
Joined: Sun Sep 02, 2007 10:18 am

Re: [RC1] PHPBB3 PM Pop-UP Fix

Post by CrimsonThunder » Mon Oct 22, 2007 8:58 am

I like this mod as well, however I was wondering if its possible to have images in the box?

saaiberke
Registered User
Posts: 1126
Joined: Wed Jul 20, 2005 8:13 am
Location: Gent/Belgium
Contact:

Re: [RC1] PHPBB3 PM Pop-UP Fix

Post by saaiberke » Mon Oct 22, 2007 10:29 am

Posting to delete, what I wrote isn't working :)

Nic

Locked

Return to “[3.0.x] MODs in Development”