PDA

View Full Version : Different icon when a user has a new PM


cadena
26 Nov 07, 20:04
Hi, friends.

Is it possible that when a user has a new PM message, it displays a different icon? (Eg, an animated icon to bring attention of the user).

I have seen this tutorial

http://www.easytutorials.org/phpbb3_tpl_privmsg.html

but I want that when the user has a new PM, then he can see an animated icon.


I tried to modify \styles\subsilver2 \overall_header.html this way:

<!-- IF S_DISPLAY_PM -->
<!-- IF S_NEW_PM -->
&nbsp;<a href="{U_PRIVATEMSGS}"><img src="{T_IMAGESET_PATH}/topic_unread_hot.gif" width="12" height="13" alt="*" /> {PRIVATE_MESSAGE_INFO}<!-- IF PRIVATE_MESSAGE_INFO_UNREAD -->, {PRIVATE_MESSAGE_INFO_UNREAD}<!-- ENDIF --></a>
<!-- ELSE -->
&nbsp;<a href="{U_PRIVATEMSGS}"><img src="{T_THEME_PATH}/images/icon_mini_message.gif" width="12" height="13" alt="*" /> {PRIVATE_MESSAGE_INFO}<!-- IF PRIVATE_MESSAGE_INFO_UNREAD -->, {PRIVATE_MESSAGE_INFO_UNREAD}<!-- ENDIF --></a>
<!-- ENDIF -->

<!-- ENDIF -->


The topic_unread_hot.gif icon is an animated icon. But I have not luck, my knowledge is limited. Perhaps someone can guide me in the right direction.

Thanks.
--
Carlos

CyberAlien
27 Nov 07, 11:14
That code should work fine. All you have to do is create image for it.

cadena
28 Nov 07, 12:38
CyberAlien, thanks for your reply.

Well, no, it does not work. I think it is well written, but not working. As I said, I am no expert and I am not able to see where is the mistake. Maybe if you have a little time can check it (and fix it).

Thanks.

--
cadena

CyberAlien
29 Nov 07, 11:11
You are probably confusing new messages with unread messages. New pm flag is used only once when you load forum page for the first time after receiving new pm.

cadena
30 Nov 07, 12:54
Well, I have finally been able to solve the problem this way:

<div id="menubar">
<table width="100%" cellspacing="0">
<tr>
<td class="genmed">
<!-- IF not S_IS_BOT --><a href="{U_LOGIN_LOGOUT}"><img src="{T_THEME_PATH}/images/icon_mini_login.gif" width="12" height="13" alt="*" /> {L_LOGIN_LOGOUT}</a>&nbsp;<!-- ENDIF -->
<!-- IF U_RESTORE_PERMISSIONS --> &nbsp;<a href="{U_RESTORE_PERMISSIONS}"><img src="{T_THEME_PATH}/images/icon_mini_login.gif" width="12" height="13" alt="*" /> {L_RESTORE_PERMISSIONS}</a><!-- ENDIF -->
<!-- IF S_BOARD_DISABLED and S_USER_LOGGED_IN --> &nbsp;<span style="color: red;">{L_BOARD_DISABLED}</span><!-- ENDIF -->
<!-- IF not S_IS_BOT -->
<!-- IF S_USER_LOGGED_IN -->

<!-- IF S_DISPLAY_PM -->

<!-- IF S_USER_NEW_PRIVMSG > 0 or S_USER_UNREAD_PRIVMSG > 0-->

&nbsp;<a href="{U_PRIVATEMSGS}"><img src="{T_IMAGESET_PATH}/topic_unread_hot.gif" width="19" height="18" alt="*" /> {PRIVATE_MESSAGE_INFO}
<!-- ELSE -->
&nbsp;<a href="{U_PRIVATEMSGS}"><img src="{T_THEME_PATH}/images/icon_mini_message.gif" width="12" height="13" alt="*" /> {PRIVATE_MESSAGE_INFO}
<!-- ENDIF -->


<!-- IF PRIVATE_MESSAGE_INFO_UNREAD -->, {PRIVATE_MESSAGE_INFO_UNREAD}
<!-- ENDIF --></a>

<!-- ENDIF -->




<!-- ELSE --> &nbsp;<a href="{U_REGISTER}"><img src="{T_THEME_PATH}/images/icon_mini_message.gif" width="12" height="13" alt="*" /> {L_REGISTER}</a>
<!-- ENDIF -->
<!-- ENDIF -->
</td>


Note that topic_unread_hot.gif is an animated icon and, thus, will be more visible to the user

Thanks !!

--
cadena