TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

March 29, 2024, 05:20:38 AM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,105
  • Total Topics: 21,213
  • Online today: 310
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 266
  • Total: 266

Gamerz personal message notification

Started by Lesmond, May 05, 2012, 07:24:48 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Lesmond

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:


Maxx1

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
But Mama, That's Where all the fun is!

lurkalot

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.

Maxx1

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
But Mama, That's Where all the fun is!

Lesmond

I did have a quick look, but I just didnt know what I was looking for, or even where to look lol

Maxx1

Cool Thanks I'll get back to you on this!
Should be in the index.template.php ..

regards,
Maxx
But Mama, That's Where all the fun is!

Maxx1

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
But Mama, That's Where all the fun is!

Maxx1

But Mama, That's Where all the fun is!

Maxx1

Ok the above code seems to be good so on we go>Not the problem!

regards,
Maxx
But Mama, That's Where all the fun is!

Maxx1

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
But Mama, That's Where all the fun is!

IchBin

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

Lesmond

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

Maxx1

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

But Mama, That's Where all the fun is!

Maxx1

OK guys found it it's ion the CSS i'll have it in a few!!!!

regards,
Maxx
But Mama, That's Where all the fun is!

Maxx1

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
But Mama, That's Where all the fun is!

Lesmond

Perfect Maxx, nice work in finding that O0

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

Which gave me this result..

Maxx1

But Mama, That's Where all the fun is!