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] Last Click for Admins Only; By Ryan Fan
Topic Started: Jan 25 2010, 10:54 AM (163 Views)
Reid
Member Avatar
È una trappola!

This topic has been moved from our official support board.

Originally posted by: Ryan Fan
[CODE
 
Last Click for Admins Only]Mod Name: Online List Links for Admins Only
Description: If you're a guest, member, or moderator you can't see the "Show detailed list by: Last Click" (Version A), both links (Version B ). Admins can see both.
Preview/Screenshot In Use:

You won't be able to see the admin function, I can't give you admin cp acess. But you can try out checking as a user/guest

http://s15.invisionfree.com/UltimateHacks13/index.php?

Username: testme
Password: testme

Version A - Hide only the Last Click Link

Admin CP-> Board Wrappers -> Footer

Quote:
 
<script type="text/javascript">
// Online List Links for Admins Only - Version A
// created by Ryan Fan/Nitrogenix
// http://www.ifsz.com, 2006
var x = document.getElementsByTagName('a')
for(y=0;y<x.length;y++){
if(x[y].href.match(/act=Online&CODE=listall&sort_key=name&sort_order=asc&show_mem=reg/i) && !document.getElementById('userlinks').innerHTML.match(/Admin Cp/i) && x[y].parentNode.innerHTML.match(/Show detailed list by: (.*)/i)){
x[y].parentNode.innerHTML = x[y].parentNode.innerHTML.replace(RegExp.$1, "<a href='" + x[y].href + "'>" + x[y].innerHTML + "</a>")
}
if(window.location.href.match(/sort_key=click|sort_key=name/i) && !document.getElementById('userlinks').innerHTML.match(/Mod Cp/i)){
window.location.href = window.location.href.replace(RegExp.$1, "")
}}
</script>


Version B - Hide both links

Quote:
 
<script type="text/javascript">
// Online List Links for Admins Only - Version B
// created by Ryan Fan/Nitrogenix
// http://www.ifsz.com, 2006
var x = document.getElementsByTagName('a')
for(y=0;y<x.length;y++){
if(x[y].href.match(/act=Online&CODE=listall&sort_key=name&sort_order=asc&show_mem=reg/i) && !document.getElementById('userlinks').innerHTML.match(/Admin Cp/i) && x[y].parentNode.innerHTML.match(/(Show detailed list by:)/i)){
x[y].parentNode.innerHTML = x[y].parentNode.innerHTML.replace(RegExp.$1, "")
x[y].parentNode.innerHTML = x[y].parentNode.innerHTML.replace(RegExp.rightContext, "")
}
if(window.location.href.match(/sort_key=click|sort_key=name/i) && !document.getElementById('userlinks').innerHTML.match(/Mod Cp/i)){
window.location.href = window.location.href.replace(RegExp.$1, "")
}}
</script>


Make it enabled for moderators aswell as admins

On any of the versions above, replace this:

Code:
 
if(x[y].href.match(/act=Online&CODE=listall&sort_key=name&sort_order=asc&show_mem=reg/i) && !document.getElementById('userlinks').innerHTML.match(/Admin Cp/i) && x[y].parentNode.innerHTML.match(/(Show detailed list by:)/i)){


With

Code:
 
if(x[y].href.match(/act=Online&CODE=listall&sort_key=name&sort_order=asc&show_mem=reg/i) && !document.getElementById('userlinks').innerHTML.match(/Mod Cp/i) && x[y].parentNode.innerHTML.match(/(Show detailed list by:)/i)){


:)

Requested code. Thanks fobbie.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Codes & Modifications · Next Topic »
Add Reply