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)

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 08:05 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.01194 seconds
  • Memory Usage 1,762KB
  • 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
  • (3)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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