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)

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

PHP Code:

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

Quote:

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

Quote:

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

Quote:

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

Quote:

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

Quote:

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/showthrea...802#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

Quote:

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

Quote:

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

Quote:

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.

PHP Code:

<tr>
      <
td bgcolor="{secondaltcolor}" colspan="6"><smallfont>Your PM box is <b>$pmpercent%</bfull<br>
      <
img src="$barimgwidth="$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

Code:

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

Quote:

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

Code:

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


PHP Code:

<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(ssince your last visit.<br>
    (
You have $unreadpm[messagesunread messages and $allpm[messagestotal messages in all your folders.)</smallfont></td>

<
td bgcolor="#1C5780"><smallfont>Your PM box is <b>$pmpercent%</bfull<br>
<
img src="$barimgwidth="$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........
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:

PHP Code:

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

Code:

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

Code:

$inboxpms=$allpm;
that is 1 less query you have to do. and if you have busy site every little bit helps.


All times are GMT. The time now is 09:36 PM.

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.01395 seconds
  • Memory Usage 1,871KB
  • 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
  • (4)bbcode_php_printable
  • (9)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