We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

How to add comments via PHP?

Development and Programming

Graham Huber's avatar
Graham Huber
217 posts
15 years ago
Graham Huber's avatar Graham Huber

Can anyone suggest a way to add comments to an entry via PHP?

Reason:

I want to build a booking system, with each inventory item as a channel entry, authored by the borrower. When an item is overdue, I want to add a comment to the entry (via PHP), with channel notification preferences set to email the author when a new comment is added.

There’s probably other ways to build a system like this, but I think using the commenting system might be a pretty nifty way, since the thread of comments become sort of a rolling tally of notifications relating to that item.

I just don’t know how to actually add comments to an entry via PHP – can anyone suggest a method?

Thanks!

[Mod Edit: Moved to the Development and Programming forum]

       
Greg Aker's avatar
Greg Aker
6,022 posts
15 years ago
Greg Aker's avatar Greg Aker

start by looking at Comment::insert_new_comment() in mod.comment.php.

-greg

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.