1 sserena Feb 27, 2007 11:49
3 edb Mar 11, 2007 16:07
I'll take a quick guess and say that you also need to automagically populate the evo_postcats table, but I'm also interested in what Walter comes up with for my own spin on this type of thing. Eventually I'll want a way to add a user with a blog and a category and a protected post in that category that is credited to the new blogger. Sort of like a miniature autoblog plugin, only dependent on me (as The Admin) deciding this new blogger gets his/her own blog.
Anyway I'll guess that if you're looking to add a post and adding info to the posts table isn't doing it then you need to also populate the postcats table.
4 yabba Mar 11, 2007 16:20
Didn't I post a solution to this a while ago? Summat to do with $fred = & new Item() ?
Anyway, in case I didn't, you can create a new item, add all your bits and bobs and then tell it to slap itself into the db ;)
¥
*edit*
Yay, I found fred
¥åßßå wrote:
$fred = & new Item(); $fred->set( 'title', 'hello world' ); $fred->set( 'content', 'Yet another hello world post' ); $fred->set( 'main_cat_ID', 228 ); $fred->dbinsert();
¥
5 sserena Mar 13, 2007 14:23
Thx for the answers. I should have mentioned that I'm normally programming in Perl... I'm only switching to PHP if there's no other way to accomplish what I want. So I tried EdB's solution and it worked. Thx a lot!
I will find how I did that and I will send you