Page 1 of 1

Override Phoca download Plugin?

Posted: 27 Nov 2019, 10:33
by farmiva@yahoo.com
Hi,

Thank you for this great extension,
I have a question about customization of phocadownload plugin.

according to the phocadownload folder in : plugins\content\phocadownload
Is it possible to ovrride it in HTML folder of Joomla?

Thank you

Re: Override Phoca download Plugin?

Posted: 02 Dec 2019, 16:22
by Jan
Hi, the plugin does not have any tmpl part so it cannot be overriden. So the option is to copy it and make own plugin with different output :idea:

Jan

Re: Override Phoca download Plugin?

Posted: 09 Aug 2020, 09:31
by farmiva@yahoo.com
Any plan to do that? it's sometimes really necessary.
Unfortunately I did that by direct modification

Re: Override Phoca download Plugin?

Posted: 11 Aug 2020, 16:47
by Jan
Hi, the problem is, there are so many conditions in the plugin, so it seems to be easiear way to clone the plugin and customize the changes in the plugin itself than overwrite it completely in template. Really hard to say. I have added it to feature request list but really no idea when I will be able to take a look at it.

Jan

Re: Override Phoca download Plugin?

Posted: 16 Aug 2020, 11:29
by farmiva@yahoo.com
Is it possible? I mean overriding whole plugin?
For example I added [download hits] to the title of file:

Code: Select all

case 'filepreviewlink':
	if ((int)$id > 0) {// hack :: add hits to the query
		$query = 'SELECT a.id, a.title,a.hits, a.alias, a.filename_play,
line 357

Code: Select all

	} else {//hack:: change class and add hits ...											
		if(JFactory::getUser()->id)
			$output .= '<div class="downloadNow signed"><a href="'. JRoute::_($link).'" '.$targetOutput.' target="_blank"><i class="fa fa-chevron-circle-down" ></i>'. $textOutput." | ".$item->hits.' hits </a></div>';
		else
 			$output .= '<div class="downloadNow violet"><a class="log-popup white cursor" '.$targetOutput.' target="_blank"><i class="fa fa-lock" ></i>Login & '.$textOutput." | ".$item->hits.' hits </a></div>';
										}
line 697

In fact if I can override whole plugin, that's really useful for me

Re: Override Phoca download Plugin?

Posted: 18 Aug 2020, 20:29
by Jan
Hi, overriding the whole plugin in fact means, you just create a copy of this plugin. Which is maybe the best way. Just edit it and store as backup.

Jan

Re: Override Phoca download Plugin?

Posted: 19 Aug 2020, 17:26
by farmiva@yahoo.com
Opps! that's what I do already :)
Thank you anyway.

Re: Override Phoca download Plugin?

Posted: 25 Aug 2020, 14:37
by Jan
Yes, it really seems that this is the easiest way. :idea:

Jan