TinyPortal

Themes. => Bloc Themes (free) => Topic started by: Lesmond on May 05, 2012, 07:24:48 PM

Title: Gamerz personal message notification
Post by: Lesmond on May 05, 2012, 07:24:48 PM
I have this theme on a site I help run, but when a new PM is sent there is no notification next to the "My Messages" menu item, all other themes show there is a new message waiting on the site, but not Gamerz!

I dont have a clue where to look in the code  :idiot2:

(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fi46.tinypic.com%2F6olzc0.jpg&hash=45e353d0e674b985145c6190a6aae0ea0837d5fe)
Title: Re: Gamerz personal message notification
Post by: Maxx1 on May 05, 2012, 07:36:01 PM
Les meet me over at my test site I have the unchanged version installed there. you can send me

surfacethemes.com

a PM to test this... regards,
Maxx
Title: Re: Gamerz personal message notification
Post by: lurkalot on May 05, 2012, 07:42:27 PM
Pretty sure the PM count never has worked on this theme.  I seem to remember reading about this shortly before Bloc shut down his support boards.
Title: Re: Gamerz personal message notification
Post by: Maxx1 on May 05, 2012, 07:52:09 PM
OK your both Correct I t no work!! I need to go though the code to see if can find something.  May take some time :)

regards,
Maxx
Title: Re: Gamerz personal message notification
Post by: Lesmond on May 05, 2012, 07:54:28 PM
I did have a quick look, but I just didnt know what I was looking for, or even where to look lol
Title: Re: Gamerz personal message notification
Post by: Maxx1 on May 05, 2012, 08:00:52 PM
Cool Thanks I'll get back to you on this!
Should be in the index.template.php ..

regards,
Maxx
Title: Re: Gamerz personal message notification
Post by: Maxx1 on May 05, 2012, 08:22:48 PM
lets see if we can find somehting like this at the top of the index.template.php? of gamerz??

// Here comes the JavaScript bits!
   echo '
   <script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/script.js?fin20"></script>
   <script type="text/javascript" src="', $settings['theme_url'], '/scripts/theme.js?fin20"></script>
   <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>';


I'm sure Brad know what to do but we will investigate, my friends!

regards,
Maxx
Title: Re: Gamerz personal message notification
Post by: Maxx1 on May 05, 2012, 08:52:30 PM
Les plz PM me over there!
Title: Re: Gamerz personal message notification
Post by: Maxx1 on May 05, 2012, 09:21:32 PM
Ok the above code seems to be good so on we go>Not the problem!

regards,
Maxx
Title: Re: Gamerz personal message notification
Post by: Maxx1 on May 05, 2012, 10:18:46 PM
Well Guys looks like the index.template is good as far as I can tell, so I shall investigate this and get back if I find something, before Brad beats me to it :)
gonna dig in Bloc's menu stuff>>
regards,
Maxx
Title: Re: Gamerz personal message notification
Post by: IchBin on May 06, 2012, 01:57:22 AM
It has to do with this code likely in index.template. I have to run, or I'd figure it out. I'll check back when I get more time.

// change the PM button
if(isset($context['menu_buttons']['pm']) && $context['user']['unread_messages']>0)
$context['menu_buttons']['pm']['title'] = $txt['pm_short'] . ' <em class="pm_tip">' . $context['user']['unread_messages'] . '</em>';
Title: Re: Gamerz personal message notification
Post by: Lesmond on May 06, 2012, 02:43:13 AM
I have just checked and that code is there!

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
   global $context, $settings, $options, $scripturl, $txt;

   // change the PM button
   if(isset($context['menu_buttons']['pm']) && $context['user']['unread_messages']>0)
      $context['menu_buttons']['pm']['title'] = $txt['pm_short'] . ' <em class="pm_tip">' . $context['user']['unread_messages'] . '</em>';
   
   // add admin option to change settings
   if(allowedTo('admin_forum'))
Title: Re: Gamerz personal message notification
Post by: Maxx1 on May 06, 2012, 12:45:32 PM
Yes I checked and also changed out this portion , just to be sure it was not that, and no go!

And I stated above, I check the Scripts Above in the Index.template.php.... but it's probably something real minor we are overlooking, if you go to "my messages" it will show a NEW message, but the pm_tip will not show, I was thinking it may be a flag, however even if the image was missing the number should still uprear!

regards,
Maxx

Title: Re: Gamerz personal message notification
Post by: Maxx1 on May 06, 2012, 01:30:24 PM
OK guys found it it's ion the CSS i'll have it in a few!!!!

regards,
Maxx
Title: Re: Gamerz personal message notification
Post by: Maxx1 on May 06, 2012, 01:43:31 PM
Ok in your Gamerz index.css file find this code:

em.pm_tip, em.pm_tip_down {
    background: url("../images/theme/pm_tip.png") no-repeat scroll 0 0 transparent;
    color: #222222;
    display: block;
    font-family: trebuchet,sans-serif;
    font-size: 0.8em;
    font-style: normal;
    font-weight: bold;
    height: 29px;
    line-height: 19px;
    margin: -58px 0 0 25px;
    position: absolute;
    text-align: center;
    width: 29px;
}



change the margin -58 to -30 or so and should be good to go!

em.pm_tip, em.pm_tip_down {
    background: url("../images/theme/pm_tip.png") no-repeat scroll 0 0 transparent;
    color: #222222;
    display: block;
    font-family: trebuchet,sans-serif;
    font-size: 0.8em;
    font-style: normal;
    font-weight: bold;
    height: 29px;
    line-height: 19px;
    margin: -30px 0 0 25px;
    position: absolute;
    text-align: center;
    width: 29px;
}


checked 24" and 19" monitors, but you can adjust to your liking I guess, you will see the flag or rectangular bobble!

regards,
maxx
Title: Re: Gamerz personal message notification
Post by: Lesmond on May 06, 2012, 04:20:19 PM
Perfect Maxx, nice work in finding that O0

I set mine to
margin: -35px 0 0 56px;

Which gave me this result..
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fi48.tinypic.com%2Fmmwp08.jpg&hash=51cdac785b62646347acd4e455ba16c6d2db4f33)
Title: Re: Gamerz personal message notification
Post by: Maxx1 on May 06, 2012, 04:26:57 PM
OK looks good!

regards,
Maxx