vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=155)
-   -   Add flashing envelope PM notification (https://vborg.vbsupport.ru/showthread.php?t=103202)

RyanDe680 01-19-2007 02:21 AM

Here you go:

Code:

<script type="text/javascript">
<!--
function log_out()
{
        ht = document.getElementsByTagName("html");
        ht[0].style.filter = "progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)";
        if (confirm('$vbphrase[sure_you_want_to_log_out]'))
        {
                return true;
        }
        else
        {
                ht[0].style.filter = "";
                return false;
        }
}
//-->
</script>

<br />

<!-- breadcrumb, login, pm info -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
        <td class="alt1" width="100%">
                <if condition="is_array($navbits)">
                        <table cellpadding="0" cellspacing="0" border="0">
                        <tr valign="bottom">
                                <td><a href="#" onclick="history.back(1); return false;"><img src="$stylevar[imgdir_misc]/navbits_start.gif" alt="$vbphrase[go_back]" border="0" /></a></td>
                                <td>&nbsp;</td>
                                <td width="100%"><span class="navbar"><a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1">$vboptions[bbtitle]</a></span> $navbits[breadcrumb]</td>
                        </tr>
                        <tr>
                                <td class="navbar" style="font-size:10pt; padding-top:1px" colspan="3"><if condition="$_SERVER['REQUEST_METHOD'] == 'POST'"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_finallink.gif" alt="" border="0" /><else /><a href="$scriptpath"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_finallink.gif" alt="$vbphrase[reload_this_page]" border="0" /></a></if> <strong>$navbits[lastelement]</strong></td>
                        </tr>
                        </table>                       
                <else />
                        <div class="navbar" style="font-size:10pt"><a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_start.gif" alt="" border="0" /></a> <strong>$vboptions[bbtitle]</strong></div>
                </if>
        </td>       
       
        <if condition="$show['member']">
       
                <td class="alt2" valign="top" nowrap="nowrap">
                <div class="smallfont">
                        <strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong>

<!-- / Flashing envelope modification starts here -->

<if condition="$bbuserinfo['pmunread']">
        <a href="http://www.lexfstyle.com/forum/private.php?"><img border="0" src="http://www.lexfstyle.com/forum/images/pm/newpm.gif" width="22"

height="10"></a>
        </if>

<!-- / Flashing envelope modification ends here -->
<br />

                        <phrase 1="$pmbox[lastvisitdate]" 2="$pmbox[lastvisittime]">$vbphrase[last_visited_x_at_y]</phrase>
                        <if condition="$show['pmstats']"><br /><phrase 1="$vbphrase[unread_x_nav_compiled]" 2="$vbphrase[total_x_nav_compiled]" 3="$session[sessionurl_q]">$vbphrase[private_messages_nav]</phrase></if>
                        <if condition="$show['pmwarning']"><br /><strong><phrase 1="$vbphrase[pmpercent_nav_compiled]">$vbphrase[your_pm_box_is_x_full]</phrase></strong></if>
                </div>
                </td>
               
        <else />


burntire 01-19-2007 02:25 AM

Looks right.

burntire 01-19-2007 02:32 AM

paste this


Code:

                       
<!-- / Flashing envelope modification starts here -->

<if condition="$bbuserinfo['pmunread']">
        <a href="http://www.lexfstyle.com/forum/private.php?"><img border="0" src="http://www.lexfstyle.com/forum/images/pm/newpm.gif" width="22" height="10"></a>
        </if>

<!-- / Flashing envelope modification ends here -->


RyanDe680 01-19-2007 02:40 AM

That worked, thanks again!

I have to PM you a question as well.

Thanks.

Snake 01-21-2007 12:22 PM

Thank you. Works fine on 3.6. :)

aceofspades 01-24-2007 07:51 PM

This may be a strange question, but could you tell me what code i should use if i want to have a different image there instead of the flashing envelope when i dont have any new pm's.

I.e

Quote:

<if condition="$bbuserinfo['pmread']">
<a href="http://www.yoursite.com/board/private.php?"><img border="0" src="http://www.yoursite.com/images/oldpm.gif" width="22" height="10"></a>
</if>

seb1981 01-25-2007 12:20 PM

Work fine with vBulletin version 3.6.4 thanks ;-)
Sorry for my english i'm french :p

modtang 02-01-2007 10:17 AM

Quote:

Originally Posted by aceofspades (Post 1166618)
This may be a strange question, but could you tell me what code i should use if i want to have a different image there instead of the flashing envelope when i dont have any new pm's.

I just did something similar for a board I help admin.

Find:
Code:

<strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong><br />
Replace with:
Code:

<strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong>&nbsp;&nbsp;<if condition="$bbuserinfo['pmunread']">
        <a href="private.php"><img border="0" src="images/pn_inboxnew.gif" width="16" height="11"></a>
        <else />
        <a href="private.php"><img border="0" src="images/pn_inbox.gif" width="16" height="11"></a>
</if><br />

I've attached the images I'm using too, as well as a screenshot. :)

Bree 03-12-2007 08:05 AM

CMPS v2.2.1 and vBulletin 3.6.5 - I used this on the welcome block on portal (Which is what my forum uses) Took me a minute to figure out where to put the code (since it's different from the forum's welcome block) but I got it and it works perfectly... If that doesn't get their attention (or mine *blush*) I don't know what will =0) Thanks a Bunch! Always -Bree

DieselMinded 05-07-2007 05:43 PM

Works Fine Most of the issues are with the Blinking image and cookies ... If yours is not showing up try changing the name of the image and editing the script to point to it

DM


All times are GMT. The time now is 08:24 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01186 seconds
  • Memory Usage 1,755KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete