×

Notice

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

TOPIC: Creating a plugin

Creating a plugin 7 years 6 months ago #9864

  • robert bünger
  • robert bünger's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 1
  • Thank you received: 0
Sorry if this has probably been discussed..

I´d like to create a new plugin for the jomestate component for my project but I can´t find any help for how to create a new plugin...
I´ve read something like:"...look in the plugin files how it works..." but I´ve tried with the docman plugin to change the code and I wasn´t succesfull!

Would you please give me a hint?

Creating a plugin 7 years 6 months ago #9866

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 154
  • Thank you received: 1081
Hey Robert,
Well it is pretty easy once you do it :)
Anyway I'll have to update the documentation for compojoomcomment on this.

take again a look at the docman plugin.
create a new folder called com_yourextension - it should have files like josc_yourextension.php and josc_yourextension.class.php

in your component you should do require_once(path to josc_yourextension.php) . What you need to pass as arguments to this files is an array or object with id.

look at the constructor in josc_yourextension.class.php - there you need to get the right id.
once you create this com_yourextension folder you should be able to create a new config in the backend for this extension. Once you have the config in place you should be able to see at least the read comments button in your extension.

To show the comments you should have a look at the check_visual function.

And another important function is linktocontent.
Daniel
  • Page:
  • 1
Time to create page: 0.110 seconds