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! > Dealing with the new "Custom jQuery Code" box
Mottie (MVP) 1/17/2009 8:43 AM EST : Dealing with the new "Custom jQuery Code" box
GuildPortal MVP
Mottie
Posts: 3883
Zomgawsh Poster

This thread is now outdated as the script below has been moved to the top.

Please ignore this thread.



I want to start by saying I dislike this new custom code box for several reasons:
  1. I tried to paste a simple function into the top box and when I reloaded my page I was welcomed with a completely blank white page and no way to get to the control panel... luckily I had the link to the control panel saved.

  2. You can't use jQuery's document ready function in other content boxes because it doesn't get loaded until the bottom of the page. This simple fact has broken many of the scripts I have written.

  3. Adding a function to the jQuery "Document.Ready Event Code" "Functions" box will make it load on every page. Which results in errors if your functions aren't on that page.
So, for now, completely ignore the custom jQuery code box. Use the code below to work around this annoyance, and yes it is the "hack" that IceHeart posted in this thread with one addition, but it doesn't fix all the problems. At least the image gallery and shout box work now. Below the code is a list of modules that aren't currently working.

Just for reference, the new custom jQuery code box can be found as follows: Control Panel > Guild Settings > Advanced > Custom JQuery Code.

PAID SITE:


Paste the following into your Banner Area and completely ignore the new Custom jQuery Code box.

<script src="Cms/jquery-latest.js" type="text/javascript"></script>
<script src="Cms/addins/jquery.query-1.2.3.js" type="text/javascript"></script>
<script src="Cms/addins/facebox/facebox.js" type="text/javascript"></script>
<script src="Cms/jquery_filterable-1_0_min_js.js" type="text/javascript"></script>
<script src="Cms/jquery.growl.js" type="text/javascript"></script>
<script src="Cms/addins/cyclelite/jquery.cycle.lite.min.js" type="text/javascript"></script>
<script src="Cms/jquery.watermark.pack.js" type="text/javascript"></script>
<script src="Cms/AxsBundle011609.js" type="text/javascript"></script>
<script src="dtips.js" type="text/javascript"></script>

FREE SITE:


I hate to say it, but you'll need to paste the above code on to every page of your site. You can add it a free form text/HTML content box as close to the top left corner of your site as you can get.

What I did was made a free form text/HTML box named "Code" in the left colum, then moved it to the top of the column. The box is hidden on my test-site using custom content box HTML that adds an ID to the content box (posted here), then add this CSS to the Custom StyleSheet:

#box_Code {display:none;}

BROKEN MODULES:

These modules are known to not work with this hack, I will be working on them and I will update this post accordingly. If you find any additional modules that don't work, please post them in this thread.

 Image Gallery Fixed - updated in the post
 Progression Box v3 Broken
 Raid Point Sorting Broken (still)

Edit(1/17/2009): I meant banner area
Edit (1/19/2009): greyed out the post... don't follow these directions
TopBottom

IceHeart. (Guild Admin) 1/17/2009 12:45 PM EST : RE: Dealing with the new "Custom jQuery Code" box
IceHeart.
Posts: 110
Posts With Wolves

Thanks Mottie. yep.. not very nice.. I had the same problem u had with blank page on my own test site. Luckily I was messing around there and NOT in my main one..

Er.. one question.. you mention
Paste the following into your Header Area


I take it you mean the Banner Area / Custom HTML ? just to clarify..
(because as far as I know we have no access to the actual <head> )

Cheers,
-Ice

TopBottom

Mottie (MVP) 1/17/2009 3:43 PM EST : RE: Dealing with the new "Custom jQuery Code" box
GuildPortal MVP
Mottie
Posts: 3883
Zomgawsh Poster

Hi IceHeart!

LOL yep you're right I did mean Banner Area... guess I was just frustrated from all the changes I had to make to my sites.

Thanks for watching out for me
TopBottom

chefricochet (Guild Admin) 1/17/2009 5:30 PM EST : RE: Dealing with the new "Custom jQuery Code" box
chefricochet
Posts: 208
Fingers of Fury!

 ok iceheart and mottie, can you make any suggestions how I can back my control panel? im still locked out! Thanks

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

Darril Titan (New Admin) 1/18/2009 12:05 AM EST : RE: Dealing with the new "Custom jQuery Code" box
Darril Titan
Posts: 656
Zomgawsh Poster

Thanks for the work around. 
TopBottom

IceHeart. (Guild Admin) 1/18/2009 2:40 AM EST : RE: Dealing with the new "Custom jQuery Code" box
IceHeart.
Posts: 110
Posts With Wolves

chefricochet said:
 ok iceheart and mottie, can you make any suggestions how I can back my control panel? im still locked out! Thanks


Trying to keep things on topic.. replying to you in the original thread
Cant access my control panel [Codemonkey]!!!
TopBottom

IceHeart. (Guild Admin) 1/19/2009 7:43 AM EST : RE: Dealing with the new "Custom jQuery Code" box
IceHeart.
Posts: 110
Posts With Wolves

As of the time of this note, the core JQuery script calls have been relocated to the <head> of the pages, as they should be, so there is no need to force call them in the banner anymore, and most JQuery/javascript functionality *should* be back to normal.
Good for that!

From the Service Updates:

01.19.2009 Deploying hotfix that will address editing content and control panellink behavior problems on some sites. This will be on the productionweb servers within the next 30 minutes.


Funny enough this also renders the 'new' Custom JQuery window even more useless; as noted before, the window generates code for *all* pages.. when typically, each page has distinct and different calls, so until this is improved, I totally agree with Mottie's suggestion.. best just not use that window at all for now...
TopBottom

Mottie (MVP) 1/19/2009 8:13 AM EST : RE: Dealing with the new "Custom jQuery Code" box
GuildPortal MVP
Mottie
Posts: 3883
Zomgawsh Poster

The hotfix today has fixed most of the problems, but one line of code was left out.
<script src="dtips.js" type="text/javascript"></script>
The tooltips are gone! This can't be added into the header since the script requires the tooltip box (which is still in place) to be defined before the code. So, add the above line into your FOOTER... the header is still above the tooltip box and will produce an error.

TopBottom

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