[wp-hackers] a pay per view wordpress plugin

Nathan White changereality at gmail.com
Tue Jun 27 16:54:53 GMT 2006


>
> Before Step one i need a kind of reference code for each post, for
> example the user will have to send the sms to
> http://www.smsconnect.com/ with a specific code (in order to receive a
> specific unlock code for the desired post).



What you need to do is setup a table that creates a random code for a
post... this would be a simple WP hook when you post an article it creates
the code and associates it to the post id. Or you could put a field in the
advance fields on the post admin page so you could override it with your own
code when you post the article; again easy to do with WP hooks. I suggest
going through the codex site for specifics.

Then when someone sends an sms, you can do a look up for that code if its
not in the table no access, if it is they get access. However this seems
very clumsy to me. I have to enter a new code for each article. Then I also
have the issue of distributing the codes to the users.

I personally feel that you should be using some type of ACL to manage this
project, because then you would have room to grow. Then you can assign
members based on subscription types to different groups or topics. Then you
could have a drop down list or a hierarchical checkbox list just like the
categories for a post. Then you don't have to worry about the code
assignment or memorization. In this system each user would have there own
unique code. This way you could lock out a user even if they have a code so
there is more security and less change of a system compromise. You could
have the code be assigned when the user creates there account. Or it could
be as simple as the phone number they are SMSing from.


I personally don't think what your trying to do has any good code examples
out there. I think for scalability and ease of use you should probably
create this plugin from scratch.


More information about the wp-hackers mailing list