wordpress plugin quetsion

Soldato
Joined
17 Jul 2008
Posts
2,820
Location
London
Hola,

Bit more of a generic development question, but I am rather lost after looking at the documentation and googling with this. Writing a plugin at the moment that will create 2 extra tables to core wp which will store some data that registered users can post.

Say as an example its a book database, so one table will have book category and the other book titles (with some random meta data, like dates, users who post that). So the tables would look like:

table1:
id, varchar, date, user
table2:
id, int, date, table_1_link, user

Something along these lines, so the real question is, can I use the API that wp provides to create this (and if so a tip pointed at the right direction would be appreciated)? For example to output an actions menu for a specific "page" looking url http://www.example.com/books/new or http://www.example.com/books/edit I don't quiet mind how actions are represented as urls, just as long as they are sensible. Can I somehow catch the actions that I want using wp rather then referring to $_POST['action'] in the plugin?

Tried using custom_post_type, but I don't think this is what I am looking for, since the data I want to store/display isn't a massive text field but is not shared between users (so their book database example would be private to themselves).

So far the only way to do what I want involves creating a page where the plugin runs from with [plugin] and in the plugin trying to catch actions for new/edit/delete using $_POST. Is there a more sensible framework like solution for this in wp (that I just keep missing)?
 
Back
Top Bottom