×

Notice

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

TOPIC: Мusic collection

Мusic collection 12 years 5 months ago #16423

  • Андрей
  • Андрей's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 0
Good afternoon.
tell me how to make the integration CompojoomComment in component the Мusic-collection ?
joomla 2.5
Мusic-collection 2.3
CompojoomComment 4.2.1

Re: Мusic collection 12 years 5 months ago #16425

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Hey Andrei,
Do you know PHP? We currently don't have a plugin for music-collection, but if you know PHP I can explain you what you need to do to get it working.

Regards,
Daniel

Re: Мusic collection 12 years 5 months ago #16426

  • Андрей
  • Андрей's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 0
Hey Daniel,
I myself do not really understand php, but there are people who can help.
I will be grateful for your explanation as to make it work. With your help I think we will understand.

Re: Мusic collection 12 years 5 months ago #16446

  • Андрей
  • Андрей's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 0
Hey Daniel,
Explain please how to make a plug-in Мusic collection

Re: Мusic collection 12 years 5 months ago #16447

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Hey Andrei,
Sorry about the delay.
Check this thread out: compojoom.com/forum/45-newbies-area/14806-component-integration - I think that it will also help you.

So basically have a look at the existing plugins in
administrator/components/com_comment/plugin

Let us look at the com_k2 folder. I'll explain how that plugin works - you'll have to do the same for your component... (create a new folder for the component, rename the k2 files to josc_com_yourcomponent.php ... and change the class names and funcitons inside those files)

There we have 2 files:
josc_com_k2.php
josc_com_ks.class.php


you need to include the josc_com_k2.php file in your component.

and do:
echo CommentPluginK2::output($row, $params);

$row in the code above is the object that contains the id and catid for the music item.

This code here:
 
class CommentPluginK2 {
 
	public function output($row, $params)
	{
 
		$comObject = JOSC_utils::ComPluginObject('com_k2', $row, 0, $row->catid);
		$comments = JOSC_utils::execJoomlaCommentPlugin($comObject, $row, $params, true);
		unset($comObject);
 
		return $comments;
	}
 
}

will automaticall call the josc_com_k2.class.php file and the JOSC_com_k2 class.
Here is a small review of what the functions in class do:
checkSectionCategory - this function decides whether it should execute the component at all (depending on the settings in the backend. (include/exclude categories))

checkVisual - if checkSectionCategory returns true then the this function will be called - it will decide if it should show a comment form or count button (write comment( 10 comments))

if you have those 2 correct -> then you should already see a form in single view of your component and you should be able to leave a comment.

createFeed - this function will create the rss feed - if you don't use RSS then there is no need to write this function

linkToContent - this is actually in my opinion the most important function -> it creates links to the comments. (in email, in the module, in backend on the frontend - so it should create correct links to the items)

cleanComponentCache -> cleans the cache after a user inserts a comment

getCategoriesIdOption, getObjectIdOption, getViewTitleField, getViewJoinQuery - those are all used in the backend -> for comment list, edit comment etc

mod_commentsGetMostCommentedQuery, mod_commentsGetOthersQuery - are used in the module - depending on the module settings.

My general advise is - set php error reporting to maximum - this way you can see the fatal errors when you develop and this will give you a clue what you are missing. (not just a blank screen)

Let me know how it goes! If you get stuck somewhere don't hesitate to write! I want to add this information to the documentation, so if you have ideas how to write everything better, please share!

Regards,
Daniel

Re: Мusic collection 12 years 4 months ago #16728

  • Андрей
  • Андрей's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 0
Good afternoon.
and failed to integrate the comments into a component. Plus there's a problem with the integration of the pages with photos and video jomsocial.
Please send me an email, discuss the finalization of plugins for the money.
  • Page:
  • 1
Time to create page: 0.151 seconds