Loading...

Top
PFQ Banner

This is PokéFarm Q, a free online Pokémon collectables game.

Already a user? New to PFQ?

A Somewhat Extensive Guide to BBCodes

Forum Index > PokéFarm > Guides >

Pages: 123··· 248249250251252··· 761762763

AadÏ247's AvatarAadÏ247
AadÏ247's Avatar
Thanks for this amazing guide.
My name on Pokèmon Showdown is Aadi247 Avatar from here!
DrWho's AvatarDrWho
DrWho's Avatar

QUOTE originally posted by EstreIIa

Another question: how do you make progress bars go beside each other?
A progress bar
More progress bars
And a third
[sc=sidebyside][progress=3/10]A progress bar[/progress][progress=1/10]More progress bars[/progress][progress=8/10]And a third[/progress][/sc] [style] .sidebyside { display: flex; .expbar { flex: 1 1 0; } } [/style] If you want to put space between the progress bars you can give .sidebyside a negative horizontal margin and .expbar a positive margin like so
A progress bar
More progress bars
And a third
[style] .sidebyside { display: flex; margin: 0 -3px; .expbar { flex: 1 1 0; margin: 0 3px; } } [/style]
Avatar by Kaelwolfur. Sent from my PokéNav
EstreIIa's AvatarEstreIIa
EstreIIa's Avatar
Thank you very much, DrWho!!

1460/2100

1212/2100

158/4300

919/2100
icon credit
I'm going to sneak into that conversation and give a counter question, if using a other kind of code for progress bars- how can the space be added to that? Because I tried to add some space for the two in my signature but I got it all messed up ;.;

A pretty code in a box

[progress="[inventory=Diamond Tiara]/300"][inventory=Diamond Tiara]/300 [item=Diamond Tiara][/progress] [style].expbar { display: inline-block; width: 40%; margin: 0px auto; background: white; border: 1px solid purple; &>div { background: #F7B3DA; border-right: 1px solid purple; } &>span { font-size: 10px; font-weight: 400; color: purple; } }[/style]

This post contains one or more BBCode Errors and cannot be displayed properly.

Error: Item "Wishing Stone" not found on line 6

If this is your post, please edit it to correct these errors. For now, the post will be shown raw, with no BBCode processing.

[center][size=7]Avatar is made by BananaLizard. Shop banner made by Sunshine Lady. >>>> [url=https://pokefarm.com/forum/thread/171400/Keira-s-Little-Hideout-U-C/post/3800133]My Journal[/url] <<<<[/size] [url=https://pokefarm.com/forum/thread/63336/Keira-s-Little-Corner-open][img]https://pokefarm.com/upload/Keira_Lorelei/Art/IMG_1485.JPG[/img][/url] [progress="[inventory=Wishing Stone]/1000"][inventory=Wishing Stone]/1000 [item=Wishing Stone][/progress] [style].expbar { display: inline-block; width: 40%; margin: 0 1em; background: white; border: 1px solid purple; &>div { background: #F7B3DA; border-right: 1px solid purple; } &>span { font-size: 10px; font-weight: 400; color: purple; } }[/style] [progress="[inventory=Water gem]/3200"][inventory=Water gem]/3200 [item=Water gem][/progress] [style].expbar { display: inline-block; width: 40%; margin: 0 1em; background: white; border: 1px solid purple; &>div { background: #F7B3DA; border-right: 1px solid purple; } &>span { font-size: 10px; font-weight: 400; color: purple; } }[/style] [/center]
DrWho's AvatarDrWho
DrWho's Avatar
[introduction tba] To start off, you need a styleclass 'counters' which contains your various counters. You also need a style tag which contains information about how counters are laid out - That's what the squashed block at the bottom does, so you don't have to worry about it.
[sc=counters] [/sc] [style] .fillcounter(@collecting,@image,@progress,@goal){.icon:after{content:url(@image)}.icon:before{height:calc(100% - 100*@progress/@goal)}.quantity:before{content:"" + @progress}h3:before{float:left;content:url(@image);padding:4px;background:@col-bg3;border:1px solid @col-border1;border-radius:4px;margin-right:0.5rem}h3{display:block;flex-flow:row wrap;text-align:left;margin-bottom:.8rem}h3:after{font-weight:400;font-size:1rem;display:block;content:@progress + "/" + @goal + "\A " + @collecting}}.counters{position:relative;margin:-2px;display:flex;flex-flow:row wrap;align-items:flex-end;span.bbcode_tooltip{border-bottom:none}.tooltip_content{left:0;bottom:0;transform:translate3d(0,100%,0)}}.counter{position:static !important;text-align:center;margin:0 2px}.counter .icon{position:relative;overflow:hidden;display:inline-block;&:before{position:absolute;content:"";top:0;left:0;width:100%;background:rgba(0,0,0,0.75)}}.counter > .quantity{display:block} [/style]
Now everything is set up - Let's add a counter! This is what you add between the [sc=counters][/sc] tags, the important bits are highlighted.
umbreon
- is a unique name for that specific counter.
Dark Gems ★
- is the headline for that counter. You'll see it when you hover over the counter. If you compare it to the staff counters in the header, it would correspond to the staff's name. You can also make it a link.
I love dark types and dark gems!
- Is the flavour text you see when you hover over the counter. Comparing it to the staff counters, this corresponds to each staff member's little message.
[sc=counters] [sc=counter umbreon][pit="[sc=icon][/sc][sc=quantity][/sc]"][h3]Dark Gems ★[/h3]I love dark types and dark gems![/pit][/sc] [/sc]
If you try and run this now, you won't see anything. You need to update the css in the style tags to pass 4 pieces of information to the counter.
  1. The thing you're collecting/counting
  2. The image URL for the counter
  3. The current progress, e.g. an inventory code
  4. The goal
Let's do it for the Dark gem counter:
[style] .umbreon { .fillcounter( "Dark Gems", "https://pfq-static.com/img/pkmn/o/d/t.png", [math][inventory=Dark Gem]+10*[inventory=Medium Dark Gem][/math], 100 ) } /*The long block from above goes here*/ [/style]
What we did is declare a new block for our counter. We use . plus the unique name of our counter from above. Inside the block, we pass the 4 pieces of information to the .fillcounter mixin, and it'll style our code for us. Now this may seem cumbersome at first, but the huge advantage of this approach is that it's super easy to add more counters. They can be of different sizes as well and will align in a straight line at the bottom. Let's add two more counters and view the result:

Code

[sc=counters] [sc=counter umbreon][pit="[sc=icon][/sc][sc=quantity][/sc]"][h3][url=/index]Dark Gems ★[/url][/h3]I love dark types and dark gems![/pit][/sc] [sc=counter eevee][pit="[sc=icon][/sc][sc=quantity][/sc]"][h3]Shiny Eevee[/h3]Look at those adorable silver cuties![/pit][/sc] [sc=counter lanturn][pit="[sc=icon][/sc][sc=quantity][/sc]"][h3]Fising[/h3]Blub.. Blub.. Blub.. You really need a lot of patience for this.[/pit][/sc] [/sc] . . . . . . . [style] .umbreon { .fillcounter( "Dark Gems", "https://pfq-static.com/img/pkmn/o/d/t.png", [math][inventory=Dark Gem]+10*[inventory=Medium Dark Gem][/math], 100 ) } .eevee { .fillcounter( "Shiny Eevee", "https://pfq-static.com/img/pkmn/n/0/m.png", 3, 8 ) } .lanturn { .fillcounter( "Fish hooked", "https://pfq-static.com/img/pkmn/4/z/f.png", 700, 1500 ) } .fillcounter(@collecting,@image,@progress,@goal){.icon:after{content:url(@image)}.icon:before{height:calc(100% - 100*@progress/@goal)}.quantity:before{content:"" + @progress}h3:before{float:left;content:url(@image);padding:4px;background:@col-bg3;border:1px solid @col-border1;border-radius:4px;margin-right:0.5rem}h3{display:block;flex-flow:row wrap;text-align:left;margin-bottom:.8rem}h3:after{font-weight:400;font-size:1rem;display:block;content:@progress + "/" + @goal + "\A " + @collecting}}.counters{position:relative;margin:-2px;display:flex;flex-flow:row wrap;align-items:flex-end;span.bbcode_tooltip{border-bottom:none}.tooltip_content{left:0;bottom:0;transform:translate3d(0,100%,0)}}.counter{position:static !important;text-align:center;margin:0 2px}.counter .icon{position:relative;overflow:hidden;display:inline-block;&:before{position:absolute;content:"";top:0;left:0;width:100%;background:rgba(0,0,0,0.75)}}.counter > .quantity{display:block} [/style]
Result:

Dark Gems ★

I love dark types and dark gems!

Shiny Eevee

Look at those adorable silver cuties!

Fising

Blub.. Blub.. Blub.. You really need a lot of patience for this.
. . . . . . .
Calypso's AvatarCalypso
Calypso's Avatar

QUOTE originally posted by Calypso

Is there any way to make a picture smaller without making it blurry? (The little sprite on my about me is really blurry because of its size)
Just going to slide this back in here
Avatar created by quinn for my use only Trying to sell my stuff. Feel free to PM if anything interests you in my fields

QUOTE originally posted by DrWho

You have the declaration "margin: 0px auto" which gives a vertical margin of 0 and a horizontal margin of auto. However a horizontal margin of auto has no effect on an inline-block element. Change it to margin: 0 1em; to give your progress bars a horizontal margin of 1em (or any other value you want)
That made my two progress bars to show up on their own line, while I want them to be side by side (see? I broke the code already xD) Yay it worked! I just forgot taking off the 'dots', thank you very much! :D
DrWho's AvatarDrWho
DrWho's Avatar

QUOTE originally posted by Calypso

Is there any way to make a picture smaller without making it blurry? (The little sprite on my about me is really blurry because of its size)
When your browser scales an image it will try to make it smooth. Since it's a sprite you'll probably want it to stay blocky, you can do this by setting image-rendering to pixelated. [style] img { width: 25px; image-rendering: pixelated; } [/style] pixelated: auto:
WinterShine's AvatarWinterShine
WinterShine's Avatar
How do you accomplish a pit with a pokemon sprite? Where you hover over the sprite and it gives you the message? IDK how two put the two codes together...

Credits & Dragon Cave

Avatar from Pokeplushies, free to use.
EstreIIa's AvatarEstreIIa
EstreIIa's Avatar

QUOTE originally posted by WinterShine

How do you accomplish a pit with a pokemon sprite? Where you hover over the sprite and it gives you the message? IDK how two put the two codes together...
Like this?
[tip=TIP MESSAGE][pkmn=POKEMON][/tip]

Pages: 123··· 248249250251252··· 761762763

Cannot post: Please log in to post

© PokéFarm 2009-2024 (Full details)Contact | Rules | Privacy | Reviews 4.6★Get shortlink for this page