Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: an1m4l on November 16, 2016, 03:56:10 PM

Title: remove the pm pop up dialog
Post by: an1m4l on November 16, 2016, 03:56:10 PM
Is there anyway to remove the dialog pop up for the new pm? I've looked and only managed to find the call in index.template.php but that doesnt seem to work.
Title: Re: remove the pm pop up dialog
Post by: Illori on November 16, 2016, 04:01:55 PM
you can disable in your profile, but some people do find it useful to get the popup so they know they have received a PM. you can disable it under look and layout preferences.
Title: Re: remove the pm pop up dialog
Post by: an1m4l on November 16, 2016, 04:24:03 PM
Quote from: Illori on November 16, 2016, 04:01:55 PM
you can disable in your profile, but some people do find it useful to get the popup so they know they have received a PM. you can disable it under look and layout preferences.
I plan on adding a different notification solution, and would like to disable the one that SMF comes with completely.
Title: Re: remove the pm pop up dialog
Post by: d3vcho on November 16, 2016, 04:28:05 PM
Hello!

I've found a Mod that changes the style of that popup. Ypu can have a look at it if you want: http://custom.simplemachines.org/mods/index.php?mod=2283

And just to know if that Mod isn't what you want. What's exactly your idea for that popup?

Regards :)
Title: Re: remove the pm pop up dialog
Post by: an1m4l on November 16, 2016, 05:02:28 PM
I was going to use this http://custom.simplemachines.org/mods/index.php?mod=1202

and remove the pop up(http://i.imgur.com/Go8b49r.png)
Title: Re: remove the pm pop up dialog
Post by: Arantor on November 17, 2016, 04:13:54 AM
Pretty sure that mod replaces out the one you don't want anyway.
Title: Re: remove the pm pop up dialog
Post by: an1m4l on November 17, 2016, 10:00:54 PM
Quote from: Arantor on November 17, 2016, 04:13:54 AM
Pretty sure that mod replaces out the one you don't want anyway.
Nope, it even says it doesn't in the mod info.
Title: Re: remove the pm pop up dialog
Post by: Arantor on November 18, 2016, 02:37:12 AM
Where does it say that? I didn't see that on the mod page.
Title: Re: remove the pm pop up dialog
Post by: an1m4l on November 18, 2016, 03:41:07 AM
Quote from: Arantor on November 18, 2016, 02:37:12 AM
Where does it say that? I didn't see that on the mod page.
oh my bad, in the support thread linked in the mod. seriously though, I've had it installed (just to make sure before even posting) to see if it did remove/change that dialog and i didn't thats why im posting here
Title: Re: remove the pm pop up dialog
Post by: bestnow on November 18, 2016, 04:23:02 AM
Quote from: an1m4l on November 18, 2016, 03:41:07 AM
Quote from: Arantor on November 18, 2016, 02:37:12 AM
Where does it say that? I didn't see that on the mod page.
oh my bad, in the support thread linked in the mod. seriously though, I've had it installed (just to make sure before even posting) to see if it did remove/change that dialog and i didn't thats why im posting here

okey did u found a way to remove the old one??
Title: Re: remove the pm pop up dialog
Post by: an1m4l on November 18, 2016, 09:53:21 PM
Possibly, but I believe it's breaking things
Title: Re: remove the pm pop up dialog
Post by: bestnow on November 19, 2016, 01:44:25 AM
okay i know two ways here is (one) u can remove this in index.template :
(index.template in that theme u use not default.)


<script type="text/javascript"><!-- // --><![CDATA[
      var smf_theme_url = "', $settings['theme_url'], '";
      var smf_default_theme_url = "', $settings['default_theme_url'], '";
      var smf_images_url = "', $settings['images_url'], '";
      var smf_scripturl = "', $scripturl, '";
      var smf_iso_case_folding = ', $context['server']['iso_case_folding'] ? 'true' : 'false', ';
      var smf_charset = "', $context['character_set'], '";', $context['show_pm_popup'] ? '
      var fPmPopup = function ()
      {
         if (confirm("' . $txt['show_personal_messages'] . '"))
            window.open(smf_prepareScriptUrl(smf_scripturl) + "action=pm");
      }
      addLoadEvent(fPmPopup);' : '', '
      var ajax_notification_text = "', $txt['ajax_in_progress'], '";
      var ajax_notification_cancel_text = "', $txt['modify_cancel'], '";
   // ]]></script>
Title: Re: remove the pm pop up dialog
Post by: an1m4l on November 19, 2016, 03:09:19 AM
yeah thats the one, when I remove it no problem, add in the mod and no loads xD time to work this out
Title: Re: remove the pm pop up dialog
Post by: Arantor on November 19, 2016, 03:21:12 AM
Replace with:


<script type="text/javascript"><!-- // --><![CDATA[
      var smf_theme_url = "', $settings['theme_url'], '";
      var smf_default_theme_url = "', $settings['default_theme_url'], '";
      var smf_images_url = "', $settings['images_url'], '";
      var smf_scripturl = "', $scripturl, '";
      var smf_iso_case_folding = ', $context['server']['iso_case_folding'] ? 'true' : 'false', ';
      var smf_charset = "', $context['character_set'], '";', $context['show_pm_popup'] ? '
      var fPmPopup = function ()
      {
         if (confirm("' . $txt['show_personal_messages'] . '"))
            window.open(smf_prepareScriptUrl(smf_scripturl) + "action=pm");
      }' : '', '
      var ajax_notification_text = "', $txt['ajax_in_progress'], '";
      var ajax_notification_cancel_text = "', $txt['modify_cancel'], '";
   // ]]></script>
Title: Re: remove the pm pop up dialog
Post by: bestnow on November 19, 2016, 11:02:28 AM
Quote from: Arantor on November 19, 2016, 03:21:12 AM
Replace with:


<script type="text/javascript"><!-- // --><![CDATA[
      var smf_theme_url = "', $settings['theme_url'], '";
      var smf_default_theme_url = "', $settings['default_theme_url'], '";
      var smf_images_url = "', $settings['images_url'], '";
      var smf_scripturl = "', $scripturl, '";
      var smf_iso_case_folding = ', $context['server']['iso_case_folding'] ? 'true' : 'false', ';
      var smf_charset = "', $context['character_set'], '";', $context['show_pm_popup'] ? '
      var fPmPopup = function ()
      {
         if (confirm("' . $txt['show_personal_messages'] . '"))
            window.open(smf_prepareScriptUrl(smf_scripturl) + "action=pm");
      }' : '', '
      var ajax_notification_text = "', $txt['ajax_in_progress'], '";
      var ajax_notification_cancel_text = "', $txt['modify_cancel'], '";
   // ]]></script>



w00t+   (y)
Title: Re: remove the pm pop up dialog
Post by: Vyazhan on June 22, 2017, 07:18:18 AM
Just wanted to say thanks quick, worked like a charm! :)