Functionality outline:
User visits site -->
-- If guest or not logged in -->
----- On post new thread or reply:
---------- check value of numofposts in cookie and set numofposts in the session table to equal that value
------------- if >= number of posts limit set in control panel
------------------ show error_guestpostlimitreached
------------- else
------------------ increment numofposts value by 1 in session table (small int)
------------------ increment numofposts value by 1 in cookie (however this is done)
This system is not meant to be perfect, only to limit the number of posts made by guests per session and to encourage registration. If cookies are enabled, to carry the numofposts data throughout each visit until the limit is reached. I understand that it is not the most secure way of going about this, but I'm not really looking for heightened security. I have a very active staff who read all new posts.
Anyone that can put the above into useable code would really be helping me out.
Thanks,
Paul
|