- Last post
- 6 Responses
So I need to make a site where the homepage loads normally, but when any links are clicked a disclaimer appears where the user must accept the terms and conditions before loading any additional pages/content.
The catch is that I want to incorporate this into a Wordpress website.
I really don't know how to go about creating it in php, but I feel like it's not that hard to do. Any ideas?
what you're asking isn't hard to do, but it is a bit more complex than a forum reply can encompass. basically in php you need to change all the links in your wordpress template to be of some common class that a php function can rewrite with a link to your t&c. you need a session variable for the t&c acceptance and a cookie that stores the t&c acceptance status also. and finally you need to write that function in php that does the link redirection.
the above isn't really a good guide on how to do it, just the barest sketch, really, but to go into more detail would require more time and more hand gestures. basically, for a php programmer, what you're asking would be a 2-5 hour task, i think, depending on what your site is like.
that plugin is unfortunately broken in recent versions of wordpress due to a slightly different way query vars are handled.
the concept is similar to how you'd create your own login system, not the whole verifying a user exists and checking password, etc., but as bigtrick said setting a session var and cookie and kicking people out to a page if they're not authenticated. you could probably grab and adapt some code from some kind of similar tutorial
Thanks guys. That gives me a good place to start some research.
But based on what has been said, would anyone be interested in the work? I could probably get it done on my own, but that "2-5 hour task" would likely take me more than twice as long. I'm pretty certain the client has the funds to make it worth your while. This project isn't scheduled to start for over a month.
sure, send me an email.