Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Blink PM icon with userinfo Details »»
Blink PM icon with userinfo
Version: 1.00, by Sebastian Sebastian is offline
Developer Last Online: Aug 2009 Show Printable Version Email this Page

Version: 3.0.6 Rating:
Released: 02-01-2005 Last Update: 02-03-2005 Installs: 90
 
No support by the author.

Blink PM icon with userinfo

---------------------
Installation

- easy
- queries 0/1 (details below)
- file edits 1
- template edits 1

Reason for this hack:
I find the PM system lacked some additional information on the navbar the 0 X Unread, Total X isn't enough, as i wanted to know who sent the PM and how many they sent.

How it works:
When you get a PM the "Private Messages: x Unread, Total x." disappears and is replaced with a little blinking icon, if the user that sent the PM is a mod the icon will blink a teal color, if its a normal user, it will blink yellow. along with this you can view who sent the message, and if multiple people sent you PMs it will show their names.. If they sent you more than one, it will tell you that too. It will also take you directly to the PM without having to go to your inbox first.. After you've read all your PMs (or you dont have any) the "Private Messages: x Unread, Total x." returns to normal.

Queries: i know a lot of people are worried when it comes to adding hacks (especially me) because of additional queries.. this hack is sort of different. It only executes 1 query IF the user has unread PMs.. if they have no new PMs then 0 queries.

I've included two blinking gifs, you can use your own, put them in your images misc directory.

Read the txt file for installtion which takes 30 seconds.
I plan to expand this addons, but depends how many find it usefull, so click install plz.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #72  
Old 03-21-2005, 11:18 AM
intrigue intrigue is offline
 
Join Date: Nov 2002
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So simple
so effective
so good
thanks
.matt
Reply With Quote
  #73  
Old 03-21-2005, 02:45 PM
Nordinho Nordinho is offline
 
Join Date: Aug 2004
Location: Netherlands
Posts: 288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by bobjackson
ya, i'm using this with cmps.

i made a couple of changes and used a phrase. (changes in bold)

i've been running this for awhile now with no issues.

Code:
// blinking PM & details hack...
if ($bbuserinfo['pmunread'] > 0)
{
	$getmessages = $DB_site->query("
		SELECT pmtext.pmtextid, pmtext.fromusername, pmtext.fromuserid, pmtext.dateline, pm.pmid, user.userid, user.usergroupid, 
			COUNT(pmtext.fromuserid) AS fromusertotal FROM " . TABLE_PREFIX . "pmtext AS pmtext 
			LEFT JOIN " . TABLE_PREFIX . "pm AS pm USING(pmtextid) 
			LEFT JOIN " . TABLE_PREFIX . "user AS user ON (user.userid=pmtext.fromuserid) 
			WHERE pm.userid=$bbuserinfo[userid] AND messageread=0
			GROUP BY pmtext.fromusername ORDER BY user.usergroupid ASC
	");

	while ($privatemessage = $DB_site->fetch_array($getmessages))
	{
		$usertotal = $privatemessage['fromusertotal'];
		if ($usertotal  == 1)
		{
			$privatemessagebit .= ', <a href="/forums/private.php?'.$session['sessionurl'].'do=showpm&pmid=' . $privatemessage['pmid'] . '">' . $privatemessage['fromusername'] . '</a> - ' . vbdate($vboptions['dateformat'], $privatemessage['dateline'], true);
		}
		else
		{
			$privatemessagebit .= ', <a href="/forums/private.php?'.$session['sessionurl'].'do=showpm&pmid=' . $privatemessage['pmid'] . '">' . $privatemessage['fromusername'] . '</a>(' . $privatemessage['fromusertotal'] . ')';
		}

		$from_group = 'imsg.gif';
		if (in_array($privatemessage['usergroupid'], array(5,6,7)))
		{
			$from_group = 'imsg2.gif';
		} 
	}

	$privatemessagebits = substr($privatemessagebit , 1);

	$privatemessages = '<img style="vertical-align: middle;"  border="0" src="'.$stylevar['imgdir_misc'].'/' . $from_group . '" alt="You have a PM!" /> from ' . $privatemessagebits;
	$vbphrase['blinkpm'] = construct_phrase($privatemessages, $privatemessages);
}
and then the updated template change for the phrase:
Code:
<br />
<if condition="$bbuserinfo['pmunread']"><phrase>$vbphrase[blinkpm]</phrase><else />
<if condition="$show['pmstats']"><phrase 1="$vbphrase[unread_x_nav_compiled]" 2="$vbphrase[total_x_nav_compiled]" 3="$session[sessionurl]">$vbphrase[private_messages_nav]</phrase></if></if>
hope that helps.
thanks a lot for this fix Bob!!
Reply With Quote
  #74  
Old 04-03-2005, 06:21 AM
trulylowcarb's Avatar
trulylowcarb trulylowcarb is offline
 
Join Date: Apr 2004
Location: Colorado
Posts: 120
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
It will also take you directly to the PM without having to go to your inbox first..
it says in the description, but that isan't working for me, and must not be for the two people who commented that it would be nice to hot-link the gif .... Are we all missing something? How does it link to the message?
Reply With Quote
  #75  
Old 04-03-2005, 06:35 AM
trulylowcarb's Avatar
trulylowcarb trulylowcarb is offline
 
Join Date: Apr 2004
Location: Colorado
Posts: 120
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh DUH, it is linked to the sender's user name only, so I just ASSumed that was a link to their profile!

With that last fix for CMPS, and the addition of , click to view added just after $privatemessage['fromusername'] . ' this is working pefectly, and my users will be able to figure it out, too - THANKS!
Reply With Quote
  #76  
Old 05-01-2005, 01:07 AM
Kaishi Kaishi is offline
 
Join Date: Apr 2005
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i tried that fix for cmps, but it didn't work for some reason, it's still not showing up.

edit: nvm, i fixed it lol.
Reply With Quote
  #77  
Old 05-25-2005, 03:21 AM
:Judge:'s Avatar
:Judge: :Judge: is offline
 
Join Date: Jan 2003
Location: USA ~ MD
Posts: 230
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I know this is going to be asking a lot but here is my lousy two cents. I love this idea and when I first installed it I thought it was great, easy and very useful.

After you start getting a handful of PMs it gets messy, I did see and use the limit mod a couple of pages back and that was cool but whats the point of more listings when your already in your PM box after replying the first message. So how could the link be just set up some like (next to blink) "New PM" linked just to your well inbox. Total of PMs next to "New PM" would be super.

Linking the image to your in box is also a good idea, that would be nice too.

The image color depending on member or staff is a great idea, could this be kept while just linking to in box without senders name?

I know this is alot and if i could do it I would thought if I put the idea out there maybe one of you pro coders could bust it out within mins.
Reply With Quote
  #78  
Old 06-06-2005, 06:23 PM
mustang_lex mustang_lex is offline
 
Join Date: May 2005
Posts: 153
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wicked, worked without a hitch and its a very very cool tool to have.
Reply With Quote
  #79  
Old 06-06-2005, 06:40 PM
mustang_lex mustang_lex is offline
 
Join Date: May 2005
Posts: 153
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What I did Judge and may not apply to you , but I made the flashing email icon linkable to the members inbox (main PM center) with "alt" text saying "Go To The Inbox. This is so the member has the ability to either read the specific PM from the sender or enter his/her inbox.

This is what i edited.

Open /global.php

Find the all ready hacked code from the main hack

Quote:
$privatemessages = '<img style="vertical-align: baseline;" border="0" src="'.$stylevar['imgdir_misc'].'/' . $from_group . '" width="16" height="15" alt="" /> from ' . $privatemessagebits;
}
and replace with

Quote:
$privatemessages = '<a href="private.php?"><img alt="Go To Your Inbox" style="vertical-align: baseline;" border="0" src="'.$stylevar['imgdir_misc'].'/' .

$from_group . '" width="16" height="15" alt="" /></a> from ' . $privatemessagebits;
}
Simple yet effective. I hope this helps. :squareeyed:
Reply With Quote
  #80  
Old 08-09-2005, 10:38 PM
Drago912 Drago912 is offline
 
Join Date: Apr 2004
Location: Canada
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mustang_lex
What I did Judge and may not apply to you , but I made the flashing email icon linkable to the members inbox (main PM center) with "alt" text saying "Go To The Inbox. This is so the member has the ability to either read the specific PM from the sender or enter his/her inbox.

This is what i edited.

Open /global.php

Find the all ready hacked code from the main hack



and replace with



Simple yet effective. I hope this helps. :squareeyed:
Great hack, works nicely......question, can this be setup on a portal page? I noticed when Im on the portal page at top right where it says "private messages is blank with no icon or anything........when you go to the forum main page you see the flashing icon......once the pm is read and the icon is gone the portal page also goes back to normal?

Just wanna get this working from the cmps portal page............any ideas?
Reply With Quote
  #81  
Old 08-19-2005, 10:02 AM
csidlernet csidlernet is offline
 
Join Date: Apr 2003
Location: sydney
Posts: 183
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice man, thanks!
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 11:26 PM.


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.04735 seconds
  • Memory Usage 2,316KB
  • Queries Executed 25 (?)
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
  • (2)bbcode_code
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete