PDA

View Full Version : PM Gauge


Bald Bouncer
01-17-2002, 10:00 PM
Displays a gauge on how full your PM Inbox is....

Updates

Display on Forum Home or in PM section
Bar Colour changes with % Limits

Fixed

Black box in PM Template

Bald Bouncer
01-18-2002, 08:41 PM
screenshot

Shenlong
01-18-2002, 08:48 PM
ooo nice hack! i will install now that I saw the Screenshot

Shenlong
01-18-2002, 09:05 PM
spectacular hack! thanx so much! no problems here!

;)

1st one to install again

fonzerelli_79
01-18-2002, 09:36 PM
for some reason it isnt displaying properly for me

i made the changes to index.php and i added the code to the template

what could it be?
(top hack by the way) :p

fonzerelli_79
01-18-2002, 09:39 PM
forget what i said
im an idiot

its because i was logged in as an admin

if you log in as a plain old registered user, it works fine
:cry: :cry:

cheers

MarkB
01-18-2002, 10:14 PM
Nice :) I installed it without the image (just the % message) - tidy work!

MrLister
01-18-2002, 11:09 PM
great hack. i was going to make this one tomorow. (i've seen it on phpbb few hours ago and thought it was cool). ;) Great job!

Lionel
01-19-2002, 05:08 AM
:up:

How's that for service? :pleased:

I posted this (https://vborg.vbsupport.ru/showthread.php?s=&threadid=34236) and less than 3 hours later you got that hack up :up:

Lionel
01-19-2002, 07:02 AM
I think this is a great hack but a little intrusive. It takes a lot of space heightwise. Can you make it hide and have it appeared only when user reaches a certain level, then it will become permanent as to remind him to clean mailbox in order to get rid of that annoyance?

This way everyone needs not to see it?

Once again, thanks for that hack... :D

Bald Bouncer
01-19-2002, 08:26 AM
Originally posted by Lionel
I think this is a great hack but a little intrusive. It takes a lot of space heightwise. Can you make it hide and have it appeared only when user reaches a certain level, then it will become permanent as to remind him to clean mailbox in order to get rid of that annoyance?

This way everyone needs not to see it?

Once again, thanks for that hack... :D

you may as well use the popup on full inbox hack for this....it will do a better job at what you want

Lionel
01-19-2002, 08:39 AM
Originally posted by Bald Bouncer


you may as well use the popup on full inbox hack for this....it will do a better job at what you want

No way. Yours is what I have been looking for. Anyway, I changed the template a little to include the message into the Private Message <td>. I gain some space also by making the bar 4 pixels height. :D

sphinx
01-19-2002, 12:43 PM
very nice worked fine 4 me m8

StarBuG
01-19-2002, 02:40 PM
Nice one!

But it takes much space!
To questions/requests:

1) Bar color changes after a specified %
like: 0-50% = green
50-85% =yellow
85-100% = red

2) How can I move the disply into the PM Box?
I want it to display below the messages and above the buttons!
The insert into the template is not the prob but I can´t find the place to put the filecode in so that it displays the % ;-)

Any Ideas?

Greetings

StarBuG

Bald Bouncer
01-19-2002, 04:49 PM
hopefully this works aint tested it yet ;)

0-50% Green Bar
50-75% Yellow Bar
75-100% Red Bar

StarBuG
01-19-2002, 05:18 PM
Wow! That was fast! hehe

THX

But do you have an Idea how to manage point 2??
Until then I will not use the graphics cause it uses to much space in main forum (My board is large enough hehe)

But I like it! ;)

Greetings

StarBuG

Shenlong
01-19-2002, 05:51 PM
also it worked great for me, thanx!

Shenlong
01-19-2002, 05:52 PM
Originally posted by StarBuG
(My board is large enough hehe)


whats ur board URL bug?

StarBuG
01-19-2002, 06:00 PM
It´s not for public sorry ;-)

Greetings

StarBuG

DelusionalMind
01-19-2002, 06:11 PM
nice :)

thanks :)

Lionel
01-19-2002, 06:38 PM
I had the same problem... what I did was changing the template to place the message into the title bar and change the image size to 4, and reposition the gauge directly under the title bar. Still some space but reduce drastically. See attachment.

Lionel
01-19-2002, 06:45 PM
a copy of my pmloggedin template. It also contains the pm blink hack. If you want to use it, you might want to change the blink color.

Shenlong
01-19-2002, 06:46 PM
Originally posted by Lionel
I had the same problem... what I did was changing the template to place the message into the title bar and change the image size to 4, and reposition the gauge directly under the title bar. Still some space but reduce drastically. See attachment.

Great Idea Lionel! I just did that and it definetly saved space!

Lionel
01-19-2002, 07:36 PM
your second zip works for me. Could you please drop a code saying :
if if pm<10%
then do not show bar
else show bar?

this way people not using the pm do not have to see the unused bar....

StarBuG
01-20-2002, 01:03 PM
Thx!

But what about moving it into the pm overview (point 2 of my requests)??

Any ideas??

Greetings

StarBuG

Bald Bouncer
01-20-2002, 02:30 PM
Im not entirly sure were you want it too display....checkout this screenshot and if its what you want download the next attachment

Bald Bouncer
01-20-2002, 02:30 PM
attached

Lionel
01-20-2002, 02:48 PM
Originally posted by Bald Bouncer
attached

that is the best location yet!

StarBuG
01-20-2002, 03:25 PM
Hehe!!

That´s it!!

But I have a Problem:

I have set max pm´s to 100
I have 8 PM´s in Inbox
35 in Outbox
and 5 in Msg tracking

But your Status indicator says: Your Mailbox uses 8% of space

That is not correct I think! hehe

Any suggestions?

Greetings

StarBuG

Shenlong
01-20-2002, 03:32 PM
I think it only counts the messages in ur PM box, the hack works great for me. stop finding bugs in everything starbug! :mad:

lol

Shenlong
01-20-2002, 03:35 PM
great location! Just 1 problem, view link:

u'll see it, its where my mouse is, a big black block at the end of the pm inbox:

http://teleblaze.com/asp/MinorProblem.jpg

StarBuG
01-20-2002, 03:45 PM
I think the hack only counts pm?s in the inbox!

But it would be good to count pm?s in outbox and maybe in msg tracking too!

Cause they are also counted for the pm limit! ;)

@Shenlong: Set your colspan 1 higher ;)

Greetings

StarBuG

Arathorn
01-20-2002, 04:05 PM
Oops, Starbug said it all. :)

Bald Bouncer
01-20-2002, 05:18 PM
Im not sure...I thought it was just limited to your inbox, maybe someone can verify

Bald Bouncer
01-20-2002, 05:27 PM
Originally posted by Shenlong
great location! Just 1 problem, view link:

u'll see it, its where my mouse is, a big black block at the end of the pm inbox:

http://teleblaze.com/asp/MinorProblem.jpg

find the 2 places it says colspan="6" and change them too colspan="7"

FWC
01-20-2002, 06:00 PM
Originally posted by Bald Bouncer
Im not entirly sure were you want it too display....checkout this screenshot and if its what you want download the next attachment I installed this version. Very cool, BB! :)

Arathorn
01-20-2002, 07:12 PM
Originally posted by Bald Bouncer
Im not sure...I thought it was just limited to your inbox, maybe someone can verify

Yup, just tested. The quota includes messages in inbox, sent folder and all other folders you create. You can continue sending messages even when you've reached the quota, thus adding to the sent items and going above your quota.

Shenlong
01-20-2002, 07:36 PM
all fixed, thanks! works great

StarBuG
01-20-2002, 11:01 PM
I don´t get it!

Is the hack only calculation the inbox space??
Is there already a fix and i missed it?
And if not! Why do I have only 8% usage if i have 48 mails in my folders and set the limit to 100???

Greetings

StarBuG

Lionel
01-20-2002, 11:05 PM
Originally posted by StarBuG
I don?t get it!

Is the hack only calculation the inbox space??
Is there already a fix and i missed it?
And if not! Why do I have only 8% usage if i have 48 mails in my folders and set the limit to 100???

Greetings

StarBuG

Notice that the message says in your inbox ? And not in your total folders :o

StarBuG
01-21-2002, 10:00 AM
I noticed that! hehe

But that doesn´t solve the problem at all!
Cause the limit is for all Boxes you have and not only for inbox!!

Maybe someone can modify the hack???

Greetings

StarBuG

Bald Bouncer
01-21-2002, 03:43 PM
this will count all your folders, but I had a 35 limit and had 38 messages so Im not sure if this is correct...maybe admins arent limited, i havent had a chance to check


//PM GAUGE HACK BY GOBLIN
$inboxpms=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] $ignoreusers");
if ($inboxpms < 1) {
$pmpercent = "1"; // stop divisions by zero
} else {
$pmpercent = round(($inboxpms[messages] / $pmquota) * 100,2);
}
if ($pmpercent>50) {
$barimg="{imagesfolder}/yellow.gif";
} elseif ($pmpercent>75) {
$barimg="{imagesfolder}/red.gif";
} else {
$barimg="{imagesfolder}/green.gif";
}
//PM GAUGE HACK BY GOBLIN

Arathorn
01-21-2002, 04:07 PM
Admins aren't limited. Also, even a normal member can go over by sending messages. e.g., if total messages in all folders = limit, the user cannot receive, but can still send messages. when he sends it, a copy is kept in sent items, adding to the total.

Anyways, off to try the code. Thanks! :)

StarBuG
01-21-2002, 04:32 PM
That´s it!!

Looks much nicer now! hehe

Thx for your support!

Greetings

StarBuG

Arathorn
01-21-2002, 04:33 PM
Using a normal user account, all works well.

But when using my admin account, the indicator works on the index page but fails to work in the PM page. There, the percentage is always 30% more than the actual percentage. Even after clearing all folders, it still shows that I've used 30% of my inbox.

Bald Bouncer
01-21-2002, 04:38 PM
Originally posted by Arathorn
Using a normal user account, all works well.

But when using my admin account, the indicator works on the index page but fails to work in the PM page. There, the percentage is always 30% more than the actual percentage. Even after clearing all folders, it still shows that I've used 30% of my inbox.

yeah thats what Ive noticed, I havent had the chance to look into it, but I think copies are saved in a sent items folder and it reads from that :rolleyes:

Arathorn
01-21-2002, 06:00 PM
Can't be, cause I cleaned out the sent items. Plus, the extra 30% only occurs with my admin account AND in the PM screen. Kinda odd... I'll go try it on another server tomorrow.

Lionel
01-21-2002, 06:11 PM
Originally posted by Arathorn
Admins aren't limited. Also, even a normal member can go over by sending messages. e.g., if total messages in all folders = limit, the user cannot receive, but can still send messages. when he sends it, a copy is kept in sent items, adding to the total.

Anyways, off to try the code. Thanks! :)

then that must be why it is inbox.

if he can send and that will add to the folders, that will defeate the purpose of this hack by adding all folders to it. the count will always be off

Lionel
01-21-2002, 06:14 PM
is to add a line, once 100% is reached, then user is warned that he can send but cannot receive until he cleans mailbox.

Arathorn
01-22-2002, 02:29 AM
Originally posted by Lionel


then that must be why it is inbox.

if he can send and that will add to the folders, that will defeate the purpose of this hack by adding all folders to it. the count will always be off

Are you saying that it should only count the inbox? To me, this hack reminds a user that he has reached his PM limit, and that others can't send to him. Alot of users happily PM away, then get curious when one day no one replies them (cause they can't). Since all a user's PMs in all folders count towards the limit, this hack should also take all folders into account.

Lionel
01-22-2002, 02:33 AM
Originally posted by Arathorn


Are you saying that it should only count the inbox? To me, this hack reminds a user that he has reached his PM limit, and that others can't send to him. Alot of users happily PM away, then get curious when one day no one replies them (cause they can't). Since all a user's PMs in all folders count towards the limit, this hack should also take all folders into account.

yes but you cannot prevent someone to send a PM even if his receiving quota is full. And when he sends, that adds up to the outbox, right?

ytclear
01-30-2002, 04:04 AM
this hack removes the birthdays doesnt it?(it did for me) is there anyway to add them back?

Thanks

FWC
01-30-2002, 04:11 AM
Originally posted by ytclear
this hack removes the birthdays doesnt it?(it did for me) is there anyway to add them back?

Thanks My birthdays are still there, but I only have the gauge on my PM page.

snyx
01-30-2002, 05:39 AM
hey I was thinking of something cool for this hack, what about a square say 20x20 or 50x50 pixle flash (swf) file that was like a gas gauge where it would change depending on the amount in used (ie. the gas like gauge pointer would move up and down depending on the amount of space left) I donno what sorta speed problems this would create, but I don't mind making it, if someone can code it into the .fla file... I can draw it, but im not use how to code it in. anyone?

Erwin
02-07-2002, 05:33 AM
Cool hack. Works for me.

Raptor
02-28-2002, 03:31 AM
BB hows tricks ? ;)

Thomas P
04-23-2002, 09:41 PM
Very neat hack,
I use the text-only on forumhome,
thx,
-Tom

Thomas P
05-31-2002, 10:31 AM
Hi BB,

Hmmm, got a message that my PM folder is full, although the gauge tells me that only 56% is full.

I'm using your modified version from here:
https://vborg.vbsupport.ru/showthread.php?postid=214802#post214802
(some posts above)

Any idea?
Thanks a bunch,
-Tom

jjj0923
05-31-2002, 07:53 PM
this is a nice hack but I only installed the numerical display part of it and not the graphic since the side of the JPG is 42k.

thanks!

- jeff

JZarate
06-01-2002, 09:37 PM
Is there any ways this could be made smaller? And added as a column to the PM Table. Similar to the size hotmail uses.

mbaskett
06-03-2002, 01:22 PM
So, where would i put the code if I wanted to display the gauge for each in every post? ie: under their avatar......

HappyPike
06-05-2002, 09:45 PM
So this hack only counts the messages in the inbox folder???

Edit: Never mind. I found the fix that makes the hack count all the folders in this thread. :)

Thomas P
06-06-2002, 07:12 AM
Originally posted by HappyPike
So this hack only counts the messages in the inbox folder???

Edit: Never mind. I found the fix that makes the hack count all the folders in this thread. :)

Does it work for you?

I used the all-folder version, too, but still got ~36% PM though I already got a mail stating that my quota is reached...

Freestyler
06-14-2002, 09:18 AM
Originally posted by JZarate
Is there any ways this could be made smaller? And added as a column to the PM Table. Similar to the size hotmail uses.

I'm wanting to know the exact same thing :cheeky:

Limpkinw
06-17-2002, 04:05 PM
Also interested in a smaller version...not so great with my columns and stuff :)

Originally posted by Freestyler


I'm wanting to know the exact same thing :cheeky:

Bro_Joey_Gowdy
06-30-2002, 01:20 PM
nice hack

Prince
07-08-2002, 12:16 AM
I wantd it to be smaller also, here is how I did it...it's a little better.


<tr>
<td bgcolor="{secondaltcolor}" colspan="6"><smallfont>Your PM box is <b>$pmpercent%</b> full<br>
<img src="$barimg" width="$pmpercent%" height="6">
<table border="0" cellspacing="0" width="100%">
<tr>
<td width="33%"><smallfont>0%</td>
<td width="34%">
<p align="center"><smallfont>50%</td>
<td width="33%">
<p align="right"><smallfont>100%</smallfont></p>
</td>
</tr>
</table>
</td>
</tr>

87GTR
07-08-2002, 11:03 AM
I log in as as mod and it show 30% useage all the time no matter how many is in my folders.

is there a fix for this

87GTR
07-08-2002, 11:14 AM
ok I fix it and changed the code some and took out the query so that 1 less query your server has to make.

I changed mine to do all the pm's for your account not just the inbox.

here is the code change I did


//PM GAUGE HACK BY GOBLIN
$inboxpms=$allpm;

and I commetted out the next line that is a query.
and thats it.

Prince
07-08-2002, 03:16 PM
Originally posted by 87GTR
ok I fix it and changed the code some and took out the query so that 1 less query your server has to make.

I changed mine to do all the pm's for your account not just the inbox.

here is the code change I did


//PM GAUGE HACK BY GOBLIN
$inboxpms=$allpm;

and I commetted out the next line that is a query.
and thats it.


Will you please post your html template code you used!

Thanks! :)

Heijin
07-08-2002, 04:04 PM
The funniest thing. The bars look like the bars from another hack. like the rpg hack.

Prince
07-08-2002, 04:45 PM
Okay, check it out! Here is my forumhome_pmloggedin template, see attached image.



<tr id="cat">
<td id="pmBox" bgcolor="#336D95" background="https://vborg.vbsupport.ru/images/catagory_backing.gif" colspan="6"><a href="private.php?s=$session[sessionhash]" title="Click Here to Open Your Private Messages $inboxname"><normalfont color="#000000"><b>Private Messages</normalfont></b></a></td>
</tr>
<tr>
<td bgcolor="#1C5780" align="center" valign="center"><img src="https://vborg.vbsupport.ru/images/$lightbulb.gif" alt=""></td>
<td bgcolor="#13486D"><smallfont>
<b>$bbuserinfo[username]</b> - You have $newpm[messages] new message(s) since your last visit.<br>
(You have $unreadpm[messages] unread messages and $allpm[messages] total messages in all your folders.)</smallfont></td>

<td bgcolor="#1C5780"><smallfont>Your PM box is <b>$pmpercent%</b> full<br>
<img src="$barimg" width="$pmpercent%" height="6">

<table border="0" cellspacing="0" width="100%">
<tr>
<td width="33%"><smallfont>0%</td>
<td width="34%">
<p align="center"><smallfont>50%</td>
<td width="33%">
<p align="right"><smallfont>100%</smallfont></p>
</td>
</tr>
</table>

</td>
</tr>

87GTR
07-08-2002, 05:49 PM
ok here is mine forumhome_pmloggedin
Where does that backgroud tag keep showing up after I make a post?

im going to put this into a txt file and attach it.
this is insane when I post its chaning my code........

<tr id="cat">
<td bgcolor="#336D95" background="https://vborg.vbsupport.ru/images/catagory_backing.gif" colspan="6"><a href="private.php?s=$session[sessionhash]" title="Click Here to Open Your Private Messages $inboxname"><normalfont color="#000000"><b>Private Messages</normalfont></b></a></td>
</tr>
<tr>
<td bgcolor="#1C5780" align="center" valign="top"><img src="https://vborg.vbsupport.ru/images/$lightbulb.gif" alt=""></td>
<td bgcolor="#13486D" colspan="5">
<table width=100% valign=top><tr><td width=50% valign=top><smallfont>
<b>$bbuserinfo[username]</b> - You have $newpm[messages] new message(s) since your last visit.<br>
(You have $unreadpm[messages] unread messages and $allpm[messages] total messages in all your folders.)</smallfont></td>
<td bgcolor="#13486D" > <table width=100%><tr> <td colspan=3><smallfont>Your PM usage is $pmpercent% full.</td></tr><tr><td colspan=3><img src="$barimg" width="$pmpercent%" height="5"></td></tr>
<tr>
<td width="33%"><smallfont>0%</td>
<td width="34%">
<p align="center"><smallfont>50%</td>
<td width="33%">
<p align="right"><smallfont>100%</smallfont></p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>


</tr>




strange when I posted it using [ php ] tags it changed my code

87GTR
07-08-2002, 06:07 PM
ok here is the txt ver

I dont understand why this board is still parseing inside of the

[ php ] and [ code ] tags
need to get that fixed.

Prince
07-08-2002, 06:09 PM
I figured out how you did it, mine is a tad different I put the gauge in a separate box, different color, etc., though.

87GTR
07-08-2002, 06:16 PM
lets see a SS of yours ver

Im going to rewrite this hack so it doesnt use images
so that a few less images download each time.

Prince
07-10-2002, 07:29 PM
My inbox in now 78% full, however the bar is still yellow, it's supposed to change to red after 75%.

any ideas?

Prince
07-11-2002, 04:26 PM
okay, for those of you using the bar graph here is the correct code to display the green, yellow and red images:


//PM GAUGE HACK BY GOBLIN
$inboxpms=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] $ignoreusers");
$pmpercent=round(($inboxpms[messages] / $pmquota) * 100,2);
if ($pmpercent>50 && $pmpercent<=76) {
$barimg="https://vborg.vbsupport.ru/images/yellow.gif";
} else if ($pmpercent>75) {
$barimg="https://vborg.vbsupport.ru/images/red.gif";
} else {
$barimg="https://vborg.vbsupport.ru/images/green.gif";
}
//PM GAUGE HACK BY GOBLIN


* don't forget to change the path to the images

Wolf42
07-11-2002, 08:21 PM
Very nice hack, just working great with my vB 2.2.6!!

Thank you!! :D

87GTR
07-11-2002, 11:08 PM
you dont need this line

$inboxpms=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] $ignoreusers");

as you have just done the same query about 3 line before.

you can replace it with this line.

$inboxpms=$allpm;

that is 1 less query you have to do. and if you have busy site every little bit helps.

Prince
07-12-2002, 04:01 AM
yes, you're correct! thanks.

Prince
07-12-2002, 04:58 PM
oh, btw, if you are including the PM Guage with the bar graph you do need that query in private.php or it will not work, but it's not needed in index.php.

BarryA
07-29-2002, 02:28 AM
I just installed the hack and I think it broke my "Send PM to Buddies". Send PM to Buddies now comes up with a blank screen.

Has anyone else had this problem?

Prince
07-29-2002, 03:06 AM
the hack did not break it, you did! ;)

re-do the hack, it works fine.

Baptizer
09-06-2002, 12:24 AM
Great hack.....i just have to fix my images and it works perfectly.

QUick question: In my Vbulletin control panel, i 'think' the pm limit was set to 70, but some people had 500 pms in their box! why is that?

TvNut
09-07-2002, 11:54 PM
I like the hcak but looking for something that can go into here..just under it...

Zzed
09-08-2002, 12:14 AM
Originally posted by TvNut
I like the hcak but looking for something that can go into here..just under it...

Check out the hack I did for PM statistics ;)

https://vborg.vbsupport.ru/showthread.php?s=&threadid=42360

crazza
09-19-2002, 06:54 PM
There's a tiny error in the php code for this hack. Because of this, the colour for 75% and up will never work..

This is the original code:


if ($inboxpms < 1) {
$pmpercent = "1"; // stop divisions by zero
} else {
$pmpercent = round(($inboxpms[messages] / $pmquota) * 100,2);
}
if ($pmpercent>50) {
$barimg="https://vborg.vbsupport.ru/images/yellow.gif";
} elseif ($pmpercent>75) {
$barimg="https://vborg.vbsupport.ru/images/red.gif";
} else {
$barimg="https://vborg.vbsupport.ru/images/green.gif";
}


It should be changed to


if ($inboxpms < 1) {
$pmpercent = "1"; // stop divisions by zero
} else {
$pmpercent = round(($inboxpms[messages] / $pmquota) * 100,0);
}
if ($pmpercent>75) {
$barimg="https://vborg.vbsupport.ru/images/red.gif";
} elseif ($pmpercent>50) {
$barimg="https://vborg.vbsupport.ru/images/yellow.gif";
} else {
$barimg="https://vborg.vbsupport.ru/images/green.gif";
}



I have tested this.. and it works..

crazza
09-19-2002, 07:03 PM
I've done some additional editing on the php and template code, to add a view of outbox % too..

The full php enhancement now looks like this:


//PM GAUGE HACK BY GOBLIN and Installed by CraZ on September 19, 2002

$inboxpms=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] AND folderid=0 $ignoreusers");
if ($inboxpms < 1) {
$pmpercent = "1"; // stop divisions by zero
} else {
$pmpercent = round(($inboxpms[messages] / $pmquota) * 100,0);
}
if ($pmpercent>75) {
$barimg="{imagesfolder}/red.gif";
} elseif ($pmpercent>50) {
$barimg="{imagesfolder}/yellow.gif";
} else {
$barimg="{imagesfolder}/green.gif";
}

// outbox part by CRAZ

$outboxpms=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] AND folderid='-1' $ignoreusers");
if ($outboxpms < 1) {
$outpmpercent = "1"; // stop divisions by zero
} else {
$outpmpercent = round(($outboxpms[messages] / $pmquota) * 100,0);
}
if ($outpmpercent>75) {$outbarimg="{imagesfolder}/red.gif";}
elseif ($outpmpercent>50) {$outbarimg="{imagesfolder}/yellow.gif";}
else {$outbarimg="{imagesfolder}/green.gif";}

//PM GAUGE HACK BY GOBLIN


To the privfolder template I've added the following (in stead of the original alterations for this hack..


<br>


<table cellpadding="{tableouterborderwidth}" cellspacing="0" border="0" bgcolor="{tablebordercolor}" {tableouterextra} width="{contenttablewidth}" align="center"><tr><td>
<table cellpadding="4" cellspacing="{tableinnerborderwidth}" border="0" {tableinnerextra} width="100%">
<tr>
<td width="50%" bgcolor="{secondaltcolor}"><smallfont>Je Inbox is $pmpercent% vol</td>
<td width="50%" bgcolor="{secondaltcolor}"><smallfont>Je Outbox is $outpmpercent% vol</td>
</tr>

<tr>
<td width="50%" bgcolor="{secondaltcolor}"><img src="$barimg" width="$pmpercent%" height="9">
<table border="0" cellspacing="1" width="100%">
<tr>
<td width="33%"><smallfont>0%</td>
<td width="34%"><p align="center"><smallfont>50%</td>
<td width="33%"><p align="right"><smallfont>100%</smallfont></p></td>
</tr>
</table>
</td>

<td width="50%" bgcolor="{secondaltcolor}"><img src="$outbarimg" width="$outpmpercent%" height="9">
<table border="0" cellspacing="1" width="100%">
<tr>
<td width="33%"><smallfont>0%</td>
<td width="34%"><p align="center"><smallfont>50%</td>
<td width="33%"><p align="right"><smallfont>100%</smallfont></p></td>
</tr>
</table>
</td>


</tr>
</table>
</td></tr></table>

<br>




As you can see, the colspan of 7 is gone.. I've taken the liberty to place the gauges outside of the message table.. so insert the code above the table declarations (there are two).. and not directly above the $privatemessages

See attachment for a screenshot (never mind the dutch lingo)..

Dynamic One
11-01-2002, 07:41 PM
Thanks m8. had already dl another1, but I will see wich one is the easiest to install.

Dynamic One
11-15-2002, 10:39 AM
Who can please help me with this ??

I Have posted some test PM and I only see thet it's using 1%, When I delete them it stays on 1 %.

who knows what I'm doing wrong.

PS:
Sometimes I get tis error:
Warning: Division by zero in ....................private.php on line 106

Regards,

DO.

mehungie2
01-30-2003, 11:06 PM
is there anyway to make this count all the folders in ur pm box, not just inbox, because peoples pm boxes get full but it doesnt show full on forum home cause its just counting inbox

iceman11111
04-06-2003, 04:34 PM
Great Hack!!!

Very very easy to install!

This should be a beginners first hack!

:)

dede1
05-20-2003, 07:37 PM
Hallo

if the p.o. box is full to 100% remains the yellow bar it comes no red
someone where the error is white there?

JustAskJulie
03-31-2004, 09:47 PM
Just installed on 2.3.4 and it works great.

XJeepguy
04-06-2004, 04:46 PM
In the instructions where it says " ** OPEN INDEX.PHP and find

if ($newpm['messages']==0) {

** ADD ABOVE, the below

//PM GAUGE HACK BY GOBLIN"

What exactly does ADD ABOVE , the below mean ??? Add the code above where it says or below that top code ?

Thanks

JustAskJulie
04-10-2004, 03:50 PM
Well it seemed to work great but the guage does not appear to be accurate. As the admin, I have no idea what my limit on PM's is or where it is set (if any). And recently the gauge got up to about 85% for my account. HOwever, after deleting all of the sent PM's it still didn't go down.

For standard users, their limit is set at 50 PM's and I have had reports that the bar shows them at 25% with 48 PM's. Something is not right here. Is there a place in the hack that I need to specify what the PM limit is?

basskiller
05-04-2004, 12:21 AM
I can't even get the notepad to open

Rich
05-04-2004, 01:46 PM
[/QUOTE]In the instructions where it says " ** OPEN INDEX.PHP and find

if ($newpm['messages']==0) {

** ADD ABOVE, the below

//PM GAUGE HACK BY GOBLIN"

What exactly does ADD ABOVE , the below mean ??? Add the code above where it says or below that top code ?
[QUOTE]

That means add //PM GAUGE HACK BY GOBLIN" above the code if ($newpm['messages']==0) { in the INDEX.PHP file