Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: karlbenson on August 28, 2007, 06:53:28 PM

Title: Pm Popup - Uses The Same Window
Post by: karlbenson on August 28, 2007, 06:53:28 PM


POPUP PM MESSAGE - USES THE SAME WINDOW v1.3
By Karl Benson


Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=906) | Comment On This Mod (http://www.simplemachines.org/community/index.php?topic=191702.0)

Introduction
If you enable the profile setting to get a popup when you receive a PM, you may find that clicking OK or Cancel has no effect.
This is because your popup blocker is blocking a new window to the PM center opening.

So this modification changes the behaviour to use the CURRENT window instead, and so works even with my popup blocker set to HIGH.

Installation
Simple & Easy, install. (DONE!)

This mod is ONLY compatible for SMF 1.1.x versions.

NO Theme edits are required.
This mod only changes a single line in the Subs.php Source file and a single language string.

Languages
Supports the following languages
o english/english-utf8
o english_british/english_british-utf8
o Greek/Greek-utf8 support (Thanks MinasC)
If you are NOT using the languages supported by this mod, you will need to alter the wording of language string
$txt['show_personal_messages'] in your language file index.{language}.php and/or index.{language}-utf8.php
so it states that it will goto your PM Inbox in the same window rather than a new window.
(This mod doesnt have any language strings of its own, but alters an existing one).

Support
Please use the modification thread for support with this modification.

Changelog
1.0 - 16th August 2007
o Initial public release per user request.
1.1 - 17th August 2007
o Altered the default language string to inform of the changed behaviour
   (informs the user it will open in the current rather than a new window)
1.2 - 14th November 2007
o Added the language change to utf-8 english aswell
o Added english_british/english_british-utf8 support
1.3 - 8th December 2007
o Added Greek/Greek-utf8 support (Thanks MinasC)
Title: Re: Pm Popup - Uses The Same Window
Post by: alo on August 30, 2007, 01:36:05 AM
:) nice mod, i'll have a try.
Thanks for your good work!
Title: Re: Pm Popup - Uses The Same Window
Post by: shumilica on September 11, 2007, 02:07:25 PM
I wanted this modification for a long time, but with some tweaking... do you think you can help to implement what I asked in this ( http://www.simplemachines.org/community/index.php?topic=167862.0 ) topic?
Thanks in advance
Title: Re: Pm Popup - Uses The Same Window
Post by: Eleglin on September 11, 2007, 02:11:42 PM
Any screenshot ?  ;)
Title: Re: Pm Popup - Uses The Same Window
Post by: karlbenson on September 11, 2007, 02:16:10 PM
shumilica, what your after wouldn't be a tweak to this mod more of a complete alteration.  Basically you would be replacing the javascript alert confirm with an ajax popup to load the pm's.

It does look like something I would love to see in smf.  However I've done very little ajax and it is well out of my league.

This would be something decent for viewing the attachments.
Title: Re: Pm Popup - Uses The Same Window
Post by: karlbenson on September 11, 2007, 02:16:44 PM
Eleglin? the mod or what shumilica was requesting?

For the latter see
http://orangoo.com/labs/GreyBox/
Title: Re: Pm Popup - Uses The Same Window
Post by: Veej on October 22, 2007, 05:25:02 PM
Hi Karl,
Great mod!

However, for members to have the popup, they have to enable it manually in their profile.

Any suggestions as to how this popup would be displayed for all members by default?

Cheers! :)
Title: Re: Pm Popup - Uses The Same Window
Post by: karlbenson on October 22, 2007, 06:49:25 PM
Admin > Current Theme > Reset Options.

Reset all members' current options for this theme

Change
Show a popup when you receive new messages?
Title: Re: Pm Popup - Uses The Same Window
Post by: shadow82x on October 22, 2007, 06:58:31 PM
How about a package for SMF2? :P
Title: Re: Pm Popup - Uses The Same Window
Post by: karlbenson on October 22, 2007, 07:05:16 PM
I'm not aware this mod works for smf 2.0 beta 1.

But to change the 'popup' to be on for all members, its exactly the same, exact to note that reset options has been renamed to member options.
Title: Re: Pm Popup - Uses The Same Window
Post by: Veej on October 23, 2007, 02:38:56 PM
Quote from: karlbenson on October 22, 2007, 06:49:25 PM
Admin > Current Theme > Reset Options.

Reset all members' current options for this theme

Change
Show a popup when you receive new messages?
Cheers Karl :)
Title: Re: Pm Popup - Uses The Same Window
Post by: karlbenson on November 14, 2007, 06:44:29 PM
I've just uploaded v1.2 Mod (http://custom.simplemachines.org/mods/index.php?mod=906)

v1.2 - 14th November 2007
o Added the language change to utf-8 english aswell
o Added english_british/english_british-utf8 support
Title: Re: Pm Popup - Uses The Same Window
Post by: MinasC on December 04, 2007, 01:26:32 PM
installed and working fine ! thnx ! greek translation :

$txt['show_personal_messages'] = 'Λάβατε ένα ή περισσότερα προσωπικά μηνύματα.\\nΕμφάνιση τώρα (στο ίδιο παράθυρο);';
Title: Re: Pm Popup - Uses The Same Window
Post by: karlbenson on December 07, 2007, 06:03:03 PM
1.3 - 8th December 2007
o Added Greek/Greek-utf8 support (Thanks MinasC)
Title: Re: Pm Popup - Uses The Same Window
Post by: De4thPr00f on December 08, 2007, 02:07:58 AM
Ok, good mod. But if you don't mind i'll try to improve it later.
By now, here's the translation to portuguese
&txt['show_personal_messages'] = 'Tu tens pelo menos uma mensagem.\\nVer agora (numa nova  janela)?';
Title: Re: Pm Popup - Uses The Same Window
Post by: De4thPr00f on December 09, 2007, 04:18:02 AM
karlbenson:
Ok, i think i need ur help from now on, i've included the modalbox on the template of my site, when i press a link with the function onclick="Modalbox.Show(...)" it opens the box with no trouble.
Ok, the reason of all this is that i want to implement that with this mod...
But i can't execute that Modalbox.show() when the page loads... (it should only execute that if there are new pm's. So what i need to change is at subs.php)
Unfortunely i don't know too much of php, or javascript to do the execution of that function.
Title: Re: Pm Popup - Uses The Same Window
Post by: De4thPr00f on December 09, 2007, 10:47:56 AM
I've done that and it's working, but i need help with improvements, if anyone wants to help i'll be grateful :)
Title: Re: Pm Popup - Uses The Same Window
Post by: ssaudio on January 07, 2008, 07:48:19 AM
I installed this mod.  where it looks like the mod controls would be I get black check boxes and black pulldown menus?  anyone know or have seen whats happening?
Title: Re: Pm Popup - Uses The Same Window
Post by: karlbenson on January 18, 2008, 11:59:43 PM
I have reuploaded this mod and screenshots for it.

I am in the process of doing it for ALL my other mods aswell.  Please bear with me.
Title: Re: Pm Popup - Uses The Same Window
Post by: dumblonde on February 23, 2008, 02:29:54 PM
I am using the Mint Green theme & when I went to install my forum crashed.  There was an error on line 149 (sorry I didn't read the error message further as I freaked out).  Luckily I was able to use my browser back button & go back to my packages page where I clicked the uninstall button & my forum came back.

I really like the idea of this mod & want to use it but now I am scared to try another install.  Any clue as to what may have happened?
Title: Re: Pm Popup - Uses The Same Window
Post by: motsmart on March 11, 2008, 09:11:41 PM
Don't work in 1.1.4... any way to get it working?
gives me the error says this mod is not for smf!, I'm not sure whats the exact phrase cause english is not selected as of default language.

Title: Re: Pm Popup - Uses The Same Window
Post by: karlbenson on March 12, 2008, 09:01:45 AM
The mod does work on 1.1.4. Its designed for it.

If it says there is an error, it maybe a conflict with other mods which you have installed.
Manually install it using the edits provided by a package parser (http://www.adrevenueshare.com/parser)
Title: Re: Pm Popup - Uses The Same Window
Post by: motsmart on March 14, 2008, 12:16:46 AM
Thanks!, Such a good parser!, I was nearly getting mad of following xml files, but anyway i went through xml files manually and have this mod running on 1.1.4, Maybe i use this amazing parser next time.
Title: Re: Pm Popup - Uses The Same Window
Post by: karlbenson on March 14, 2008, 12:10:46 PM
No problem.

The parsers do come in handy ;)
Title: Re: Pm Popup - Uses The Same Window
Post by: PAPABEAR on May 29, 2008, 09:27:10 AM
Does this work for 1.1.5?
Title: Re: Pm Popup - Uses The Same Window
Post by: karlbenson on May 29, 2008, 10:18:31 AM
It should do.

If it doesn't. I should state that [n3rve] is taking over development of this mod and currently has a 1.1.5 and 2.x version awaiting approval. http://custom.simplemachines.org/mods/index.php?mod=1203
[Won't be able to download until its approved]
Title: Re: Pm Popup - Uses Active Window
Post by: N3RVE on June 04, 2008, 12:48:20 PM
Sorry for the delay, had to do some modiifcation.
The Customize Team reminded me and I have uploaded an updated version.

It Should be approved soon!

-[n3rve]
Title: Re: Pm Popup - Uses The Same Window
Post by: N3RVE on June 06, 2008, 01:56:44 PM
For Support Regarding this mod, refer to
http://www.simplemachines.org/community/index.php?topic=243112.msg1569272#msg1569272

-[n3rve]