vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Blink PM icon with userinfo (https://vborg.vbsupport.ru/showthread.php?t=75619)

Wasim 02-13-2005 04:19 AM

nice

Protoman 02-14-2005 02:58 AM

I also have the vbAdvanced issue. I wrote code that changed the link to /forumURL/private.php when you are on the homepage but it still didn't work.. I'm pretty new to writing php.

Protoman 02-14-2005 03:53 AM

I wrote a quick fix that seems to work for me.. but I'm not responsible if it screws up your forum!!

It just repeats the default command and shows "Private Messages: x Unread, x Read"
in your navbar template find:
PHP Code:

<br />
<if 
condition="$bbuserinfo['pmunread']">$privatemessages<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> 

Replace With:
PHP Code:

<br />
<if 
condition="THIS_SCRIPT == 'adv_index' OR defined('VBA_SCRIPT')"><phrase 1="$vbphrase[unread_x_nav_compiled]2="$vbphrase[total_x_nav_compiled]3="$session[sessionurl]">$vbphrase[private_messages_nav]</phrase><else />
<if 
condition="$bbuserinfo['pmunread']">$privatemessages<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></if> 



waiting patiently for a real fix :ermm:

T3MEDIA 02-14-2005 09:21 PM

Quote:

Originally Posted by T3MEDIA
Problem. I have a few girls on a form and one girl had 30 PM's this spread across her screen. I assumed it would show like maybe 1 or 2 max.

Is there a way to show 1 to 3 users max and have the flashing note icon clickable to the normal private.php file?

I am going out to a club so I guess you guys can huck that up...
thanks.

anything to help me on this?

T3MEDIA 02-15-2005 12:39 AM

Quote:

Originally Posted by corollasbest
I wrote somethin up real quick.. I don't know if it works.. I need to get to my home pc and test it first.. just posting it here as my scratchpad :banana: I'll edit this if it works...
PHP Code:

");
            
            // Set the PM Counter to start at 0
            if (!isset(
$messageCount))
            {
                session_register("
messageCount");
                
$messageCount = 0;
            }


        while (
$privatemessage = $DB_site->fetch_array($getmessages) AND $messageCount < 3) 


was this for me?
If so I just replace what was asked in the hack I assume

Protoman 02-15-2005 01:00 AM

not for anybody, it's not done.

Sebastian 02-15-2005 01:34 AM

@ T3MEDIA

Replace

PHP Code:

ORDER BY user.usergroupid ASC 

with
PHP Code:

ORDER BY user.usergroupid ASC LIMIT 0,

that will limit the PMs shown to the first 3, after they see the first 3, the next 3 will be shown.

The hack will be updated with some enhancements soon.

Protoman 02-15-2005 02:04 AM

that's a bit easier than my version :D like I've said.. I've only been writing php for uhh 2 days.. i did get mine working btw

thx for the easy fix

Kihon Kata 02-16-2005 02:02 AM

Anyone take a look at the code?

Quote:

Originally Posted by TonysDesigns
Can I get someone to help me withmy code? I think mycode is modded already and this is why I'm not surewhere to put thishacked code. THanks in advance!

My PM area code:
Code:

<if condition="$bbuserinfo['userid']">
       
                <td class="alt2" valign="top" nowrap="nowrap">
                <div class="smallfont">
                        <!--$vbphrase[log_out]]-->               
                        <strong>$vbphrase[welcome_x]

                <phrase1="$pmbox[lastvisitdate]"2="$pmbox[lastvisittime]">$vbphrase[last_visited_x_at_y]
                        <if condition="$show['pmstats']">
$vbphrase[private_messages]: $vbphrase[unread_nav] $bbuserinfo[pmunread]$bbuserinfo[pmunread], $vbphrase[total] $bbuserinfo[pmtotal].



Sebastian 02-16-2005 10:26 PM

@ TonysDesigns, try this (untested).

find:

HTML Code:

<if condition="$show['pmstats']">
replace with:

HTML Code:

<if condition="$bbuserinfo['pmunread']">$privatemessages<else />
<if condition="$show['pmstats']">
$vbphrase[private_messages]: $vbphrase[unread_nav] $bbuserinfo[pmunread]$bbuserinfo[pmunread], $vbphrase[total] $bbuserinfo[pmtotal].</if>


T3MEDIA 02-16-2005 10:56 PM

Quote:

Originally Posted by Sebastian
@ T3MEDIA

Replace

PHP Code:

ORDER BY user.usergroupid ASC 

with
PHP Code:

ORDER BY user.usergroupid ASC LIMIT 0,

that will limit the PMs shown to the first 3, after they see the first 3, the next 3 will be shown.

The hack will be updated with some enhancements soon.

THANK YOU!!!!

mholtum 02-17-2005 06:52 AM

I am running the patched vb patched 3.0.5 with vbadvanced 1.0.1 CMPS. This mod works wonderfully in the forums but not on my portal. Any Ideas?

mholtum 02-17-2005 02:29 PM

*BUMP* Anyone? Please.

Protoman 02-18-2005 12:21 AM

back on page 3 I posted a fix to have atleast something there https://vborg.vbsupport.ru/showpost....4&postcount=43

Skaterscafe.com 02-20-2005 06:41 PM

Hummm, in NAVBAR I can't find:

Quote:

<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>

Protoman 02-21-2005 02:39 AM

not sure how to help ya .. look for a php comment <!-- that says something about PM info.

Reece D 03-01-2005 10:38 AM

*installed* thanks

Delphiprogrammi 03-01-2005 02:25 PM

hi,

installed in a minute first got a databasecrash but i learned to read the whole thread before i ask for help ;) the solution was posted on a previous page somewhere anyway thanks Sebastion by the way did you took that icon from icq ? ;)

[high]* Delphiprogrammi clicks install[/high]

Onkel_Tom 03-01-2005 10:06 PM

very easy installation and works great !
thank your for that mod.

kall 03-04-2005 06:11 PM

How about making the flashing gif be hotlinked as well?

org 03-05-2005 01:24 PM

One of the main deficits eliminated. Good job!
Installed.

T3MEDIA 03-05-2005 08:41 PM

Quote:

Originally Posted by kall
How about making the flashing gif be hotlinked as well?

I was thinking that too.

lefthome 03-09-2005 11:01 AM

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?

Shackbase 03-20-2005 05:10 PM

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

Thanks,

--Tone

Nordinho 03-20-2005 07:19 PM

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??

bobjackson 03-20-2005 07:59 PM

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.

biggkay 03-20-2005 09:23 PM

Works nice in my forums, but it would be even better if it would work in vBadvanced CMPS.

Shackbase 03-20-2005 10:23 PM

im a vb noobie - whats the cmps?

--Tone

biggkay 03-21-2005 03:33 AM

<a href="https://vborg.vbsupport.ru/showthread.php?threadid=65797" target="_blank">https://vborg.vbsupport.ru/showt...threadid=65797</a>

Shackbase 03-21-2005 03:35 AM

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

intrigue 03-21-2005 11:18 AM

So simple
so effective
so good
thanks
.matt

Nordinho 03-21-2005 02:45 PM

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!!

trulylowcarb 04-03-2005 06:21 AM

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?

trulylowcarb 04-03-2005 06:35 AM

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!

Kaishi 05-01-2005 01:07 AM

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.

:Judge: 05-25-2005 03:21 AM

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.

mustang_lex 06-06-2005 06:23 PM

Wicked, worked without a hitch and its a very very cool tool to have.

mustang_lex 06-06-2005 06:40 PM

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:

Drago912 08-09-2005 10:38 PM

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?

csidlernet 08-19-2005 10:02 AM

Nice man, thanks!


All times are GMT. The time now is 04:16 AM.

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.01445 seconds
  • Memory Usage 1,867KB
  • 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
  • (5)bbcode_code_printable
  • (2)bbcode_html_printable
  • (7)bbcode_php_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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