×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: creating plugin: $REPLACEparams??

creating plugin: $REPLACEparams?? 14 years 6 months ago #6917

  • Bart
  • Bart's Avatar Topic Author
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 8
  • Thank you received: 0
I'm trying to create a custom plugin for a component I build for my site, but i cannot figure out what I'm supposed to replace "$REPLACEparams" by in josc_com_tvr.php

echo JOSC_utils::execJoomlaCommentPlugin($comObject, $this->reclame, $REPLACEparams, true);

creating plugin: $REPLACEparams?? 14 years 6 months ago #6921

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
You can leave it empty. That is supposed to be some of your extensions params that will be needed from your plugin.

P.S. don't forget to share your plugin after that :)

creating plugin: $REPLACEparams?? 14 years 6 months ago #6974

  • Bart
  • Bart's Avatar Topic Author
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 8
  • Thank you received: 0
I still don't really get it, so be honest. I put the following code in the template of my component:
<?php
  $option = JRequest::getCMD('option');
	require_once(JPATH_ROOT . DS . 'administrator' . DS . 'components' . DS . 'com_comment' . DS . 'plugin' . DS . $option . DS . 'josc_com_tvr.php');
?>

But all it shows is the following:

Schrijf commentaar (0 Commentaar)

Rather than a box in which I can type my comment.

By the way, wouldn't it be easier for plugin developers if all the variables which need changing would be defined in some .ini file? And also I'd like to see an option to turn of the "Subject" field for a comment, because I don't need it.

ps. I'd share, but it's really specific to a component which in turn I build specifically for my site and is of no use to others ;)

creating plugin: $REPLACEparams?? 14 years 6 months ago #6980

  • Bart
  • Bart's Avatar Topic Author
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 8
  • Thank you received: 0
Ah, I got it working now, but I had to manually create a function in the class, as it was missing:

function getPageId() {
return JRequest::getVar('id');
}

And I had to change checkVisual() into this:

function checkVisual($contentId=0) {
$option = JRequest::getVar('option');
$view = JRequest::getVar('view');

return ($option == 'com_tvr' && $view == 'reclames');
}

creating plugin: $REPLACEparams?? 14 years 6 months ago #6987

  • Bart
  • Bart's Avatar Topic Author
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 8
  • Thank you received: 0
I still haven't got it working perfectly. Now, when I write a comment, the same comment appears on all the product pages, rather than on the page of the specific product. This is what is stored in the database:

id = 2
contentid = 0
component = com_tvr
ip = 127.0.0.1
userid = 62
usertype =
date = 2009-09-25 12:31:35
name = bart
email = my email
website =
title = test
comment = test
published = 1
voting_yes = 0
voting_no = 0
parentid = -1
importtable =
importid = 0
importparentid = -1

What did I miss here?

creating plugin: $REPLACEparams?? 14 years 6 months ago #6991

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
contentid should not be 0 - this should be your com_tvr item_id

creating plugin: $REPLACEparams?? 14 years 6 months ago #6998

  • Bart
  • Bart's Avatar Topic Author
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 8
  • Thank you received: 0
how do i tell my plugin to fill this in correctly?

creating plugin: $REPLACEparams?? 14 years 6 months ago #7002

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
I don't know your extension, but most probably the id is in the url? Isn't it?

creating plugin: $REPLACEparams?? 14 years 6 months ago #7003

  • Bart
  • Bart's Avatar Topic Author
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 8
  • Thank you received: 0
well, yeah, but joomlacomment doesn't store it in the database...

creating plugin: $REPLACEparams?? 14 years 6 months ago #7013

  • Bart
  • Bart's Avatar Topic Author
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 8
  • Thank you received: 0
Hm, I don't know what I did to change it, but it works fine now :) Thanks for your help!

creating plugin: $REPLACEparams?? 14 years 6 months ago #7031

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
:) nice. When are you going to share the plugin with the users of joomlacomment?

creating plugin: $REPLACEparams?? 14 years 6 months ago #7036

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
Daniel Dimitrov wrote:

:) nice. When are you going to share the plugin with the users of joomlacomment?


I believe he already said it's for his own internal component that is not public ;) I googled for com_tvr and found nothing except for Barts' thread on Joomla forums where he's asking for advice on this component he's creating.

I assume it's a component for tv.Reclame.nl (is that your site Bart?).

creating plugin: $REPLACEparams?? 14 years 6 months ago #7043

  • Bart
  • Bart's Avatar Topic Author
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 8
  • Thank you received: 0
You're right, it's probably not much use to share my plugin :)

Actually domain name is tvreclames.nl. Closed down about 3 years ago, but now I want to set it up again.
  • Page:
  • 1
Time to create page: 0.162 seconds