Author Topic: [Code] Page Off Limits  (Read 1930 times)

0 Members and 0 Guests are viewing this topic.

Offline CyanProductions

  • Newbie
  • *
  • Posts: 39
  • Karma: -1
    • View Profile
[Code] Page Off Limits
« on: January 04, 2015, 03:59:14 pm »


Description: Make a page Off Limits to a user

This code utilizes jQuery, please use the latest version found in this thread: http://support.createaforum.com/5/jquery-v1-8-update/

Footers:

Quote
<script>
if (location.href == smf_scripturl + "?X") { if ($("li.greeting").text() == "Hello Y") { $("div#main_content_section").remove(); $( "div#footer_section div.frame" ).before( "<br><center><h1>This is Off Limits to you</h1></center><br>" );}}
</script>


Editing: Change the red X to the url you want off limits. You only need the segment of the url after the ?
Change the red Y to the user you would like to make this Off limits to, you can change the first =, on the same line as the red Y to an !, this will only give that user access to the page.
« Last Edit: January 04, 2015, 04:03:32 pm by CyanProductions »

Share on Facebook Share on Twitter


 

Related Topics

  Subject / Started by Replies Last post
12 Replies
3385 Views
Last post December 02, 2014, 06:57:57 pm
by CyanProductions
18 Replies
1462 Views
Last post January 20, 2013, 04:06:16 am
by CB
0 Replies
523 Views
Last post November 04, 2012, 03:24:15 am
by aIURbliS
0 Replies
422 Views
Last post September 20, 2014, 02:28:49 pm
by kingsleymichael
6 Replies
335 Views
Last post November 01, 2017, 01:25:14 am
by CreateAForum