Sign Up! Login: Password: New User? Forgot? Support
Code 
 
 
Forums 
Forums : Archive > Hiding content box borders
Mottie (SuperAdmin) 8/11/2008 6:22 AM EST : Hiding content box borders
ACK!
Mottie
Posts: 3884

0
Like

0
Dislike


*NOTE*This is an older post about how to hide content box borders. Don't bother with this post anymore as there is an easier way to do this without using javascript!! Please read "How to have a different style for each content box"


Hiding one or more content box borders

GuildPortal admin site link to the original post

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.
<style type="text/css">
.ContentBox2 { color: #ffffff; background-color: transparent; border: 0px; padding: 0px; }
.ContentBoxTitle2 { color: #ffffff; background-color: transparent; font-weight: bold; text-align: center; border: 0px; margin: 0px; padding: 0px; }
.ContentBoxBody2 { color: #ffffff; background-color: transparent; padding: 5px; }
.blank { background-color: transparent; }
</style>
<script src="http://www.axiomfiles.com/Files/243007/hideborders-v1.js"></script>
<script type="text/javascript">
hideBorder("Welcome|News");
</script>

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.

  • I uploaded the script to my guildportal files. I don't know if there is a bandwidth limit on it (it may not always be paid, but it should be there), so if you want to copy the file and upload it to your site: http://www.axiomfiles.com/Files/243007/hideborders-v1.js

  • 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 =(
  • Go to:

    Control Panel > Style & Colors > Content Boxes > Custom HTML (left side menu)

  • Into each custom HTML box (left, center and right), add this HTML to the TOP

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

  • then add this to the BOTTOM.

    </td></tr></table>

  • click Save.
* 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: Mottie Motty Mortie Ooshiny Mot Fudgems
TopBottom

 
 
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 )
 
 
Who's Online 
There are   members online.
 
 
So-and-so has logged on!
%title%
%message%