Welcome Guest [Log In] [Register]
We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
[CODE] Remove Portal; A little code to remove the portal link
Topic Started: Nov 2 2003, 11:20 AM (18,570 Views)
Flash77
Member
 *  
It removes the portal link, not the portal
The link will show up for a second but it will 'vanish'
Use it in Skinning & Styles -> Board Wrappers -> Footer
Code:
 

<script language=javascript>
<!--
function change(item,item2) {
var range = document.body.createTextRange();
range.collapse(true);
if (location.href.indexOf("action=") != -1 ) {
return false;
} else {
while (range.findText(item)) {
range.text=item2;
range.collapse(false);
}
}
}

change("Portal"," ");


// -->
</script>




Some time ago, I made one that works not only in IE, but in Firefox, Netscape, Mozilla for sure, and probably Opera etc. too.
Here it is:

Code:
 
<script type='text/javascript'>
<!--
// remove portal link
// code by Stefan

e = document.getElementById('submenu')
if (e && e.tagName == 'TABLE') {
e = e.rows[0].cells[0].getElementsByTagName('A')
for(n = 0; n < e.length && !e[n].href.match(/act=site/); n++);
if (e[n]){
pnt = e[n].parentNode;
for (nod = e[n].previousSibling;  nod && nod.tagName != 'A'; nod = nod.previousSibling);
for (;nod.nextSibling && nod.nextSibling.tagName != 'A'; pnt.removeChild(nod.nextSibling));
pnt.removeChild(nod.nextSibling)
}}

// -->
</script>

Admin CP->Board Wrappers->Header & Body, below <% BOARD HEADER %>

Stefan
Offline Profile Quote Post Goto Top
 
Scooter22
Member
 *   *   *   *  
Who would want to remove this?
Offline Profile Quote Post Goto Top
 
TidalWave
NU MA, NU MA IEI!
 *   *  
Scooter22
November 4, 06:11 PM
Who would want to remove this?

I would. I've been using a code like that for about a week now. Here's the code I'm using. It also gets rid of that little dot next to the link.
Code:
 
<script language=javascript>
<!--
function change(item,item2) {
var range = document.body.createTextRange();
range.collapse(true);
if (location.href.indexOf("action=") != -1 ) {
return false;
} else {
while (range.findText(item)) {
range.text=item2;
range.collapse(false);
}
}
}

change("· Portal","");

// -->
</script>
Offline Profile Quote Post Goto Top
 
XJONX
Member Avatar
xTALK S**T GET HITx
 *  
Quote:
 
Who would want to remove this?

well some ppl dont want portals on they site :D
Offline Profile Quote Post Goto Top
 
Scooter22
Member
 *   *   *   *  
Well alot of us do.
Offline Profile Quote Post Goto Top
 
James
Member Avatar
Live to Dream
 *   *   *   *   *   *   *  
Code:
 

<script language=javascript>
<!--
var range = document.body.createTextRange();
range.collapse(true);
while (range.findText("· Portal")) {
range.text="";
range.collapse(false);
}
// -->
</script>


Would do the same thing and takes up a lot less space ;)
Offline Profile Quote Post Goto Top
 
Andrew
Android Kikaider
 *  
Great! I needed that, I messed up my portal pretty badly plus I don't really want it.
Offline Profile Quote Post Goto Top
 
TidalWave
NU MA, NU MA IEI!
 *   *  
webworldx
November 6, 10:15 AM
Code:
 

<script language=javascript>
<!--
var range = document.body.createTextRange();
range.collapse(true);
while (range.findText("· Portal")) {
range.text="";
range.collapse(false);
}
// -->
</script>


Would do the same thing and takes up a lot less space ;)

If you're only changing the portal link, yeah, but I've got a bunch of other stuff changing with the code Flash77 posted. I took out the "The Moderating Team" link at the bottom of the index as I already have a link to the staff page on my website in the header. I also took out the "Delete cookies" link and changed the "Admin CP" link to "Administration Panel". Then I took out the Mod CP link because the only advantage I see in it, since I have all of the user groups set to "avoid moderation queue", is that you could use it to mass-delete a bunch of posts in the case of a spam attack, and even then, you could just manually type in the the actual URL of the Mod CP.
Offline Profile Quote Post Goto Top
 
Biomech
Member Avatar
a.k.a Bio...
 *   *   *   *  
Nice code! ;)
Offline Profile Quote Post Goto Top
 
syringex
Member
 *  
do you know how to add links next to the portal link?
Offline Profile Quote Post Goto Top
 
JKilla
Member
 *  
Not one of these links is working for me. Can anyone help?

Thanks

John
Offline Profile Quote Post Goto Top
 
zodiak
Member
 *  
How do you remove the Help, Search, Member and Calender links as well?
Offline Profile Quote Post Goto Top
 
GlitchX
Member Avatar
non-official IF Hobo
 *   *  
I'm not sure but I think this is how
Code:
 

<script language=javascript>
<!--
function change(item,item2) {
var range = document.body.createTextRange();
range.collapse(true);
if (location.href.indexOf("action=") != -1 ) {
return false;
} else {
while (range.findText(item)) {
range.text=item2;
range.collapse(false);
}
}
}

change("· Portal","");
[COLOR=red]change("· blah","blah2");[/COLOR]
// -->
</script>


What I don't like about this is that I think whenever anyone says "Portal" on your forum, it doesn't appear...
Offline Profile Quote Post Goto Top
 
RVD_RAW88
Unregistered

Code:
 
<script language=javascript>
<!--
var range = document.body.createTextRange();
range.collapse(true);
while (range.findText("· Portal")) {
range.text="";
range.collapse(false);
}
// -->
</script>


im using this one, but its not working... whats happening, where do i put it?
Quote Post Goto Top
 
kslayer
Member
 *  
but can we remove the ads in the portal??
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · Code Snippets · Next Topic »
Add Reply