News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Pm Popup - Uses The Same Window

Started by karlbenson, August 28, 2007, 06:53:28 PM

Previous topic - Next topic

karlbenson



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



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)

alo

:) nice mod, i'll have a try.
Thanks for your good work!

shumilica

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
Today, if you're not confused it means you're not thinking clear!

Eleglin

No support by PM or Mail.

karlbenson

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.

karlbenson

Eleglin? the mod or what shumilica was requesting?

For the latter see
http://orangoo.com/labs/GreyBox/

Veej

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! :)

karlbenson

Admin > Current Theme > Reset Options.

Reset all members' current options for this theme

Change
Show a popup when you receive new messages?

shadow82x

Colin B
Former Spammer, Customize, & Support Team Member

karlbenson

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.

Veej

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 :)

karlbenson

I've just uploaded v1.2 Mod

v1.2 - 14th November 2007
o Added the language change to utf-8 english aswell
o Added english_british/english_british-utf8 support

MinasC

installed and working fine ! thnx ! greek translation :

$txt['show_personal_messages'] = 'Λάβατε ένα ή περισσότερα προσωπικά μηνύματα.\\nΕμφάνιση τώρα (στο ίδιο παράθυρο);';

karlbenson

1.3 - 8th December 2007
o Added Greek/Greek-utf8 support (Thanks MinasC)

De4thPr00f

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)?';

De4thPr00f

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.

De4thPr00f

I've done that and it's working, but i need help with improvements, if anyone wants to help i'll be grateful :)

ssaudio

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?

karlbenson

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.

dumblonde

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?

Advertisement: