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
  #62  
Old 03-05-2005, 01:24 PM
org's Avatar
org org is offline
 
Join Date: Jan 2005
Location: Sweden
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

One of the main deficits eliminated. Good job!
Installed.
Reply With Quote
  #63  
Old 03-05-2005, 08:41 PM
T3MEDIA T3MEDIA is offline
 
Join Date: Dec 2004
Posts: 944
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kall
How about making the flashing gif be hotlinked as well?
I was thinking that too.
Reply With Quote
  #64  
Old 03-09-2005, 11:01 AM
lefthome's Avatar
lefthome lefthome is offline
 
Join Date: Feb 2005
Posts: 149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I want to install, but I am upgrading to vb-bulletin 3.07 this weekend. Does this hack, vice nice program, work in version 3.07?
Reply With Quote
  #65  
Old 03-20-2005, 05:10 PM
Shackbase Shackbase is offline
 
Join Date: Feb 2005
Location: Rockford, IL
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

www.talkshack.com - i did all it asked for.. and nothing.. what did I do wrong.. ?

Thanks,

--Tone
Reply With Quote
  #66  
Old 03-20-2005, 07:19 PM
Nordinho Nordinho is offline
 
Join Date: Aug 2004
Location: Netherlands
Posts: 288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Shackbase
www.talkshack.com - i did all it asked for.. and nothing.. what did I do wrong.. ?

Thanks,

--Tone
Has anyone got this working on the cmps index page??
Reply With Quote
  #67  
Old 03-20-2005, 07:59 PM
bobjackson bobjackson is offline
 
Join Date: Nov 2002
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Nordinho
Has anyone got this working on the cmps index page??
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.
Reply With Quote
  #68  
Old 03-20-2005, 09:23 PM
biggkay biggkay is offline
 
Join Date: Sep 2003
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works nice in my forums, but it would be even better if it would work in vBadvanced CMPS.
Reply With Quote
  #69  
Old 03-20-2005, 10:23 PM
Shackbase Shackbase is offline
 
Join Date: Feb 2005
Location: Rockford, IL
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

im a vb noobie - whats the cmps?

--Tone
Reply With Quote
  #70  
Old 03-21-2005, 03:33 AM
biggkay biggkay is offline
 
Join Date: Sep 2003
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<a href="https://vborg.vbsupport.ru/showthread.php?threadid=65797" target="_blank">https://vborg.vbsupport.ru/showt...threadid=65797</a>
Reply With Quote
  #71  
Old 03-21-2005, 03:35 AM
Shackbase Shackbase is offline
 
Join Date: Feb 2005
Location: Rockford, IL
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you BiggKay... much appreciated... Looks like a HUGE mod.

Would that nullify my style that I currently use or would it 'merge' into it?

www.talkshack.com

--Tone
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 12:57 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.05386 seconds
  • Memory Usage 2,307KB
  • 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
  • (3)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
  • (4)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