Lithium Posted February 18, 2010 Posted February 18, 2010 How many of you get annoyed when your progress bars grow more than they should and ruin your layout? Also, how many of you are tired of the same old same progress bar styles? I've made a small replacement a while back for the progress bars which i decided noqw to share. You can see them in action in http://www.deadlycountry.net So here it go, Name this file let's say bars.php and place it somewhere on your public_html folder You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Progress bar image is attached to this post as well. If there is someone kind enough to make a layered psd out of it i would be much apprecciated, as i lost my original one :( Now let's apply it on! Where you have your progress bars, simply remove the code and replace it for: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Where $var should be: (check header.php) $enperc, $wiperc, $experc, $brperc, $hpperc. This ones can be deleted afterwards: $enopp, $wiopp, $exopp, $bropp, $hpopp. Finally, the progress bar can be at this sizes: 160*16 (as the above example), 140*14 ... (resize it on the same ratio for better looking). The image i provide looks bad below 100*10 so try to make it look at least decent :) Any comments, good or bad (constructive) are always welcome!! Quote
CJ - Twitch Posted February 18, 2010 Posted February 18, 2010 Looks great but what if you want different color bars ;) Quote
Lithium Posted February 18, 2010 Author Posted February 18, 2010 Looks great but what if you want different color bars ;) What about adding a $var to different images and then displaying them as requested? Is that hard? ;) Quote
CJ - Twitch Posted February 18, 2010 Posted February 18, 2010 :| I didn't think of that xD Will it work? 8| Quote
Lithium Posted February 18, 2010 Author Posted February 18, 2010 If you know what you are doing... yes! :whistling: Something along these lines... $chooseimg = array("yellow" => "images/yellow.png", "blue" => "images/blue.png", etc etc etc) changing the $img accordingly... $img = $img = loadpng($chooseimg[$_GET['type']]); And finally... the display it self needs a bit tweaking... This is untested and its only a guideline to achieve the result :) Quote
Lithium Posted February 18, 2010 Author Posted February 18, 2010 Thx for cjholder for the 2nd progress bar (the "crappy bar" one), added to the OP. Quote
CJ - Twitch Posted February 18, 2010 Posted February 18, 2010 Here is a better 'crappy' bar. :) Quote
Lithium Posted February 19, 2010 Author Posted February 19, 2010 Looks great but what if you want different color bars ;) Following cjholder question, and his attempt to make it run, here it goes a working example on multiple images! You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Finally displaying the images... You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
CJ - Twitch Posted February 19, 2010 Posted February 19, 2010 Great work! It works perfectly. :) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.