phpBB2Refugees.com Logo
Not affiliated with or endorsed by the phpBB Group

Register •  Login 

Continue the legacy...

Welcome to all phpBB2 Refugees!Wave Smilie

This site is intended to continue support for the legacy 2.x line of the phpBB2 bulletin board package. If you are a fan of phpBB2, please, by all means register, post, and help us out by offering your suggestions. We are primarily a community and support network. Our secondary goal is to provide a phpBB2 MOD Author and Styles area.

Private_message_info as an image replacing the text link.


 
Search this topic... | Search Knowledge Base (KB)... | Search Box
Register or Login to Post    Index » Knowledge Base (KB)  Previous TopicPrint TopicNext Topic
Author Message
dogs and things
Board Member



Joined: 18 Nov 2008

Posts: 621
Location: Spain


flag
PostPosted: Thu Dec 11, 2008 3:32 pm 
Post subject: Private_message_info as an image replacing the text link.

A built-in feature waiting to be activated.

If you want to use images instead of the standard text link showing the private message info in your forum header you will have to create two gif images. Name them pm_no_new_msg.gif and pm_new_msg.gif. Upload those to ./templates/your_template_name/images.

Next you will have to make the following edits:
Code:
#------[ OPEN ]----------------------------
#
./templates/your_template_name/overall_header.tpl
#
#------[ FIND ]----------------------------
#
<a href="{U_PRIVATEMSGS}" class="mainmenu"><img src="templates/your_template_name/images/icon_mini_message.gif" width="12" height="13" border="0" alt="{PRIVATE_MESSAGE_INFO}" hspace="3" />{PRIVATE_MESSAGE_INFO}</a>
#
#------[ REPLACE WITH ]--------------------
#
<a href="{U_PRIVATEMSGS}" class="mainmenu"><img src="{PRIVMSG_IMG}" alt="{PRIVATE_MESSAGE_INFO}" hspace="3" />{PRIVATE_MESSAGE_INFO}</a>
#
#------[ OPEN ]----------------------------
#
./templates/your_template_name/your_template_name.cfg
#
#------[ FIND ]----------------------------
#
$images['pm_new_msg'] = "";
$images['pm_no_new_msg'] = "";
#
#------[ REPLACE WITH ]--------------------
#
$images['pm_new_msg'] = "$current_template_images/pm_new_msg.gif";
$images['pm_no_new_msg'] = "$current_template_images/pm_no_new_msg.gif";


If you want the new_pm.gif to show until all new PMs have been read instead of until the user enters his Inbox you have to make one additional edit:

Code:
#
#------[ OPEN ]----------------------------
#
includes/page_header.php
#
#------[ FIND ]----------------------------
#
  if ( $userdata['user_unread_privmsg'] )
   {
      $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']);
   }
#
#------[ REPLACE WITH ]----------------------------
#
   if ( $userdata['user_unread_privmsg'] )
   {
      $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']);
      $icon_pm = $images['pm_new_msg'];
   }
Back to top
Sylver Cheetah 53
Board Member



Joined: 17 Dec 2008

Posts: 426
Location: Milky Way


flag
PostPosted: Wed Dec 17, 2008 8:31 pm 
Post subject: Re: Private_message_info as an image replacing the text link

I do not understand. The "no new messages" will go away and we'll have an image, or the image will appear, but the text will remain also? icon_confused.gif
Back to top
dogs and things
Board Member



Joined: 18 Nov 2008

Posts: 621
Location: Spain


flag
PostPosted: Wed Dec 17, 2008 9:50 pm 
Post subject: Re: Private_message_info as an image replacing the text link

An image will replace the text link.
Back to top
Display posts from previous:   
Register or Login to Post    Index » Knowledge Base (KB)  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT
 
Jump to:  

Index • About • FAQ • Rules • Privacy • Search •  Register •  Login 
Not affiliated with or endorsed by the phpBB Group
Powered by phpBB2 © phpBB Group
Generated in 0.0289 seconds using 15 queries. (SQL 0.0024 Parse 0.0009 Other 0.0257)
phpBB Customizations by the phpBBDoctor.com
Template Design by DeLFlo and MomentsOfLight.com Moments of Light Logo