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 >>  
comments for plugin?     Go to page       >>        
Author Post
betz
Mon Mar 06 2006, 12:01AM

Registered Member #10972
Joined: Sat Jun 12 2004, 12:54AM
Location: Brussels, Belgium
Posts: 42
Website
hey,

is it possible so that users can post comments to a downloads-plugin that i wrote?
I cant find any information about that...

Any help would be great :D
bugrain
Mon Mar 06 2006, 01:03PM

Registered Member #22953
Joined: Fri Mar 25 2005, 11:21AM
Location:
Posts: 1031
It can be done in a couple of lines if you use the e107Helper Project plugin.

If you only need comments and don;t want to use the e107 helper still have a look at in (in e107helper_class.php) as it will show you how you can add comments to your plugin
Back to top
aeduran
Sun Jul 23 2006, 10:48PM
Registered Member #54572
Joined: Thu Jun 15 2006, 07:08PM
Location:
Posts: 7
hey bugrain, so what are those two lines..?
Back to top
[SpooK]
Sun Jul 23 2006, 11:03PM
Registered Member #18890
Joined: Tue Nov 30 2004, 05:03PM
Location:
Posts: 942
Check out line ~194 in the e107Helper_class.php file of the e107 Helper Project, .7b. It looks like you simply need to use

getComment($pluginid, $id)

So betz, if your plugin's name is 'mydownloads' and the download's id is 15, you'd use:

getComment("mydownloads", 15);

Hope this helps.
Back to top
Website
aeduran
Sun Jul 23 2006, 11:06PM
Registered Member #54572
Joined: Thu Jun 15 2006, 07:08PM
Location:
Posts: 7
Never mind... found them:
$text = "HTML to display an item for the plugin";
$text .= $e107Helper->getComment($pluginid, $id);
Back to top
aeduran
Sun Jul 23 2006, 11:07PM
Registered Member #54572
Joined: Thu Jun 15 2006, 07:08PM
Location:
Posts: 7
thanks, spook. didn't see your reply until now... I forgot to refresh the page. thanks for the quick reply.
Back to top
aeduran
Sun Jul 23 2006, 11:14PM
Registered Member #54572
Joined: Thu Jun 15 2006, 07:08PM
Location:
Posts: 7
it's not working... where do I get the $id again...?
Back to top
aeduran
Sun Jul 23 2006, 11:18PM
Registered Member #54572
Joined: Thu Jun 15 2006, 07:08PM
Location:
Posts: 7
it's giving me this error:

Fatal error: Call to a member function on a non-object
Back to top
aeduran
Sun Jul 23 2006, 11:20PM
Registered Member #54572
Joined: Thu Jun 15 2006, 07:08PM
Location:
Posts: 7
I'm trying to add comments to the recipe plugin...
Back to top
bugrain
Mon Jul 24 2006, 10:42PM

Registered Member #22953
Joined: Fri Mar 25 2005, 11:21AM
Location:
Posts: 1031
What line/file is the error occuring in?

I'm guessing that you're not including the e107 helper file or you're in a function so the e107 variable is not accessible.

If the latter, make the $e107Helper variable a global in your function.
Back to top
Go to page       >>   

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.2362 sec, 0.1457 of that for queries. DB queries: 47.