| | |
use images instead of the standard text link showing the private message info
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Jan 2009
Posts: 1
Reputation:
Solved Threads: 0
I do not know the proper way to reword this to work in my version3.0.4. Any help would be much appreciated.
This is what I have there now, 3.0.4, subsilver2:
S_USER_LOGGED_IN -->
<!-- IF S_DISPLAY_PM --> <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 -->
------------------------------------------------------------------------------------
This is the only info I found, and was told it would not work with the 3.0.4 version. I believe the one below is for version 2.0.
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:
#------[ 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:
#
#------[ 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'];
}
This is what I have there now, 3.0.4, subsilver2:
S_USER_LOGGED_IN -->
<!-- IF S_DISPLAY_PM --> <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 -->
------------------------------------------------------------------------------------
This is the only info I found, and was told it would not work with the 3.0.4 version. I believe the one below is for version 2.0.
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:
#------[ 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:
#
#------[ 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'];
}
![]() |
Similar Threads
- Help with automatic update problem and more (Viruses, Spyware and other Nasties)
Other Threads in the PHP Forum
- Previous Thread: How can one upload multiple files with php?
- Next Thread: result of 1 query parametre to other..
| Thread Tools | Search this Thread |
5.2.10 action apache api array basic beginner binary broken cakephp checkbox class classes cms code computing confirm cron curl database date delete destroy display domain dynamic echo echo$_get[x]changingitintovariable... email error fatalerror file files folder form forms function functions google header href htaccess html iframe image include indentedsubcategory insert ip javascript joomla limit link load local login mail malfunction menu mlm mod_rewrite multiple mysql mysqlquery neutrality oop paypal pdf php query radio random record reference remote return script search server sessions sockets source space sql syntax system table thesishelp tutorial unset update upload url validation validator variable video web window.onbeforeunload=closeme; youtube





