inherit
Beware the ever changing head
33588
0
Nov 18, 2023 0:32:44 GMT -8
Ross
19,039
November 2004
elindir
|
Post by Ross on Feb 4, 2007 10:21:10 GMT -8
- Hide the post area in one board
First of all, the post area refers to this part of the page - [Click]
If you want to remove this for any reason, then add these two lines of code. Make sure you put them in the board header/footer and not the main or global header/footer.
Board Header Board Footer <div style="display:none;"> </div>
|
|
inherit
Beware the ever changing head
33588
0
Nov 18, 2023 0:32:44 GMT -8
Ross
19,039
November 2004
elindir
|
Post by Ross on Feb 4, 2007 10:21:39 GMT -8
- Center category titles
Add this to your Main Header, it will center the Category titles as well as the Info Center titles
<style type="text/css"> <!-- .catbg { text-align: center; } --> </style>
|
|
inherit
Beware the ever changing head
33588
0
Nov 18, 2023 0:32:44 GMT -8
Ross
19,039
November 2004
elindir
|
Post by Ross on Feb 4, 2007 10:22:07 GMT -8
- Can I put a border around my forum?
A few people have been inquiring as to how they can encase their forum inside a table to give a border-like effect. Examples of sites which do this are SSD and Temporal Reality. Well in actual fact it is a relatively simple process. Just put the following pieces of code in your Global Header and Footer. Edit the red to your image URLs and the blue to the desired width
Global Header
<div style="text-align: center;"> <div style="width: 920px; margin: auto;"> <img src="Head Image URL" style="vertical-align: bottom;" /> <div style="background-image: url(Main Background Image URL);" />
Global Footer
</div> <img src="Base Image URL" /> </div> </div>
|
|
inherit
Beware the ever changing head
33588
0
Nov 18, 2023 0:32:44 GMT -8
Ross
19,039
November 2004
elindir
|
Post by Ross on Feb 4, 2007 10:22:25 GMT -8
- Change the Color of Horizontal Rules (Lines) in Posts
A recent update to the ProBoards software has changed the color of the horizontal rules, they are the black lines that appear above and below this post. There have always been there but are just now more visable. To change their color, you can add this code to your Global Header. Change the bits in red with the new HEX color you would like to use:
<style type="text/css"> <!-- hr { color: #FFFFFF!important; background-color: #FFFFFF!important; } --> </style>
|
|
inherit
Beware the ever changing head
33588
0
Nov 18, 2023 0:32:44 GMT -8
Ross
19,039
November 2004
elindir
|
Post by Ross on Feb 4, 2007 10:22:55 GMT -8
- Resize your Forum Width
Often referred to as making the forum look central, although all it does is change the width of key tables. Goes in your Global Footer. Just edit the red number to your desired width:
<script type="text/javascript"> <!-- /* resize forum width - open source */ var table = document.getElementsByTagName( 'table' ); for(i=0; i<table.length; i++) { if(table.item(i).width == '92%') { table.item(i).width = '728px'; } } //--> </script>
|
|
inherit
Beware the ever changing head
33588
0
Nov 18, 2023 0:32:44 GMT -8
Ross
19,039
November 2004
elindir
|
Post by Ross on Feb 4, 2007 10:23:37 GMT -8
- Center your background image
Add this to your Global Header
<style type="text/css"> <!-- body { background-position: center; background-repeat: repeat-y; } --> </style>
|
|
inherit
Beware the ever changing head
33588
0
Nov 18, 2023 0:32:44 GMT -8
Ross
19,039
November 2004
elindir
|
Post by Ross on Feb 4, 2007 10:24:49 GMT -8
- Add another row of menu text links?
Place this code into your global header.
<script type="text/javascript"> <!--
function insertTxtLink(l, t, n){ var nCell = document.getElementsByTagName("td").item(5);
if(!arguments.callee.done || n){ nCell.firstChild.appendChild(document.createElement("br")); arguments.callee.done = true; }
if(l && t){ var link = document.createElement("a"); var txt = document.createTextNode("[" + t + "]");
link.href = l; link.appendChild(txt); nCell.firstChild.appendChild(document.createTextNode(" ")); nCell.firstChild.appendChild(link); } }
insertTxtLink("http://proboards.com", "ProBoards");
//--> </script>
To add a link, you need to call the insertTxtLink function, which supports 3 arguments.
insertTxtLink(Link, Text, New Line);
The 3rd argument is optional (blue). If you wish to add another line of links, just pass "true".
Like this...
insertTxtLink("http://proboards.com", "ProBoards"); insertTxtLink("http://google.com", "Goole", true);
|
|
inherit
Beware the ever changing head
33588
0
Nov 18, 2023 0:32:44 GMT -8
Ross
19,039
November 2004
elindir
|
Post by Ross on Feb 4, 2007 10:27:17 GMT -8
- Disable right click
Place either of these codes into the global header.
For everything use this...
<script type="text/javascript"> <!--
// Disable Right Click
document.oncontextmenu = function(){ return false; }
//--> </script>
For images only, use this...
<script type="text/javascript"> <!--
// Disable Image Right Click
var img = document.getElementsByTagName("img"); for(i = 0; i < img.length; i ++){ img.item(i).oncontextmenu = function(){ return false; } }
//--> </script>
Please bear in mind that these codes are not fool-proof. There are ways around them. They may also hinder a number of users trying to right click for legitimate reasons.
|
|
inherit
Beware the ever changing head
33588
0
Nov 18, 2023 0:32:44 GMT -8
Ross
19,039
November 2004
elindir
|
Post by Ross on Feb 4, 2007 10:27:43 GMT -8
- Hide your [shoutbox, cbox, chatroom etc.] from Guests
This will enable you to hide anything currently in your Header/Footer from guests:
<span id="hidden_content" style="display: none;"> Place any content to hide here, eg. your shoutbox code. </span> <script type="text/javascript"> <!-- if(pb_username != 'Guest') document.getElementById('hidden_content').style.display = ''; //--> </script>
|
|
inherit
Beware the ever changing head
33588
0
Nov 18, 2023 0:32:44 GMT -8
Ross
19,039
November 2004
elindir
|
Post by Ross on Feb 4, 2007 10:28:53 GMT -8
- Expand / Collapse Content
Just a little something which will cause certain text to expand/collapse when a button is clicked. Other coders can feel free to edit it as necessary. Just place the code anywhere in your Header or Footer that you want the text to be. For example, you may want to place it within an info table.
<script type="text/javascript"> <!-- var speed = 100; var min_height = 20;
var obj = false; var max_height = false; function show_hide(link, id) { obj = document.getElementById(id); max_height = parseInt(obj.style.height); if(obj.style.display == '' && max_height > min_height) { shrink(); link.innerHTML = 'Show'; } else { expand(200); link.innerHTML = 'Hide'; } return false; } function shrink() { if(parseInt(obj.style.height) > min_height && parseInt(obj.style.height) <= max_height) { obj.style.height = parseInt(obj.style.height) - 10 +'px'; setTimeout('shrink()', speed); } } function expand(height) { if("undefined" != typeof height) max_height = height; if(parseInt(obj.style.height) < max_height) { obj.style.height = parseInt(obj.style.height) + 10 +'px'; setTimeout('expand()', speed); } } //--> </script> <div id="my_div" style="width: 500px; height: 200px; overflow: hidden;"> Content Here<br /> Content Here<br /> Content Here<br /> Content Here<br /> Content Here<br /> Content Here<br /> Content Here<br /> Content Here<br /> Content Here<br /> Content Here </div> <a href="#" onclick="show_hide(this, 'my_div');">Hide</a>
|
|
inherit
Beware the ever changing head
33588
0
Nov 18, 2023 0:32:44 GMT -8
Ross
19,039
November 2004
elindir
|
Post by Ross on Feb 4, 2007 10:29:10 GMT -8
- Replace any Text with any Other Text (SwitchIt)
What this code does is it will replace any text on your forum with any other piece of text. For example, if you want to use the word "User" instead of "Member" or "Visitor" instead of "Guest". A couple of examples on how to edit the code have been done for you, just edit/repeat those lines as necessary.
<script type="text/javascript"> <!--
function switchIt(item, item2){ if(!location.href.match(/=headersfooters2/i)){ if(document.createTreeWalker && typeof Node != "undefined"){ Node.prototype.switchTxt = function(r, rp){ function testNode(node){ if(node.data.match(new RegExp(r, "ig"))){ return NodeFilter.FILTER_ACCEPT; } else { return NodeFilter.FILTER_SKIP; } } var nTree = this.ownerDocument.createTreeWalker(this, NodeFilter.SHOW_TEXT, testNode, false); while(nTree.nextNode()){ nTree.currentNode.data = nTree.currentNode.data.replace(new RegExp(r, "gi"), rp); } } document.body.switchTxt(item, item2); } else if(typeof document.body.createTextRange != "undefined"){ var range = document.body.createTextRange(); range.collapse(true); while(range.findText(item)){ range.text = item2; range.collapse(false); } } } }
switchIt("Guest", "Visitor"); switchIt("Member", "User"); switchIt("Word", "Word to change to");
//--> </script>
Can go in header or footer, depending on what you are changing so long as this code comes after what it is you want to change. If you're unsure, place it in the Global Footer
|
|
inherit
Beware the ever changing head
33588
0
Nov 18, 2023 0:32:44 GMT -8
Ross
19,039
November 2004
elindir
|
Post by Ross on Feb 4, 2007 10:34:32 GMT -8
- Can I remove the copyright from a code?
Nope, not without permission from the creator of the code. Copyrights are there to give credit to the coder, some of the codes found in the database take a long time to create, so it is only right that the creator adds a copyright. If you remove a copyright from a code, you will be reported, which could lead to your forum being deleted.
|
|
inherit
Beware the ever changing head
33588
0
Nov 18, 2023 0:32:44 GMT -8
Ross
19,039
November 2004
elindir
|
Post by Ross on Feb 4, 2007 10:40:16 GMT -8
- Can I repost codes at another forum?
Not without permission from the creator of the code. Some codes specifically specify where the code is allowed to be posted, for example they may say it is "Open Source" or that it "May be Reposted". But when in doubt always ask the code creator.
However, many coders, myself included, will say no to these requests. This can be as personal preference or in order to control where each code is posted so that modifications can be made to it when necessary. If you're wanting to start-up your own coding forum but can't code yourself, then my advice would be to not do it unless you know someone who can code. I don't know of any successful coding forum which rely upon other coders allowing you to repost their codes.
If you are trying to help someone who needs a code and it isn't in the database here, link them to it, but let them know if they need to login/register to view it.
|
|
inherit
Beware the ever changing head
33588
0
Nov 18, 2023 0:32:44 GMT -8
Ross
19,039
November 2004
elindir
|
Post by Ross on Feb 4, 2007 11:13:18 GMT -8
- How come this forum has Sub-Sub Boards. Can I do it?
This question has came up a few times now, and the answer is that you can't create sub sub boards, or sub boards that go as deep as you like. Although there were a few codes to do it, they have been banned. If Pat wanted to allow the user to have sub boards as deep as they like, then he would have done it. For those wondering why we have sub sub boards here, this was done server side by Martyn for a reason.
|
|
inherit
Beware the ever changing head
33588
0
Nov 18, 2023 0:32:44 GMT -8
Ross
19,039
November 2004
elindir
|
Post by Ross on Feb 4, 2007 11:13:47 GMT -8
- How to find the 'Skin/Group ID'
There are a number of ways you can find the ID of either a skin on your forum or a member group on your forum.
To find the Skin ID, I find this is the simplest method:
- Go to modify your profile. Select the skin you want to find the ID of and click 'Save Changes'.
- Next, copy this into your address bar (where you normally type URLs):
javascript:alert(pb_skinid);
- Press the Enter/Return key. The Skin ID is the number that appears in the pop-up.
To find a Group ID, I find this is the simplest method:
- Go to modify your profile. Select the member group you want to find the ID from the drop down menu.
- Next, copy this into your address bar (where you normally type URLs):
javascript:alert(document.modifyForm.membergroup.value);
- Press the Enter/Return key. The Group ID is the number that appears in the pop-up.
Notes: Each ID is a unique number, it's not the name of the skin/name of the group. When you use the "Set Default Skin" feature, some Skin IDs will change since the default skin always uses the ID "1" When you delete a skin, you lose the Skin ID associated with it. ie. If you delete skin #2 and then create another skin, your IDs will be 1 and 3; 2 would have been deleted with skin #2.
|
|