vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   PM Gauge (https://vborg.vbsupport.ru/showthread.php?t=34248)

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

Quote:

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/showthrea...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:

Quote:

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

Quote:

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:

Quote:

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

Quote:

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


All times are GMT. The time now is 08:07 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.01060 seconds
  • Memory Usage 1,745KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (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