Hiding one or more content box borders

Limitations

This script will ONLY HIDE the box borders, I'll have to work on another version to replace the borders with CSS you defined - it's going to be a lot of work, so don't expect that any time soon. But you can always replace the background image or change it's color.

This script looks for the Title of the box border that you want to hide, so if you tell it to hide "News" it will hide ALL box borders with "News" in the title: "News", "GuildPortal News", "Game News" and "Guild News", etc. If you only want to effect specific box border make sure you give it a unique name.

This script also looks for image names that contain "top", "bottom", "left" and "right" inside the content box. So, if you have a screen shot name "leftinthedust.jpg", it'll probably get hidden. Sorry, but you'll need to rename it if you plan on using this.

If it looks like the script didn't do anything to your site, then you may have used Custom HTML for your box borders. Read the instructions below in the "Customizing the Script" section to see how to get around that.

Adding the Script

I recommend copying (Ctrl-C) the following code into a "Free Form Text/HTML" box on the page you want to modify - make sure you are in HTML mode () when you paste (Ctrl-V) it.

You could add it to your header or footer, but be warned, it may hide box borders you don't want changed.

Customizing the Script

Please read through the limitations of this script.

The script starts out with some CSS. Edit the colors and fonts of this CSS to match your site (in blue). If you don't want to make the background transparent, you could always pick a color, add a different color border or even a different background image.

Decide which content box borders you want to hide/modify and add the names (in red).

hideBorder("Welcome|News");

Add more than one name by adding a "|" between each title (shift-\ it's above the enter key). The example above will hide the box borders of content boxes titled with "Welcome" and content boxes titled with "News"

The names ARE NOT specific. "News" will hide borders of content boxes named "News", "GuildPortal News" and "Game News". Rename the content box if required.

The box names ARE case sensitive. "News" will get hidden, but not "news".

Hide ALL the box borders by using "#all"

Hide a COLUMN of box borders by using "#left", "#center" or "#right".

Troubleshooting the Script

If you install this script and it's not working, it's probably because you used custom box borders.

Custom CSS/HTML (from me)

First off, if you've ever used any of my custom box border HTML (this post), you'll need to add this to each box border HTML*. The script needs to see a table named "ContentBox" surrounding the entire content box. GuildPortal's default HTML is already set up this way, but I removed it in my custom version, sorry =(

* Note: I've edited my original custom HTML boxes (in most of the posts) to reflect this change. Sorry again.

Custom CSS/HTML (your own)

This script can't cover every situation, so I built in this custom images feature.

Find the file names of the specific border images that aren't being hidden

Modify the above script as follows:

hideBorder("Welcome|News","image1.gif|image2.gif")

As before, add a "|" between each image file name.

The entire URL is not required, in fact if you named your images with a similar name, just add the base name.

Example:

top left corner:

"myborders-TLCorner.gif"

top middle (repeated):

"myborders-top.gif

top right corner:

"myborders-TRCorner.gif"

The base name in this case would be "myborders", just use that in the custom image parameters like this:

hideBorder("Welcome|News","myborders")

This topic was moved from forum Working to forum Archive on 9/28/2008 6:34 AM by Mottie.

Characters: MottieMottyMortieOoshinyMotFudgems

•

Key

New posts

No new posts

New posts ( popular )

No new posts ( popular )

New posts ( sticky )

No new posts ( sticky )

New posts ( locked )

No new posts ( locked )

If your tooltips are not working or only show gibberish (raw HTML) then you are most likely missing the updated tooltip script. Add the following to your Footer Area (Control Panel > Custom HTML & Scripts > Footer Area)