| View previous topic :: View next topic |
| Author |
Message |
davidbailey
Joined: 14 Jun 2010 Posts: 17
|
Posted: Wed Jun 23, 2010 3:51 am Post subject: |
|
|
Hey Sam...
The code seems to be working okay...but I just realized that it locks down the whole joomla site to MemberGroup 1.
How could I leave the site open to the general public...and just lock/protect the three membership folders.
In other words...I want anyone to access http://mysite.com/members/ (joomla installation) but only DLG allowed users can access the bronze, silver, and gold folders?
| Code: | if (eregi("members", $_SERVER['REQUEST_URI'])) {
$pathToDLG = $_SERVER['DOCUMENT_ROOT']."/dlg/";
$dlgMemberGroup = "1";
if (eregi("bronze", $_SERVER['REQUEST_URI'])) $dlgMemberGroup = "1";
if (eregi("silver", $_SERVER['REQUEST_URI'])) $dlgMemberGroup = "2";
if (eregi("gold", $_SERVER['REQUEST_URI'])) $dlgMemberGroup = "3";
include ($pathToDLG."members/dlgmembers.php");
} |
_________________ Learn English
http://EXLenglish.com |
|
| Back to top |
|
 |
admin Site Admin
Joined: 31 Jul 2005 Posts: 9131 Location: Australia
|
Posted: Thu Jun 24, 2010 2:55 am Post subject: |
|
|
Hi David,
If "members" is your Joomla installation folder, then you'll need to create another page where your members will go to.
So: www.example.com/members/area/
...for example.
And then have the code in the first line search for "area" instead of "members".
Basically you want the code to search for one of the folder names that you want to close off.
cheers
Sam _________________ Sam Stephens
DLGuard: www.dlguard.com
GuardHQ: www.guardhq.com
-------
Keep up to date with DLGuard and other GuardHQ products: www.guardhq.com/newsletter.php
www.twitter.com/DLGuard |
|
| Back to top |
|
 |
admin Site Admin
Joined: 31 Jul 2005 Posts: 9131 Location: Australia
|
Posted: Mon Jan 17, 2011 11:51 pm Post subject: |
|
|
No worries, Ranny!
Hi Wiseweb,
Yes, that code will protect any page you put it on.
The person will only have to login once, until they close their browser off (which logs them out).
They can go from protected pages to protected pages, and they won't need to login again. Only once!
cheers
Sam _________________ Sam Stephens
DLGuard: www.dlguard.com
GuardHQ: www.guardhq.com
-------
Keep up to date with DLGuard and other GuardHQ products: www.guardhq.com/newsletter.php
www.twitter.com/DLGuard |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|