0

I have a small php forum on my website that allows users to create posts and each post has a page that displays the content and where users can comment on that topic.

For each post created a new table is generated in the database to hold the comments for that post.

I want to convert the system from raw php to expression engine and i have the following question.

Is there a way (like a php hook) to create and delete channels directly from php like you would create and delete tables from the database. I want to generate a new channel to store comments when a new post is created and delete that same channel when the post is deleted.

Or maybe it's better to just have one channel to hold all of the comments and have an id for each comment to know what post it's coming from.

2
  • 1
    Is there a reason you're not just using a single channel with entries to create your posts, and comments as comments? – Derek Hogue Oct 29 '14 at 14:46
  • Well, that's nice. I had no idea this existed. I'm relatively new to expression engine. I looked up the comment add-on just now. It makes things so easy. Thanks a lot! – jflaax Oct 29 '14 at 15:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.