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! > Where Does The Code Go?!!
Arahila (New Admin) 5/26/2010 7:30 PM EST : Where Does The Code Go?!!
Arahila
Posts: 25
Becoming Adept!

I am going completely insane with this crud. Ok, all these lovely guides but most don't tell you where to insert the code. For example this post tells you where to put the last bit of tooltip code but not the main code for the recruitment box. If I put it into a free-form text/html box here is what I get instead of the first box. If I put the code in either the Custom CSS or Additions to CSS areas, I get an error message about missing elements.

I must have a half-inch of printouts on all the various pieces, widgets, etc and most do not specify where to insert the code. Is there a default? I'm not stupid and I've done CSS and html. I am very close to just forgetting the whole thing. 
TopBottom

_Shulkie_ (Guild Admin) 5/26/2010 8:44 PM EST : RE: Where Does The Code Go?!!
_Shulkie_
Posts: 467
Fingers of Fury!

pretty much all of motties guides say exactly where to put it.. although i guess he happened to miss it with this post.. it is a large detailed one and for someone attempting to replicate this would be expected to be familiar with adding extras to guildportal

if you are running a free site - use the footer section or alternatively add a freeform html widget to specific pages and add the code there - remember in the freeform html editor to switch to raw/script mode to stop the widget interpretting it as plain text

paid sites have a few more options for where to put code i believe

the custom CSS area is for additions or overwrites of the existing CSS generated for your site - putting script there does nothing as far as i am aware
Cheers, Shulkie
TopBottom

Mottie (MVP) 5/26/2010 8:48 PM EST : RE: Where Does The Code Go?!!
GuildPortal MVP
Mottie
Posts: 3884
Zomgawsh Poster

Hi Arahila!

After looking at your page it appears that some of the code is missing. You are adding it in the correct place - inside the free form text/HTML widget. But before you paste the code into the editor, you need to switch it into "Raw/Script" mode (link in the upper right). What happens is when you are not in "Raw/Script" mode, the editor tries to clean up your code and reformat it. It sees two script tags and assumes the second one is a mistake and strips it out.

So, all you need to do is paste the code into that same free form text/HTML widget while in "Raw/Script" mode and save it.
TopBottom

Arahila (New Admin) 5/27/2010 8:59 AM EST : RE: Where Does The Code Go?!!
Arahila
Posts: 25
Becoming Adept!

Mottie and Shulkie, many thanks, this was driving me nuts.  At least I am starting to get somewhere now, but when I go to customize the recruit box, the whole thing disappears. If I read the instructions correctly I am to do this: Insert the changes shown in the example between the parens like below: recruitByTalent();

{

colorBackground: false,

defaultNeed: “High”,

death knight : “m,m,m”,

warrior : “h,h,h” (No comma on last line)

}

The code fix to make the content box titles bold ( .ContentBoxTitle { font-weight: bold } and put it in: Control Panel > Custom HTML & Script > Custom CSS > CSS Additions to Standard tab). When done, check the "Enabled" box, then click [ Save Changes]) doesn't seem to have worked, is the Custom CSS over-riding this command? And if I wanted to change the text in a content box to bold, like the recruitment box text (Class Names) how do I do that?

Been working on my shout box - can you add an image to the shout? For example, I just got my mechano-hog so the shout would be an image with a caption.

Hanging in there...
TopBottom

Mottie (MVP) 5/27/2010 6:05 PM EST : RE: Where Does The Code Go?!!
GuildPortal MVP
Mottie
Posts: 3884
Zomgawsh Poster

Hi Arahila!

Sorry, I didn't realize you had "Full Custom CSS" enabled... so yes, when you have Full Custom CSS enabled, anything you add to the "CSS Additions to Standard" is ignored. So just add the above code to the end of the Full Custom CSS section. CSS Additions to Standard was meant to add CSS to the end of CSS made by the control panel.

As for the recruit by talent script.. the options go inside the function, like this:
recruitByTalent({
 colorBackground: false,
 defaultNeed: "High",
 death knight : "m,m,m",
 warrior : "h,h,h"
});
And from looking at this post, I'm guessing you are adding script you wrote inside of MS Word? *cringe* I'm not 100% sure, but I think you should edit/update your code in a regular text editor. I think MSWord pastes "“" and "”" instead of quotes. So I recommend, just copying the code I have above and pasting that into your editor to see if it works then.

If you are going to paste stuff from MS Word into any forum use the "Paste from Word" button in the editor (it's the 6th one from the left in the top row - with a little W in it).

As for images in the shout box, I'll have to look into it.
TopBottom

Mottie (MVP) 5/27/2010 11:22 PM EST : RE: Where Does The Code Go?!!
GuildPortal MVP
Mottie
Posts: 3884
Zomgawsh Poster

Hi Arahila!

Here you go, I've added a script to replace URLs you put in the shout box with a image.
TopBottom

Arahila (New Admin) 5/28/2010 1:30 PM EST : RE: Where Does The Code Go?!!
Arahila
Posts: 25
Becoming Adept!

My bad... forgot about MS Word...

Thanks for the CSS clarification, that helps a lot.

For now I will create a "bragging box" for images but it would be awesome to be bale to put them in shouts. Wonder if we can link them...will try that and see.

Mottie - The Best There Is!
TopBottom

Mottie (MVP) 5/28/2010 2:07 PM EST : RE: Where Does The Code Go?!!
GuildPortal MVP
Mottie
Posts: 3884
Zomgawsh Poster

Hi Arahila!

You shouldn't have to make a "bragging box" because I did make a shout box script that replaces any image url with a thumbnail... I posted it above, but here you go again 
TopBottom

Arahila (New Admin) 5/28/2010 2:57 PM EST : RE: Where Does The Code Go?!!
Arahila
Posts: 25
Becoming Adept!

My bad... forgot about MS Word...   /headdesk

Thanks for the CSS clarification, that helps a lot. I saw the new script, I've been trying to post this message for an hour. Sadly, I have a few more questions (*screams echo through cyberspace*.)

1. Here I am trying to customize the Welcome User box. Your instructions say we can insert <img> so here is what I tried: var prefix = "Greetings" rightArrow = 'http://i144.photobucket.com...; No dice. Do I need it to be like this: var leftArrow = 'http://i201.photobucket.com... - Or do I need the <img src="....."> in there?

2. Is there a line of code to make the text in a single content box bold? I would like the Recruitment Box text to be bold due to the colors not showing up well. (Would it work on the nav and welcome bars too?)

3. Finally, I can't seem to get the spaces between the welcome, banner, nav bar and the page content to be the same. There is a larger space between the banner and nav bar. I am missing something in the CSS...

http://www.guildportal.com/Guild.aspx?GuildID=342141&TabID=3017818

Mottie - The Best There Is!
Dude, you should really write that book.
TopBottom

Mottie (MVP) 5/28/2010 7:06 PM EST : RE: Where Does The Code Go?!!
GuildPortal MVP
Mottie
Posts: 3884
Zomgawsh Poster

Hi Arahila!
  1. I'm not sure what you are referring to here... do you mean the Join this guild text that has left and right arrows? or something specific to the welcome box widget?

  2. You can target a single content box, but you need to be specific about which one you want targeted. Since you asked about the Recruitment tree script, you know there is an option to just use the default text color? Just set the "useClassColors"option to false:

    $(document).ready(function(){
     recruitByTalent({
     
    useClassColors: false
     });
    });

    Then you can use this CSS to style the text:

    .classIcon span { color: #000; font-weight: bold; } /* targets recruitment tree text */
    .TabBar { font-weight: bold; } /* targets tab bar text */
    .WfTopMenu
    { font-weight: bold; } /* targets top menu text */

  3. I think you want to reduce the space below your banner? Try adding this CSS:

    .BannerArea { padding-bottom: 0 }



TopBottom

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