HTML Pages for Member's Only

Go down

HTML Pages for Member's Only

Post by Theflame12 on October 4th 2011, 7:33 am

I was wondering, is there someone to code an HTML page so it's only available to the Members of my forum? For instance, if I make an HTML page, if someone wants to access it they would need to be logged in to the forum if not, it would send the to the register page or display a message telling them the page is for forum members only.

I'm not really sure if this is a feature or not, but is there a way to code it in? Any help?

Posts : 26
Reputation : 0
Language : English

Back to top Go down

Re: HTML Pages for Member's Only

Post by LGforum on October 4th 2011, 5:03 pm

There is, i have done a variation of it here:

Where members can log in and they then see different things.
Try logging in with username LGF Bot and pass ninja20
(mods don't worry about me sharing this username and pass, it isn't a mod r admin or anything, just a little test account)

The page works by retrieving the information needed through an iframe.

The simplest way of doing what you want to do would be simply to make a looping password to page.
like this:

var password="YOUR PASSWORD";
var entry=prompt("Whats the password?","");
while (entry != password) {
entry=prompt("Whats the password?","");

Put it in the head of your page and the page won't load until the person types in the password. Let your members know the password in a member only part of the forum.
Its not the most secure way but its the simplest.

Male Posts : 2263
Reputation : 260
Language : English
Location : UK

Back to top Go down

Back to top

Permissions in this forum:
You cannot reply to topics in this forum