Flashing when unread messages remain

This MOD show a flashing GIF Image if new PM has arrive.

Moderator: Moderators

Forum rules
The content in this forum is dated Dec. 21 2005 and can be used as Archive only. This Forum is LOCKED and READ ONLY !

Flashing when unread messages remain

Postby warmweer on Fri 13. Feb, 2004 00:12

I just posted this on phpbb but since the foundation of my adaptation come from here, it's only fair I post it here also. (I might help some in using it with other templates)
What I did was use the Flashing GIF mod and adapt it so that it's compatible with different styles and languages, plus (and this might interest some) as long as there are unread PMs the image for the PMs flashes (can't miss it anymore).OK, it still says there are zero unread messages but I couldn't be bothered with that.

In includes/page_header.php
FIND
Code: Select all
//
// Obtain number of new private messages
// if user is logged in
//


AFTER ADD
Code: Select all
$pm_name = "pm";


FIND
Code: Select all
      {
         $s_privmsg_new = 0;
         $icon_pm = $images['pm_new_msg'];
      }

AFTER ADD
Code: Select all
      $pm_name="pm_new";


FIND
Code: Select all
   {
      $l_message_unread = ( $userdata['user_unread_privmsg'] == 1 ) ? $lang['Unread_pm'] : $lang['Unread_pms'];
      $l_privmsgs_text_unread = sprintf($l_message_unread, $userdata['user_unread_privmsg']);

AFTER ADD
Code: Select all
      $pm_name="pm_new";
      $icon_pm = $images['pm_new_msg'];


FIND
Code: Select all
   'PRIVMSG_IMG' => $icon_pm,

AFTER ADD
Code: Select all
   'PM_NAME' => $pm_name,


In templates\{template}\overall_header.tpl
FIND
Code: Select all
<img src="templates/subSilver/images/icon_mini_profile.gif" width="12" height="13" border="0" alt="{L_PROFILE}" hspace="3" />

REPLACE BY
Code: Select all
<img src="{PRIVMSG_IMG}" width="12" height="13" border="0" alt="{PRIVATE_MESSAGE_INFO}" hspace="3" />


For other templates the images have a different name and extra functions (js) have to be taken into account e.g. Aeolus where the extra variable comes into play and
Code: Select all
            ShowImage("{PRIVATE_MESSAGE_INFO}", "{U_PRIVATEMSGS}", "pm");

becomes
Code: Select all
            ShowImage("{PRIVATE_MESSAGE_INFO}", "{U_PRIVATEMSGS}", "{PM_NAME}");


In templates\{template}\{template}.cfg
ADD
Code: Select all
$images['pm_new_msg'] = "$current_template_images/icon_mini_message.gif";
$images['pm_no_new_msg'] = "$current_template_images/icon_mini_no_message.gif";

(notice that icon_mini_message.gif is the flashing one) - for templates where the image contains text you'ld have to add the {Lang} variable in the path like this $images['pm_new_msg'] = "$current_template_images/{LANG}/btn_pm_new.gif";
A bug is a feature which didn't make it to the manual
warmweer
Poster
Poster
 
Posts: 25
Joined: Mon 10. Feb, 2003 21:55
Location: Belgium

Postby darakhshan on Wed 17. Nov, 2004 06:37

THANKS

I needed this

:lol:
darakhshan
Poster
Poster
 
Posts: 46
Joined: Sat 15. May, 2004 12:19

Postby darakhshan on Wed 17. Nov, 2004 11:32

NO NO

I got into a problem. I have a Mod which sends an automatic PM upon registration of a user welcoming him and giving him instruction for using our site
Now the problem is that after installing this the gif image continues flashing for new users and even after all pms are deleted.
that means the users will have the flashing gif for all his life
:roll:
I need you mod please give me a solution
:cry: :cry:
darakhshan
Poster
Poster
 
Posts: 46
Joined: Sat 15. May, 2004 12:19

Postby warmweer on Wed 17. Nov, 2004 20:51

If you are using a different style check how your gifs (animated and not animated) are called.
Also check your database to see whether the value of user_unread_privmsg decreases when a new PM is read (if it doesn't then something's wrong in your modifications - did you modify privmsg.php?).
Good luck
A bug is a feature which didn't make it to the manual
warmweer
Poster
Poster
 
Posts: 25
Joined: Mon 10. Feb, 2003 21:55
Location: Belgium

Postby darakhshan on Fri 28. Jan, 2005 21:24

warmweer wrote:If you are using a different style check how your gifs (animated and not animated) are called.
Also check your database to see whether the value of user_unread_privmsg decreases when a new PM is read (if it doesn't then something's wrong in your modifications - did you modify privmsg.php?).
Good luck


I have 2 mods, one the flashing gif and the other flash sound for new pm
I need your mod very much but do not know why this happens
darakhshan
Poster
Poster
 
Posts: 46
Joined: Sat 15. May, 2004 12:19

Postby Aaliyah on Thu 03. Feb, 2005 04:39

i'm still having problems with the flashing pm while there's not new msgs .. please help?
Aaliyah
Poster
Poster
 
Posts: 2
Joined: Thu 03. Feb, 2005 04:06

Postby Aaliyah on Fri 04. Feb, 2005 01:04

ok i did what it said and i use Subsilver ..
and now NOTHING is working with me! ... so please help!!!
Aaliyah
Poster
Poster
 
Posts: 2
Joined: Thu 03. Feb, 2005 04:06


Return to Flashing GIF for new PM [2.0.15/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron