The HP bar on User talk pages

Zekurom

is obsessed with Noivern!
Joined
May 24, 2010
Messages
4,483
Reaction score
7
I know what they're for, but how do I make one myself (with only 90 HP since I'm a less experienced user and my talk page is hardly touched anyway)?

Or is it some special, nebulous privilege given to experienced users only? Just want to know.
 
I know what they're for, but how do I make one myself (with only 90 HP since I'm a less experienced user and my talk page is hardly touched anyway)?

Or is it some special, nebulous privilege given to experienced users only? Just want to know.
Just copy paste the code from someone's talk page and mess around with it.
 
Just copy paste the code from someone's talk page and mess around with it.

The only reason I'm asking is because I can't find the source code in the page itself at all.

But sure, I'll try that.
 
The only reason I'm asking is because I can't find the source code in the page itself at all.

But sure, I'll try that.
Well, here's the one I made:
Code:
{| border=1 align="center" style="background: #fff; border:1px solid #fff; border-collapse:collapse;"
| rowspan="2" | {{{{#ifexpr: 244 - (({{PAGESIZE:User talk:Blazevoir|R}} div 102400 * 244) round 0) > 0|ani|MS}}|129}}
| width="364px" style="background:#000000; color:#222222;" | <div class="statbar" style="background: #{{#ifexpr: ((244 - (({{PAGESIZE:User talk:Blazevoir|R}} div 102400 * 244) round 0)) < 36)|EE0000}}{{#ifexpr: ((244 - (({{PAGESIZE:User talk:Blazevoir|R}} div 102400 * 244) round 0)) > 36) and ((244 - (({{PAGESIZE:User talk:Blazevoir|R}} div 102400 * 244) round 0)) < 180)|FFFF00}}{{#ifexpr: ((244 - (({{PAGESIZE:User talk:Blazevoir|R}} div 102400 * 244) round 0)) > 180)|00DD00}}; width: {{#ifexpr: {{PAGESIZE:User talk:Blazevoir|R}} < 102400|{{#expr: 244 - (({{PAGESIZE:User talk:Blazevoir|R}} div 102400 * 244) round 0)}}|1}}px; height: 10px; border: 1px solid black; overflow: hidden;">&nbsp;</div>
|- 
|<div align="center">{{#ifexpr: 244 - (({{PAGESIZE:User talk:Blazevoir|R}} div 102400 * 244) round 0) > 0|'''[[User talk:Blazevoir|{{color|000|HP: {{#expr: 244 - (({{PAGESIZE:User talk:Blazevoir|R}} div 102400 * 244) round 0)}}/244}}]]'''|[[User talk:Blazevoir|{{backgroundcolor|990000|FFFFFF|<small>FNT</small>}}]]}}</div>
|}
And it can be seen here
 
Alright, thanks. I'll take it from there and try using the Roundy and stuff. Perhaps create a tutorial for the people who want one.
 
Just thought I'd mention, that before you steal code (ahem, people seem to think that's okay, when it's really not) it's nice to ask permission first.
 
Just thought I'd mention, that before you steal code (ahem, people seem to think that's okay, when it's really not) it's nice to ask permission first.

I haven't done anything with it yet... >_> (And I only planned to use it on my own talk page anyway, not on another wiki, if that's what you meant.)

Anyway, I planned on making my own modifications on it, if that counts for anything.

Also, I don't even have any idea who I'm supposed to be asking permission from, or that it was even considered "stealing" in the first place.

Ehh, now I know.

BTW, RyeKew, your graphical HP box still has 360 as the maximum.
 
Last edited:
The reason they aren't on the talk page is that they are normally on a subpage like a template. What Jello meant with the "stealing" is that it still counts if you keep it here. Some people don't want to work hard on something and then have someone else just copy it. Permission is generally required, and most people prefer that the original author is credited too.

You can copy the coding from mine if you like, and fiddle around with it. Just be aware that mine is unusual in that I have set it up with parameters, so I don't need to edit the template if I change the Pokémon when I archive, although it means what I'm putting on the talk page itself is slightly larger. If you do copy and adapt mine, you don't need to give me credit on the page or template itself, just do it in an edit summary or something so you don't get accused of stealing it.

With the size, there are actually two different numbers involved. One of the numbers (in mine and in quite a few others) is 100. That is the size of the page in KB when it shows the page is out of HP. The other number (the maximum displayed) varies depending on the template. generally if it isn't 100 it's the max. HP of the Pokémon at level 100.
 
The reason they aren't on the talk page is that they are normally on a subpage like a template. What Jello meant with the "stealing" is that it still counts if you keep it here. Some people don't want to work hard on something and then have someone else just copy it. Permission is generally required, and most people prefer that the original author is credited too.

Actually, now that I know which parameters are involved, I'll make my own from scratch. Blazevoir's example is pretty bare-bones anyway.

I wasn't planning on "just copying" it either, just to be clear about that. I wouldn't want mine to be exactly the same as anybody else's either.

You can copy the coding from mine if you like, and fiddle around with it. Just be aware that mine is unusual in that I have set it up with parameters, so I don't need to edit the template if I change the Pokémon when I archive, although it means what I'm putting on the talk page itself is slightly larger. If you do copy and adapt mine, you don't need to give me credit on the page or template itself, just do it in an edit summary or something so you don't get accused of stealing it.

Don't worry, like I said, I'll make my own. That's what I was asking about in the first place.

With the size, there are actually two different numbers involved. One of the numbers (in mine and in quite a few others) is 100. That is the size of the page in KB when it shows the page is out of HP. The other number (the maximum displayed) varies depending on the template. generally if it isn't 100 it's the max. HP of the Pokémon at level 100.

Looking at Blazevoir's example has pretty much taught me everything involved in the programming process of this thing. The roundy stuff, etc. I'll figure out on my own.
 
Last edited:
That being said, I'm making a template so that everybody can use it. There might also be different styles, if that's needed.

Speaking of this, can someone look at mine? It's somehow broken.

What's with all the switch statements...?

Also, you should be using the wiki tables, not separate <div>s.
 
What's with all the switch statements...?

Also, you should be using the wiki tables, not separate <div>s.
That's how the HP bars work.

I liked how it looked, it just has implementation problems. Idea.
 
That's how the HP bars work.

They have the <div>s in exactly one cell, for the HP bar. I don't see any switch statements in Blazevoir's or Werdnae's... they use if statements. Try using #ifexpr: instead of #switch: and see if that works.

I liked how it looked, it just has implementation problems. Idea.

Use the wiki tables?

Do the following:

Code:
{| class="roundy"
| rowspan="2" | <!-- sprite code goes here -->
| style="width: 360px;" | <!-- div length code goes here -->
|- align="center"
| HP: <!-- current HP code goes here -->/<!-- max HP -->
|}

If you don't want roundy, you don't absolutely need to use it. But I digress.

*edit* Permission to make just one more userspace edit for the day? I've finished the entire HP bar this time.

Otherwise I'll just wait till tomorrow D:
 
Last edited:
Please note: The thread is from 16 years ago.
Please take the age of this thread into consideration in writing your reply. Depending on what exactly you wanted to say, you may want to consider if it would be better to post a new thread instead.
Back
Top Bottom