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! > Adding Icons to your Calendar
chefricochet (Guild Admin) 10/3/2008 5:25 AM EST : RE: Adding Icons to your Calendar
chefricochet
Posts: 209
Fingers of Fury!


  Ok, mottie; Here's MY dilemma!

                   
f4ff5916.gif image by chefricochet



   I would like to see just the icon for the small event box!
 So, get that rabbit fed, dust off your top hat, and wave your magic wand!

magichatandbunny.gif image by chefricochet

Laggin
If you love something, set it free! If it doesn't come back; hunt it down, and kill it!
TopBottom

Eph (MVP) 10/3/2008 7:56 AM EST : RE: Calendar Icons v1.1
GuildPortal MVP
Eph
Posts: 596
Zomgawsh Poster

Mr_Apocalypse said:
I used the second script that includes the events box images, but I cant get my test image to appear. It shows up in the calander just not my upcoming events box on my main page.

AmI missing something. I have the scripts loaded into my footer


I am having the same problem, but I have no idea what you mean by the following Mottie.

Mottie said:
Secondthing is on your side. It looks like you used custom content box HTML?The script needs to find a "ContentBox" class to find the Events box.So you'll need to go back to your custom content box HTML and add thisclass to the top most table, or you could add a <divclass="ContentBox"> around the whole thing. I wish there was anotherway to find the events box, but GuildPortal doesn't add an ID for itlike it does with the calendar.

<table width="100%" border="0" cellpadding="0" cellspacing="0" class="ContentBox">


What goes where? lol sorry I know a lil about a lil when it comes to this stuff.
TopBottom

Mottie (MVP) 10/3/2008 8:05 AM EST : RE: Calendar Icons v1.1
GuildPortal MVP
Mottie
Posts: 3883
Zomgawsh Poster

The script looks through the HTML for a "ContentBox" class definition. This class is only defined for each content box on your page. This is the best and easiest way for the code to find the "Events" box. GuildPortal is set up this way by default, but if you add custom content box HTML, sometimes this gets missed.

So all that needs to be done is add that class to the HTML

Eph, I'll take a peek at your site and see if this is the same issue.

Chef, if you don't want the main calendar icons, then just remove these lines from the script:
 // Main Calendar
 $(".CenterContentZone").find("#tblMonthlyCalendarTable").find(".NormGridRow,.AltGridRow").each(function() {
  addIcons($(this),"right",22,22);
 });
TopBottom

Mr_Apocalypse (New Admin) 10/3/2008 12:15 PM EST : RE: Calendar Icons v1.1
Mr_Apocalypse
Posts: 190
Posts With Wolves

I dont think I have a custom content box html, The only CSS I have added to the page is scripts, in the header and footer, that you wrote and I cut and pasted with the apropriate changes for my site, and all the fancy graphics are just loaded via the normal GP interface
TopBottom

Mottie (MVP) 10/3/2008 1:01 PM EST : RE: Calendar Icons v1.1
GuildPortal MVP
Mottie
Posts: 3883
Zomgawsh Poster

Hmmm ok, if that's the case... I'll work on it.
TopBottom

Mottie (MVP) 10/3/2008 5:51 PM EST : RE: Calendar Icons v1.1
GuildPortal MVP
Mottie
Posts: 3883
Zomgawsh Poster

Ok I fixed the script!

The script is now updated in the original post. The actual changes are shown below.
  • Removed:  var eventsBoxTitle = "Events";
  • Replaced Events Box script:

     // Events Box
     $("a").each(function() {
      if ($(this).attr("title").match("details of this event on the Calendar")) {
       addIcons($(this).parent(),"right",22,22);
      }
     });
Hopefully, this will now work for all sites!
TopBottom

chefricochet (Guild Admin) 10/4/2008 5:03 AM EST : RE: Calendar Icons v1.1
chefricochet
Posts: 209
Fingers of Fury!

Mottie, I was trying to get the small event box on my home page to just show the icons for posted events. I am stuck on this one! As it is a content box, and the css looks for the appropriate script, I did not want to mess things up by adding what you posted, and besides. I only want the icon for that box, as my members are getiing in the habit of actually going to the event room!
Please help, and I'll send the kitty a fresh piece of Tuna!
             
cf8c8756.gif image by chefricochet
     0d775fb3.gif image by chefricochet

Laggin
If you love something, set it free! If it doesn't come back; hunt it down, and kill it!
TopBottom

Mr_Apocalypse (New Admin) 10/4/2008 11:49 AM EST : RE: Calendar Icons v1.1
Mr_Apocalypse
Posts: 190
Posts With Wolves

Thanks mottie, the script works perfectly. you are awsome.

I have one question about image size.

Is there a code that can be put in place to set an image to display at a percentage of its actual size rather than a hard number of pixels? The images I want to use for the events are the same ones that I use for medals and they all vary in size and few are square.
TopBottom

Mottie (MVP) 10/4/2008 2:31 PM EST : RE: Calendar Icons v1.1
GuildPortal MVP
Mottie
Posts: 3883
Zomgawsh Poster

Chef: Did you want ONLY the icon? No title, date, time or person who posted? And did you want the icon clickable?... it'll take a little bit of code changing, but it is possible

Mr_Apocalypse: Actually the image size height and width can be changed in the code. For the main calendar, the code looks like this:
addIcons($(this),"right",22,22);
The first 22 is the image width and the second 22 is the image height. To make these a percentage, choose either the height or width and add it there (make sure you have quotes around it). Here is an example of changing the image width using percentages.
addIcons($(this),"right","30%","");
Note:
  • Using 100% width will make the image width fit the box that it is contained within (i.e. 100% does not equal the 22 pixel width of the image. Play around with it and you'll see what I mean).
  • You can only use a percentage for either the height or the width, not both. The browser will only use the first percentage it finds. Use double quotes for the other parameter like in the example above.
  • You can set the width to "100%" and the height to "10" and the result would be an image that is very wide and only 10px tall.
  • Check out this web page for more info.
TopBottom

Ciannon (Guild Admin) 10/5/2008 3:10 PM EST : RE: Calendar Icons v1.1
Ciannon
Posts: 2000
Zomgawsh Poster

So Mottie... Where's our Age of Conan version??? j/k.


Epic quotes from Coils:

"lol out of money. I bought my system and forgot to factor in the cost of the game." - Coils 7/14/2008
"No money totaled my car. Cant play. Probly selling my computer. Adios." - Coils 8/25/2008


TopBottom

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