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
     

Timesaver when updating Members Allowed on Your Pages.

 
Post new topic   Reply to topic    DLGuard Forum Forum Index -> Member's Tips and Tricks!
View previous topic :: View next topic  
Author Message
egalaxy



Joined: 25 Jul 2007
Posts: 142

PostPosted: Sat Oct 03, 2009 2:59 am    Post subject: Timesaver when updating Members Allowed on Your Pages. Reply with quote

Sorry if anyones already mentioned this, and not sure i'd even go as far as calling it a 'trick' but on saving time, it helps me out a lot.

As your membership site, and pages within grow more numerous, and the fact im always changing SOMETHING on my sites, never mind having a business partner who would always think:

"Why have one membership level, when you can have 10 very slightly different types instead!"

Can make changing the membergroups that can access the various pages, quite a big, job. And not something you want to make an error on completing either!

I found this little gem saves me a lot of time updating those pages, not to mention prevents missing any pages out too:

When you get your code from the membership in question, and DLGuard tells you to 'Add this to the top of all your members pages'

instead open 'notepad' and copy it to a blank page.

So you end up with something looking like this:
Code:
<?php
  $pathToDLG = "../dlg/";
  $dlgMemberGroup = "4,6,8";
  include ($pathToDLG."members/dlgmembers.php");
?>


MAKE SURE YOU USE YOUR OWN CODE NOT THE EXAMPLE!!

Then save it as 'header.php'

IMPORTANT: if the file type is set to 'txt' you'll end up saving it as 'header.php.txt' which is no good, it must be as a php file.

Then instead of pasting the code at the top of each page as DLGuard instructs you to, use the following code:
Code:
<?php include('header.php'); ?>

And so on with every page included in your members area.

If you ever want to add, edit or remove access to these pages for a group, you just need to make the change to the header.php file, and it will apply to all the pages you pasted the above code on automatically.

Its important to remember, if you have pages that some groups, but not others can access, this will not work, you could maybe have 2 different header.php type files, which you call using the same process as above:

eg: all members access pages may have:
Code:
<?php include('header.php'); ?>


but pages for premium only members, has at the top of each page:
Code:
<?php include('header_premium.php'); ?>


With each of the above php files detailing the different access codes generated by DLGuard for each. Just remember to keep track of which is which!

Makes a job that can be quite big task, becoming a single page to edit.

And no worrying you might have missed any pages out is great too!
_________________
Pete (egalaxy)
Wizardresponder.com
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    DLGuard Forum Forum Index -> Member's Tips and Tricks! All times are GMT
Page 1 of 1

 
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