Allinta CMS Support - Customers Helping Customers
Allinta CMS Support - Customers Helping Customers
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Allinta CMS
 Allinta CMS Mods
 Secure Members Pages
 New Topic  Reply to Topic
 Printer Friendly
Author  Topic Next Topic  

the_shopkeeper

53 Posts

Posted - 31/05/2008 :  17:40:03  Show Profile  Reply with Quote
This allows you to have pages that only members with a shared username and password can access.

1) The Login Page.
Create a new page using your standard site template. Name it "Login" and edit the visibility to Online, but not linked from the menu.

In the content area, enter the following form:

<form name="form" method="post" action="default.asp?contentid=XXX">
<table border="0" cellpadding="2"" cellspacing="0">
<tr><th>User Name</th>
<td><input name="user" type="text" id="user"></td></tr>
<tr><th>Password</th>
<td><input name="password" type="password" id="password"></td></tr>
<tr><td> </td>
<td><input type="submit" name="Submit" value="Let Me In"></tr>
</table>

Save and publish the page. Note: We'll come back to this page once we have a contentid number for the XXX above. Once this page is published, note the contentid number for your new page. You can get this by looking at the browser statusbar when mousing over the page name.

2) The Members Template.

Copy your standard site template and rename it something like Members Template. Edit the page and add the following to the top of the template.

<%
if session("member")="" then
if Request.Form("user")="YOURUSERNAME" AND Request.Form("password")="YOURPASSWORD" then
session("member")="true"
else
response.redirect "default.asp?contentid=XXX"
end if
end if
%>

Change YOURUSERNAME and YOURPASSWORD as required.
Replace XXX with the contentid of your login page we just created.

3) Members Page.
Now create a new page for your members. Select your new Secure Template and publish the page. It can be linked to the menu.
Once it is published, note the contentid number. Take this number and edit your login page.

This concludes the MOD.
Let me know if you have any problems with it or can suggest a better method.

RSAdevelopment

18 Posts

Posted - 09/07/2008 :  21:50:50  Show Profile  Reply with Quote
I am attempting to use this mod and have ran into a block. In step 2 you specify to paste the code in the "top" of the template. Just where should it go? Before the body tag? Within the head tag? Or at the VERY top/beginning of the template? I tried almost every combination. Each time I do, the code that I place in the template shows up on the published page.

Help
Go to Top of Page

the_shopkeeper

53 Posts

Posted - 10/07/2008 :  22:31:13  Show Profile  Reply with Quote
Hi RSAdevelopment and welcome to the Allinta Support Forum.

Yes - The ASP code in step 2 goes right at the top of the template - the very first thing.
The logic being, if the session variable has not been set, then redirect the user to another page.

I can't see any problems on the URL you have posted. Have you go it to work?
Go to Top of Page

the_shopkeeper

53 Posts

Posted - 14/07/2008 :  09:54:27  Show Profile  Reply with Quote
Are you sure that you have the latest version of Allinta?

Only the later versions (2.4*) have the ability to run ASP code in templates and content pages.
Go to Top of Page

RSAdevelopment

18 Posts

Posted - 14/07/2008 :  13:41:47  Show Profile  Reply with Quote
ooooo. That explains it. I will have to do the upgrade. Thanks for all your help!
Go to Top of Page

RSAdevelopment

18 Posts

Posted - 14/07/2008 :  14:01:32  Show Profile  Reply with Quote
ok. So I just ran the upgrade and have the same result. Any ideas? Wait...ran the wrong upgrader...sorry....brb
Go to Top of Page

RSAdevelopment

18 Posts

Posted - 14/07/2008 :  14:09:40  Show Profile  Reply with Quote
O man!! So I ran the CORRECT upgrader and now it is BEAUTIFUL! Awesome MOD shopkeeper!
Go to Top of Page

the_shopkeeper

53 Posts

Posted - 14/07/2008 :  15:11:35  Show Profile  Reply with Quote
You're welcome.
Go to Top of Page

Michaelangelo2

8 Posts

Posted - 05/08/2010 :  20:03:47  Show Profile  Reply with Quote
Yep, I incorporated this into one of my projects as well and it worked great!

Furthermore, I made the protected page a template so that I could just add it as a new page and my client could edit the pages without disturbing the code.

This worked great!

Thanks again.
Go to Top of Page
   Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Allinta CMS Support - Customers Helping Customers © hertsWEB Community Network Go To Top Of Page
Snitz Forums 2000