clight77 wrote:
Hi could you please provide more information on exactly what and how you did this
Thanks
Sure. mod_auth_mysql uses the phpbb_users table username, password fields and group_id. Apache config looks like this:
<Location /members/>
AuthName "Secure Location"
AuthType Basic
AuthBasicProvider mysql
AuthMySQLHost localhost
AuthMySQLUser XXXXXXXX
AuthMySQLPassword XXXXXXXX
AuthMySQLDB my_phpbb_db
AuthMySQLUserTable phpbb_users
AuthMySQLNameField username
AuthMySQLPasswordField user_password
AuthMySQLGroupField group_id
AuthMySQLPwEncryption md5
AuthMySQLEnable On
require group 5 7
</Location>
admin is group 5 and I have a paid user group 7. If a user is in 7 they see a link to the member area. Clicking will open a login box which if they have the correct credentials they can access the secure area.
I have a script that is run by my payment processor Verotel TicketsClub. The script I use is modified version the the TicketsClub rum script that I wrote in Ruby. You can easily use perl and probably php. All it does is change the user from the
default group 2 to 7 when they purchase. If they delete the user simply get moved back to
default group 2. The only issue I had with Ticketclub is to inform then to setup my account using rum 1.01 version 2 may work but I have never used it.
You don't even need to have a secure area or use mod_auth_mysql if you don't have a secure area and only want to change for certain forums. It basically works the same way just use a special group that has access to those forums and have your script move the user.
You must be careful with secondary groups. I found this really only works based on the default group.