Sign Up! Login: Password: New User? Forgot? Support
Top Mods!
Wowhead Search
by sonofsamedi
Digital Clock
by Wolfar15
Admin Forums
Welcome to the GuildPortal Help Community! These forums are for admin-to-admin help.
Available Forums
Forums : Pimp My Site! > Honorable Dead (WoW)
Harmond (Guild Admin) 7/11/2004 12:48 PM EST : Honorable Dead (WoW)
Harmond
Posts: 1607
Zomgawsh Poster

Alright.  I really blew it.  I was hoping there might be a knight in shining armor out there to save me. 

The Problem:  First let me direct you to my old guild for XWing vs. Tie Fighter.  Yeah, it was a while ago.  Anyway, click on any of the little blue Bio boxes (I would have linked directly, but thought it bad manners).  You will see a bunch of little 'ribbons.'  These are all campaign ribbons for various events that the guild has had in it's loooong history.  Well, my problem is that I tried to implement this on our site, as you can probably tell by my signature below, by inserting the little ribbons in the signatures of members.  Well, little did I know that signatures have a 1000 character limit, and so I've been ok so far.  There will, however, come a time in the very near future when a member comes to me and says, “Hey!  I can't fit any more ribbons in my sig, you jerk!“  Noob mistake, I know, I'm kicking myself.

Now I realize that I could just put the campaign ribbons in the pre-existing GuildPortal medals content.  But I really wanted to set them apart.  Which is why I originally authorized them for use in signatures.  So my question is this:  What possible solutions are there for me to make my GP roster page look (somewhat) like the site I showed you with the ribbons seperated from the medals, and all stacked up neatly like that?  And, if there isn't one, what other solutions might there be?  I'm really just looking for somebody to point me in the right direction, as I have no idea where to start.  I'm guessing it will require some work (and I'm a total non-coder), but I'm willing to go out and learn what I have to (even if I have to take a class at the local jc or something), as it's pretty important to me and my guild to make this work.


 
TopBottom

536885761_Inactive (New Admin) 7/11/2004 2:26 PM EST : RE: Honorable Dead (WoW)
536885761_Inactive
Posts: 3977
Zomgawsh Poster

name="2975693">

The only way I can think to do it involves a boatload of work on the back end (for you). And believe me, it's gonna suck if you decide to implement it: more likely you'll just say “nah, way too much work”.

The profile I looked at had 39 ribbons. It was the first bio, a fleet admiral or whatever, so I'm guessing he's got most of the possible ribbons. I'll assume just for purposes of my example that there are 42 ribbons. Here's what you'd have to do:

Create a “blank” .jpg - someone with no ribbons at all. Name it:

000000000000000000000000000000000000000000.jpg

Notice there are 42 zeros in the file name. Now, for each possible combination of ribbons, create a new .jpg file that has that particular bit as a 1 instead of a zero, and put the appropriate ribbon in as part of that picture. So for example, someone who has earned just ribbon #6 would use this sig file:

000001000000000000000000000000000000000000.jpg

Someone who had earned ribbons #6, #14, and #41 would use this:

000001000000010000000000000000000000000010.jpg

And so on. I'm not good with math, so I won't even hazard a guess to the number of possible combinations of images there are. It's kinda like the lottery, I'd guess. Lots and lots. BUT... if you only had maybe 20 or 30 guild members, you could build just the images you need “right now” first (and so probably 20 or 30 images right off the bat) and then add them in when you award new medals. Eventually it'd just populate itself.

On the other hand, if you're really clever, you could write a program to create the images for you on the fly using .PHP. I'm not entirely sure how that would be implemented in a sig file though. Or maybe you could just write the program to build all the images for you one time and then be done with it, and then just have your members use the file name convention described above in their sigs.

Did I mention that the effort involved makes this pretty much not worth doing? (The sad thing is, I know that if this was something I needed for my own site, I'd probably do it anyway, even though it's so much work it's not worth doing.)

TopBottom

Harmond (Guild Admin) 7/11/2004 2:42 PM EST : RE: Honorable Dead (WoW)
Harmond
Posts: 1607
Zomgawsh Poster

YIKES! 

Yeah, I'll probably do it, if I can't come up with something else.

How much more feasable would that .PHP thing be if it didn't have to be in a signature.  Say, if it were in a blank html box (or whatever) that was somehow imbedded in member's individual profiles.  (Speaking totally out of my ass, as I have no idea what I'm even talking about.  Yeah, I know I'd be going the extra mile here, but I might as well learn something.)


 
TopBottom

536885761_Inactive (New Admin) 7/11/2004 4:17 PM EST : RE: Honorable Dead (WoW)
536885761_Inactive
Posts: 3977
Zomgawsh Poster

name="2976114">

If it were in a blank HTML box (similar to an embedded page content box) it would be VERY easy to do in PHP. The code would go a little something like this:

<?php
 $medals= $_REQUEST['medals'];

$medalstring = "";
$imagesURL = "http://www.something.com/medals/";
$medalALTtext = array('Medal of Honor', 'Officer Medal', 'Leader Medal', 'Another Medal', 'Get the Idea Yet?');


for($x = 0; $x < strlen($medals); $x++) {
 $this = substr($medals, $x, 1);
 if $this = "1"{
  $medalstring .= "<img src=\"$imagesURL" . "$x" . ".jpg\" alt=\"$medals[$x]\">";
 }
}
  
echo ($medalstring);
?>

To make that work, you'd need to have numbered images (starting with 0.jpg, not 1.jpg) and put them in the appropriate folder on your webspace (the $imagesURL above). You'd put the ALT text for each medal in the array called $medalALTtext. After that, folks would just have to call your .php page with the following URL argument: http://www.something.com/medals.php?medals=01000010100011100001010101. If they drop a 1 in the wrong spot, they'll get the wrong medal, but if they leave some off at the end of the string, they just won't get those medals (it'll be treated as a zero, not a one). For example, someone with the following:

medals.php?medals=01000010

would still get the second and seventh medals, but if there were other medals awarded them that had higher numbers, they wouldn't be displayed. (For that reason, put your most common medals lower in the order; that way, folks with only the first, say, 10 medals or so, could shorten their URL.)

Easy code, but it doesn't necessarily solve your particular problem. Maybe if the signature included your page in an inline frame or something, it might work, but I don't use inline frames so I come up dry offering assistance in that area.

TopBottom

Harmond (Guild Admin) 7/11/2004 4:47 PM EST : RE: Honorable Dead (WoW)
Harmond
Posts: 1607
Zomgawsh Poster

Wow.  Thanks man!  A .PHPing I shall go!  I even (sorta) understand that. 

I'm willing to give up on them being in the individual members' signatures, as long as I can somehow set them apart from medals, and make them look like an actual military style “stack” of ribbons.

It'll probably take me a minute (ha) or two to iron this out, but I'll let you know how it goes!  Thanks again!


 
TopBottom

536885761_Inactive (New Admin) 7/11/2004 7:30 PM EST : RE: Honorable Dead (WoW)
536885761_Inactive
Posts: 3977
Zomgawsh Poster

I'm willing to give up on them being in the individual members' signatures, as long as I can somehow set them apart from medals, and make them look like an actual military style “stack” of ribbons.


You might want to add code then to insert a line break (<br>) after every so many ribbons, then. Add the stuff in bold:

 $linecount = 0;
 if $this = "1"{
  $medalstring .= "<img src=\"$imagesURL" . "$x" . ".jpg\" alt=\"$medals[$x]\">";
  $linecount = $linecount+1;
  if ($linecount = 7){
    $linecount = 0;
    $medalstring .=“<br>“;
  }
 }

It won't be perfect but it'll at least keep it from being just one big single line of medals.
TopBottom

536885761_Inactive (New Admin) 7/11/2004 7:32 PM EST : RE: Honorable Dead (WoW)
536885761_Inactive
Posts: 3977
Zomgawsh Poster

Oops; move the $linecount = 0; line to before the beginning of the loop, like right after $medalstring=””;
TopBottom

Harmond (Guild Admin) 8/6/2004 9:32 AM EST : RE: Honorable Dead (WoW)
Harmond
Posts: 1607
Zomgawsh Poster

Well, while the above dilemma, for me at least, has been an exercise in self-abuse.  I'm still trying to learn enough about what Wiltan said to make it do me some good.  In the mean time, I've just put the final touches on a major graphic overhaul.  Let me know what you think!

Honorable Dead


 
TopBottom

Deleted User (New Admin) 8/6/2004 3:35 PM EST : RE: Honorable Dead (WoW)

Deleted User
Posts: 0

Wow that looks great. Your Tab images lok awesome. Like chess pieces. Love your border images also. Can't wait to see a custom roster.
TopBottom

Harmond (Guild Admin) 8/7/2004 8:33 AM EST : RE: Honorable Dead (WoW)
Harmond
Posts: 1607
Zomgawsh Poster

Thanks!


 
TopBottom

Admins Online
There are   members online.
So-and-so has logged on!
%title%
%message%