What it does: adds a new page and a link next to the portal and hides the board too! You can also make the page members only (see bottom of post)
PREVIEW: Click Here, just click the link next to the portal
Ok first of all the link next to the portal. THIS CODE WAS NOT CREATED BY ME!
- Quote:
-
<script type='text/javascript'>
<!--
// add link on the portal side of the submenu
// code by ticlo/Stefan
function addSubmenuLink(url, text, blank) {
var e
e = document.getElementById('submenu')
if (e && e.nodeName == 'TABLE') {
e.rows[0].cells[0].innerHTML += ' · <a href="' + url + '"' + (blank ? ' target="_blank"' : '') + '>' + text + '</a>'
}}
addSubmenuLink("YOURSITE/index.php?act=mypage", "Custom Page")
// -->
</script>
Change the
blue to your site
Change the
red to the name of the page you want
Change the
purple to the name of the link you want
Replace the <% BOARD %> tag with this
- Quote:
-
<div id="board"><% BOARD %></div>
Now put what you want on that site where you want it and then put this around it
- Quote:
-
<div id="custompage">
.
.
.
. The stuff to go on the custom page here!.
.
</div>
<div id="notloggedin">
PUT SOME CODE HERE THAT PEOPLE WILL SEE IF THEY ARE NOT LOGGED IN!
</div>
<script>
notloggedin.style.display="none";
var userlinks = document.getElementById('userlinks');
var user = userlinks.getElementsByTagName('A')[0].innerHTML;
if(userlinks.innerHTML.match(/Guest/)){
namet = "guest";
}
else if(userlinks.innerHTML.match(/Logged/)){
namet = "logged" ;
}
custompage.style.display="none";
if (location.href.match("act=what you put in the red before") && namet="logged") {
custompage.style.display="block";
board.style.display="none";
notloggedin.style.display="none";
}
else if (location.href.match("act=what you put in the red before") && namet="guest") {
notloggedin.style.display="block";
custompage.style.display="none";
board.style.display="none";
}
else {
custompage.style.display="none";
}
</script>
Just change the orange words to what you want as an id (no spaces obviously, they all have to be the same)
Change the red to what you put in the red before
Delete whats in green if you want anyone to view your page, keep it if you want only members
Now click the link next to the portal and you will be taken to you page!
EDIT:NOT WORKING UNDER RECONSTRUCTION!