Author Topic: Dynamic Userbars!  (Read 31813 times)

0 Members and 1 Guest are viewing this topic.

Offline {AP}

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 981
  • Rating: +74/-3
  • I am Webmaster!
    • View Profile
    • Removed From Game
Dynamic Userbars!
« on: March 22, 2010, 07:33:52 pm »
Website: http://userbars.removedfromgame.com/
Generator: http://userbars.removedfromgame.com/generator.php
------------------------------------------------------------
I needed to do a bit of PHP to get ready for college and these things are useful. This allows you to make dynamic, simple mini-userbars. (195x20 px) I needed these on Facebook for 2 reasons. Normal userbars are too big, and using a generator or doing them myself in Photoshop would require reuploading eveytime my level changed or I wanted to add a game to my list. Afterwards, I expanded the code to be a bit more useful for others. So, I thought I'd share.

For an example, just look at my signature. You can change the name of the game, the level, or just put a message on it. You can also change the BG color, but I only have 5 options at the moment. Later on, I'll add more colors, maybe some logos, maybe an option to add a picture/logo to it. If you have any other ideas, let me know.

Here's how it all works.

Blank Bar

Code: [Select]
http://userbars.removedfromgame.com/miniuserbar.php
Code: [Select]
http://userbars.removedfromgame.com/userbar.phpThis just gives a gray bar with nothing on it. Now, the fun stuff.

BG Color

Code: [Select]
http://userbars.removedfromgame.com/miniuserbar.php?bg=red
Code: [Select]
http://userbars.removedfromgame.com/userbar.php?bg=redJust add a ? to separate the commands from the rest of the url then bg= and your color and you can change it. If it's not one of the supported colors, it defaults to gray OR if you don't use bg= at all it will default to gray.
Current available colors:
  • red
  • green
  • black
  • brown
  • blue
  • lightblue
  • yellow
  • orange
  • purple
  • pink
  • gray

Adding a Message

Code: [Select]
http://userbars.removedfromgame.com/miniuserbar.php?bg=brown&msg=I like pie
Code: [Select]
http://userbars.removedfromgame.com/userbar.php?bg=brown&msg=I like pie even more than I did in the other barTo separate the commands, you use & and for messages add msg= then the text. Note, don't use anything but letters, numbers, and spaces. It'll most likely not work if you do... unless you use my converter!
http://userbars.removedfromgame.com/converter.php

Just type in the string you want, special characters and all, and it'll give out the results with examples.

Game Mini-Userbar

Code: [Select]
http://userbars.removedfromgame.com/miniuserbar.php?game=farmville&lvl=19
Code: [Select]
http://userbars.removedfromgame.com/miniuserbar.php?game=nyaar&lvl=0
Code: [Select]
http://userbars.removedfromgame.com/miniuserbar.php?game=nyaar&bg=black&lvl=999
Code: [Select]
http://userbars.removedfromgame.com/userbar.php?game=farmville&lvl=19
Code: [Select]
http://userbars.removedfromgame.com/userbar.php?game=nyaar&lvl=0
Code: [Select]
http://userbars.removedfromgame.com/userbar.php?game=nyaar&bg=black&lvl=999For the 4 supported games, you don't need to change the BG but if it's not either "farmville", "mafiawars", "ninjawarz", or "castleage" (and it most likely won't be) you should add the bg= or it'll default to gray. Basically, game= works the same way as msg= but handles the background color for any supported games too so you can easily replace the two if you want. The other command, lvl= will simply add "Level: ###" to the right side. Preferred if it was 0-999. You can do longer numbers, but it might not show it all.

Username (only for normal userbars)

Code: [Select]
http://userbars.removedfromgame.com/userbar.php?game=nyaar&bg=purple&lvl=999&name=bobJust add in a name= and your name. (Remember, only letters, numbers, spaces, and underscores.)



That's pretty much the gist of it. Just typing in the URL will show you the image, so you don't have to post it somewhere to test. Any questions, just ask. Any ideas, then let me know. I'm having fun with this. =)
« Last Edit: March 24, 2010, 03:44:52 pm by {AP} »

SirCmpwn

  • Guest
Re: Mini-Userbars (Mini Project)
« Reply #1 on: March 22, 2010, 07:40:22 pm »
Nice!

Test:

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: Mini-Userbars (Mini Project)
« Reply #2 on: March 22, 2010, 07:54:16 pm »
VERY nice.

Test:


Be sure to add more to this! :D :D
« Last Edit: March 22, 2010, 07:54:55 pm by ProphetsDementia »
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







Offline {AP}

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 981
  • Rating: +74/-3
  • I am Webmaster!
    • View Profile
    • Removed From Game
Re: Mini-Userbars (Mini Project)
« Reply #3 on: March 22, 2010, 07:56:57 pm »
Glad you guys like them. =)

I'm thinking about expanding to also doing normal sized userbars and more colors will be coming soon for sure. Other than that, I don't have too many ideas so let me know what you'd like to see and I'll work on it. ^^

SirCmpwn

  • Guest
Re: Mini-Userbars (Mini Project)
« Reply #4 on: March 22, 2010, 07:58:12 pm »
Hey could you maybe let us provide a url to an image and have it insert it into the background?

Offline {AP}

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 981
  • Rating: +74/-3
  • I am Webmaster!
    • View Profile
    • Removed From Game
Re: Mini-Userbars (Mini Project)
« Reply #5 on: March 22, 2010, 08:03:39 pm »
I'm not entirely sure. I'll think about it... but that's the one of the reasons why current userbar generators don't have dynamic URLs like this and such. I'll try some things out though, it's a nice thought.

SirCmpwn

  • Guest
Re: Mini-Userbars (Mini Project)
« Reply #6 on: March 22, 2010, 08:04:40 pm »
Either way, well done.

++

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6267
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Mini-Userbars (Mini Project)
« Reply #7 on: March 22, 2010, 08:08:50 pm »
Wow, cool! I was wondering if you could give me the source so I could play around with it?
/e

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: Mini-Userbars (Mini Project)
« Reply #8 on: March 22, 2010, 08:10:29 pm »
Perhaps username support?
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







Offline {AP}

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 981
  • Rating: +74/-3
  • I am Webmaster!
    • View Profile
    • Removed From Game
Re: Mini-Userbars (Mini Project)
« Reply #9 on: March 22, 2010, 08:10:55 pm »
Sure, I'll try to clean it up and comment it first. I'll PM you the code when done.

EDIT: Username support? (Just need a little elaboration to make sure I'm on the same page.)
« Last Edit: March 22, 2010, 08:11:37 pm by {AP} »

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: Mini-Userbars (Mini Project)
« Reply #10 on: March 22, 2010, 08:14:14 pm »
It would be cool if you could have the game name and then have a parameter to put your alias in and THEN the level. :D
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6267
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Mini-Userbars (Mini Project)
« Reply #11 on: March 22, 2010, 08:14:58 pm »
K sweet! Can't wait!
/e

Offline {AP}

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 981
  • Rating: +74/-3
  • I am Webmaster!
    • View Profile
    • Removed From Game
Re: Mini-Userbars (Mini Project)
« Reply #12 on: March 22, 2010, 08:24:41 pm »
It would be cool if you could have the game name and then have a parameter to put your alias in and THEN the level. :D

That's what I thought. =P
Only issue I see with that is the size. You may have to wait until I expand to normal sized userbars too.
I'll see about finishing that first tonight. Shouldn't take TOO long.

Offline {AP}

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 981
  • Rating: +74/-3
  • I am Webmaster!
    • View Profile
    • Removed From Game
Re: Mini-Userbars (Mini Project)
« Reply #13 on: March 22, 2010, 09:36:11 pm »
UPDATE:
Check the first post, but for a summary... I added more colors, normal sized userbars, and "username" for the bigger userbars.
I noticed that I need to fix the bigger userbars and new colors for the miniuserbars a bit. The highlight is a bit too bright. I'll do it later though... I'm lazy. ;P

Just need to remember now, miniuserbars.php should be userbars.php for the bigger bars.

NOTE:
Levels above 999 now accepted and an easter egg has been added. ^_~
« Last Edit: March 22, 2010, 09:58:36 pm by {AP} »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Mini-Userbars (Mini Project)
« Reply #14 on: March 22, 2010, 11:47:03 pm »
Pretty nice. ^^