Username:
Password:
Search for Plugins: Advanced
Please Sign in, Register or Resend Activation Email

Forums

  e107 Coders.org :: Forums :: E107 Plugins :: Q & A
 
<< Previous thread | Next thread >>  
Comment class question          
Author Post
dwellersire
Thu Nov 20 2003, 10:01PM
Registered Member #441
Joined: Thu Jul 03 2003, 03:35AM
Location:
Posts: 9
Summary:
I'm adding comments to my plugin, and I want it to be seperated by comment_item_id similar to how the news is, but instead by the number of the record in the database table for my plugin.

Method:
I need to add "$id" (the variable for the number of the record in my plugin) to the comment_item_id field when anybody submits a comment.

Any takers? :?
d723
Sun Nov 23 2003, 12:21AM
Registered Member #53
Joined: Tue May 06 2003, 11:42PM
Location:
Posts: 30
This is what the existing comment class was set up to do. To enable a new type of comments, you need to add a line to the comment_class.php file on line 144 with a unique number for you new type of comment. You can then use the e107 comment object to draw a comment input box and any comment already entered for the item.

The comment_item_id is the unique number that you're plugin uses to distiguish records. The comment_type is the number that you add on line 144 of comment_class.php.

You can make a copy of comment_class.php and include it with your plugin, this way users don't have to overwrite their existing comment class. This also allows you to tweak the way comments are rendered if you want, but still use the e107 database and tools.

Because of the way the comments thing is written, other tools that use the comment won't recognize comments with your plugin's id. Like the "List New" plugin won't show render comments from your plugin. It will show the comment in the total though. None of these tools yet know what to do with comments they don't recongize.

go to [link] and check out the Dev: Using the Comment Class
<span class='smallblacktext'>[ Edited Sat Nov 22 2003, 07:51PM ]</span>
Back to top
dwellersire
Sun Nov 23 2003, 05:59AM
Registered Member #441
Joined: Thu Jul 03 2003, 03:35AM
Location:
Posts: 9
I was able to easily do what I want by adding a hidden input with my variable as the value. But your idea of making a copy of the comment_class.php sounds like a good idea :)
Back to top
betz
Wed Sep 01 2004, 12:42AM

Registered Member #10972
Joined: Sat Jun 12 2004, 12:54AM
Location: Brussels, Belgium
Posts: 42
To enable a new type of comments, you need to add a line to the comment_class.php file on line 144 with a unique number for you new type of comment. You can then use the e107 comment object to draw a comment input box and any comment already entered for the item.


Ok, i added the line in comment_class.php
I have a site for artists, and i would integrate the comment class, so that evry artist-page has its own comments.
What i have to do to make a comments option in my plugin appear?
Back to top
Website
betz
Wed Sep 01 2004, 10:45AM

Registered Member #10972
Joined: Sat Jun 12 2004, 12:54AM
Location: Brussels, Belgium
Posts: 42
anybody??
Back to top
Website
 

Jump:     Back to top

Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF
Powered by e107 Forum System
Render time: 0.2410 sec, 0.1765 of that for queries. DB queries: 36.