News:

Create A Forum Installed

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

0 Members and 1 Guest are viewing this topic.

Offline CyanProductions

  • Newbie
  • *
  • Posts: 39
  • Karma: -1
    • View Profile

Badges: (View All)
Level 3 10 Posts Karma Good
[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
4478 Views
Last post December 02, 2014, 06:57:57 pm
by CyanProductions
18 Replies
1789 Views
Last post January 20, 2013, 04:06:16 am
by CB
0 Replies
697 Views
Last post November 04, 2012, 03:24:15 am
by aIURbliS
0 Replies
592 Views
Last post September 20, 2014, 02:28:49 pm
by kingsleymichael
6 Replies
651 Views
Last post November 01, 2017, 01:25:14 am
by CreateAForum