DLGuard
fully integrated with the major payment systems
Paypal
Clickbank
2checkout
Authorize.Net
Click2Sell
1ShoppingCart
LinkPoint
AlertPay
eBay
PayDotCom
Mal's e-commerce
PagSeguro
CCBill
CommerceGate
DigiResults
FastSpring
JVZoo
MultiSafePay
WorldPay
Plimus
WSO Pro
Paypal Digital Goods
RevenueWire
SWReg
     

How to make a membership site in Joomla
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    DLGuard Forum Forum Index -> Member's Tips and Tricks!
View previous topic :: View next topic  
Author Message
davidbailey



Joined: 14 Jun 2010
Posts: 17

PostPosted: Wed Jun 23, 2010 3:51 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
admin
Site Admin


Joined: 31 Jul 2005
Posts: 9392
Location: Australia

PostPosted: Thu Jun 24, 2010 2:55 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
admin
Site Admin


Joined: 31 Jul 2005
Posts: 9392
Location: Australia

PostPosted: Mon Jan 17, 2011 11:51 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    DLGuard Forum Forum Index -> Member's Tips and Tricks! All times are GMT
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
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