Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-27-2005, 08:03 PM
BLykMik BLykMik is offline
 
Join Date: Jun 2005
Location: Los Angeles, CA
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Extremely simplified PM alert mod.

I've seen a few different mods for making the PM give some sort of visual alert to the user, but I was hoping to add something much simpler and less intrusive.

What I'd like to be able to do is add 1 small .gif to the left of the word "Private Message" whenever there is an unread message. And clicking on that .gif should simply link you to the private message center the same way clicking on "Private Messages" does.

...that's it. :squareeyed: No blinking, or listing of who the messages are from, or direct linking to profiles or messages. I'm just looking for something that gives the user a slightly less subtle alert than the bold private message text.

I was going to try to modify a mod, but honestly I am not very good at coding.

Does anyone know how to do this?

Thanks!
Reply With Quote
  #2  
Old 06-28-2005, 02:53 AM
edbri871 edbri871 is offline
 
Join Date: Apr 2005
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Open the NAVBAR template and find this code:

Code:
<a href="private.php?$session[sessionurl]">$vbphrase[private_messages]</a>
And right before it add this code:
Code:
<if condition="$bbuserinfo['pmunread']"><img src="image1" alt="Unread PMs" /><else /><img src="image2" alt="No Unread PMs" /></if>
Replace "image1" with the url to the image for if they have a pm, and image 2 to the url if they don't have a PM.

edit: btw if you want it to just have an image for unread PMs and not for if there's none then use this:

Code:
<if condition="$bbuserinfo['pmunread']"><img src="image1" alt="Unread PMs" /></if>
Reply With Quote
  #3  
Old 06-28-2005, 04:35 AM
BLykMik BLykMik is offline
 
Join Date: Jun 2005
Location: Los Angeles, CA
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmmmm... I must be doing something wrong...

I've entered the following directly before the code you pasted above:
Code:
<tr><td class="thead">$vbphrase[miscellaneous]</td></tr>
		<if condition="$show['pmstats']"><tr><td class="vbmenu_option"><if condition="$bbuserinfo['pmunread']"><img src="images/statusicon/pm_new.gif" alt="Unread PMs" /></if><a href="private.php?$session[sessionurl]">$vbphrase[private_messages]</a></td></tr></if>
Did I get something wrong? No icon on any template when there is an unread message.
Reply With Quote
  #4  
Old 06-28-2005, 06:02 AM
tomshawk's Avatar
tomshawk tomshawk is offline
 
Join Date: Jul 2003
Location: California
Posts: 392
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is what I use

find

Code:
			<if condition="$show['pmstats']"><br /><phrase 1="$vbphrase[unread_x_nav_compiled]" 2="$vbphrase[total_x_nav_compiled]" 3="$session[sessionurl]">$vbphrase[private_messages_nav]</phrase></if>
then place this after it

Code:
<if condition="$bbuserinfo[pmunread] == 0"> 
<img src="http://www.yourwebsite.com/forums/images/misc/pmoff.gif"> 
<else /> 
<img src="http://www.yourwebsite.com/forums/images/misc/pmon.gif"> 
</if>
Then just upload your images to the misc folder.
pmoff
pmon
the pmon is animated, so it gets your attention.
Reply With Quote
  #5  
Old 06-28-2005, 10:49 AM
mkdevo mkdevo is offline
 
Join Date: May 2004
Location: CT, USA
Posts: 269
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tomshawk
This is what I use

(snip)
nicely done! thanks!
Reply With Quote
  #6  
Old 06-28-2005, 03:12 PM
BLykMik BLykMik is offline
 
Join Date: Jun 2005
Location: Los Angeles, CA
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That works great Tomshawk... Thanks you very much!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:24 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04556 seconds
  • Memory Usage 2,230KB
  • Queries Executed 14 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (6)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete