PDA

View Full Version : Make-your-own Userbars.



DeathRay2K
07-01-2006, 11:26 AM
Because there's some sort of userbar fetish at this forum(;)), I'll share with you a little thing I made to make making them easier. :)
To use it, put this in a image code:
http://www.d2kstudios.com/userbars/userbar.php?
along with the parameters below. :)

The parameters are:
bgi
The background image; Will be scaled to 350*19. If you don't supply a background, the background will be black.
fgi
The foreground image; Will remain exactly the same. If you don't supply a foreground, it will only display the background and text.
t
The text.
l
The number of pixels from the left side that the text should be. That is a lowercase L. Defaults to 225

Easy eh? It automatically adds the shine and lines, you just need to supply a background image and a foreground image, plus text. :)
Here's an example one:
http://www.d2kstudios.com/userbars/userbar.php?bgi=bgi.png&fgi=fgi.png&t=D2KStudios&l=275

The Eagle
07-01-2006, 11:29 AM
interesting DeathRay, post this in some Userbar forums - it looks very useful.

btw, I find no userbar is complete without a border, is there any way to add that into it?

DeathRay2K
07-01-2006, 11:30 AM
Sure, I'll add that now. :)
Alright, they now have borders. And, I've added three more possible parameters:
r
The red value of the border.
g
The green value of the border.
b
The blue value of the border.
All three default to 0 if they aren't set, so, for instance, if you want an all red border, you only have to set r=255.

EatsP1es
07-01-2006, 10:20 PM
dude

/slaps him for being so good ;)

and yeah, canada, good nation :P my bro's marrying a canadian so i have no choice but to say that :P

DeathRay2K
08-01-2006, 12:00 AM
lol
I'm also thinking about adding the ability to generate gradients as backgrounds as well... :)

Edit:
I've added a new parameter, that acts as r,g, and b all together, as well as an added alpha (Note, alpha is only up to 100, wheras the others go up to 255)

c
A combined r,g, and b, as well as an alpha channel. Seperated by commas (,), and in this order: r,g,b,a. Alpha channel ranges from 0 to 100, with 100 being the least opaque. You only need to set it as far as you need to. For instance, if you wanted a green border, you would set it to c=0,255. All values default to 0.

chickendippers
08-01-2006, 12:35 AM
That's very cool! Check out my userbar biatches!

The Eagle
08-01-2006, 12:50 AM
LOL

... nothing on it :p

chickendippers
08-01-2006, 12:54 AM
That is the point :p

Flak
08-01-2006, 12:54 AM
He's as deep as a rather shallow puddle. :p

The Eagle
08-01-2006, 01:07 AM
lol, you people are confusing :p

DeathRay2K
08-01-2006, 01:35 AM
Alrighty then.
I've added yet another parameter, this time for setting the background colour, if you don't want to use an image for it. It works the same as c, except without an alpha channel.

bgc
The colour of the background, in the format %red%,%green%,%blue%. It defaults to 0,0,0, so if you want a yellow background you'd just need to set bgc=255,255.

Now, and example that uses some of the new stuff:
http://www.d2kstudios.com/userbars/userbar.php?bgc=32,51,89&fgi=fgi.png&c=135,190,225,50&t=D2KStudios&l=275

Flak
08-01-2006, 01:36 AM
Someone should pay you. :p

Keep it up.

DeathRay2K
08-01-2006, 01:39 AM
They certainly should. :p
I've almost got gradients done. :)

The Eagle
08-01-2006, 01:43 AM
Someone should pay you. :p


I got a better idea - someone should host him :p

MadBadger
08-01-2006, 01:51 AM
that a blatant subtle hint there eagle?

ohh and the thinggys great i hada go onit...... mines cool anyway thou :D

might make an England one thou.

DeathRay2K
08-01-2006, 01:59 AM
Huzzah! Gradients work and they are absolutely beautiful. :D
Of course they have a new parameter as well, building on bgc.

bgc2
When bgc2 is set, a gradient is created between it and bgc, with bgc at the top and bgc2 at the bottom. It must be input the same way as bgc, as %red%,%green%,%blue%.

Here's an example:
http://www.d2kstudios.com/userbars/userbar.php?bgc=135,190,225&bgc2=32,51,89&fgi=fgi.png&t=D2KStudios&l=275

Woo! Stickied! :)


Time for a quick recap:

Yeah, I know its a bit difficult to understand, and I've added several more very useful parameters since I posted. ;)

Parameters
bgi
The background image; Will be scaled to 350*19. If you don't supply a background, the background will be black.
fgi
The foreground image; Will remain exactly the same. If you don't supply a foreground, it will only display the background and text.
t
The text.
l
The number of pixels from the left side that the text should be. That is a lowercase L. Defaults to 225
r
The red value of the border.
g
The green value of the border.
b
The blue value of the border.
c
A combined r,g, and b, as well as an alpha channel. Seperated by commas (,), and in this order: r,g,b,a. Alpha channel ranges from 0 to 100, with 100 being the least opaque. You only need to set it as far as you need to. For instance, if you wanted a green border, you would set it to c=0,255. All values default to 0.
bgc
The colour of the background, in the format %red%,%green%,%blue%. It defaults to 0,0,0, so if you want a yellow background you'd just need to set bgc=255,255.
bgc2
When bgc2 is set, a gradient is created between it and bgc, with bgc at the top and bgc2 at the bottom. It must be input the same way as bgc, as %red%,%green%,%blue%.

How to use
Use image codes ( in forums, or <img> on websites).
In between and , or after src= in <img>, write: "http://www.d2kstudios.com/userbars/userbar.php?" without the quotation marks.
After that, you have to decide what parameters you want.
You must use fgi for the script to add the shine and lines.

For each parameter, simply write %parameter%=%value%, replacing %parameter% with the parameter you're adding, and %value% with what the parameter's value is.
You must add an ampersand (&) between each parameter.
For example, if I wanted a simple userbar with my logo and a blue background, I would write: http://www.d2kstudios.com/userbars/userbar.php?bgc=0,0,255&fgi=fgi.png&t=D2K Studios&l=275
This would output:
http://www.d2kstudios.com/userbars/userbar.php?bgc=0,0,255&fgi=fgi.png&t=D2K Studios&l=275

Lets look over this one parameter at a time.
bgc=0,0,255
This sets the background colour. Since I want a blue background, I set red to 0, green to 0, and blue to 255.

fgi=fgi.png
This sets the foreground image, the image that goes on top of everything but the shine. since my logo is in the same place as the script, and called 'fgi.png', I simply wrote that. It can be anything, and at any url.

t=D2K Studios
The text. D2K Studios is the name of my website, so I wrote that.

l=275
How many pixels from the left that the text should begin. Its a farily high number, because there's not much text in this example, and I wanted to to be close to the right side.


Its the same with all parameters. :)

When I'm completely done the script, I may make a page that allows this all to be done more easily, but at the moment I'm still actively developing it.
Actually, anyone could make such a page, and just set the parameters for that link. :)

Anyone have any ideas for things to add?

The Eagle
08-01-2006, 11:42 AM
Oh, I... er... nope :p

The Eagle
08-01-2006, 11:50 AM
http://www.d2kstudios.com/userbars/userbar.php?bgc=0,100,215&fpi=eagle.png&t=Eagle&l=275

uh, can't get my image to load. :p

chickendippers
08-01-2006, 12:25 PM
I think you need to include the path to your image...not sure how that'd work though.

The Eagle
08-01-2006, 12:26 PM
the thought crossed my mind - it's on the desktop, does that matter?

Flak
08-01-2006, 03:07 PM
Probably.

DeathRay2K
08-01-2006, 08:23 PM
fgi and bgi have to be urls of images online. ;)

The Eagle
08-01-2006, 08:33 PM
ahaaaaa, i seeeeeeee...

DeathRay2K
09-01-2006, 04:37 AM
I forgot to mention that as it is now, both images must be PNGs... So, once my site has changed servers (In two days), I'll fix that.

Luk3us
10-01-2006, 04:56 AM
Very neat little php script. :D

DeathRay2K
11-01-2006, 01:35 AM
Thanks. :)
You can now use jpeg, png, gif, and wbmp images.
I forgot to mention, if you use a background colour/gradient, it will be displayed under the background image. This can create cool effects if you use it with a transparent png. ;)

DeathRay2K
28-01-2006, 07:24 AM
I've made some headway with a form for making them... You can see it here (http://www.d2kstudios.com/userbars/userbar.php?p=create), but right now it is fatally bugged (It doesn't make the Userbar properly), I'll fix that soon.

Edit 1: Yay, its all working now, except for the images. I'm going to add the ability to upload them soon.
Edit 2: I've made it so that you no longer need a foreground image for the shine and the lines to show up. :)

TibStorm
03-05-2006, 07:41 PM
That is a very nice tool :) thanks.

Sandboy23
20-05-2006, 11:18 PM
ollo thats cool!

Sandboy23
20-05-2006, 11:41 PM
Its not working i want mine to say Sandboy23 with a nuke, and black, but it dosnt work!

chickendippers
21-05-2006, 09:27 AM
Well you need to find a picture of a Nuke first.

Sandboy23
21-05-2006, 11:47 PM
i got one can i give it to you and you make me it??

PLZ :) :)

Sandboy23
21-05-2006, 11:53 PM
These>

http://s47.photobucket.com/albums/f178/Steeltop/th_teapot.jpg (http://s47.photobucket.com/albums/f178/Steeltop/?action=view&current=teapot.jpg)http://s47.photobucket.com/albums/f178/Steeltop/th_NUkeg.jpg (http://s47.photobucket.com/albums/f178/Steeltop/?action=view&current=NUkeg.jpg)http://s47.photobucket.com/albums/f178/Steeltop/th_Dyeso1.jpg (http://s47.photobucket.com/albums/f178/Steeltop/?action=view&current=Dyeso1.jpg)http://s47.photobucket.com/albums/f178/Steeltop/th_Atomicarchivecover.jpg (http://s47.photobucket.com/albums/f178/Steeltop/?action=view&current=Atomicarchivecover.jpg)http://s47.photobucket.com/albums/f178/Steeltop/th_Dyeso2.jpg (http://s47.photobucket.com/albums/f178/Steeltop/?action=view&current=Dyeso2.jpg)http://s47.photobucket.com/albums/f178/Steeltop/th_climax.jpg (http://s47.photobucket.com/albums/f178/Steeltop/?action=view&current=climax.jpg)

These are some of them!

chickendippers
22-05-2006, 12:00 AM
Just read the instructions in the first couple of posts, it tells you how to do it.

Sandboy23
22-05-2006, 12:01 AM
i did i cant, it messes, up!

DeathRay2K
10-08-2006, 08:40 PM
Lol, sorry about the huge delay, but uploads work now. URLs still don't and I'm not sure why.
Anyways, at least you can finally use your own images. ;)
http://www.d2kstudios.com/userbars/userbar.php?p=create

Ccveteran
05-08-2010, 06:45 AM
I might say, very good. Man graphics Designers are good

Rico
31-08-2010, 04:18 PM
You bumped a 4 year old topic.....

If you want a graphic for your sig etc, just send me a PM :)

Kyon
18-01-2011, 12:37 PM
Rico i want a C&C avatar with nod theme could you help me ?