Override Phoca download Plugin?

Phoca Download - download manager
farmiva@yahoo.com
Phoca Newbie
Phoca Newbie
Posts: 8
Joined: 27 Nov 2019, 10:30

Override Phoca download Plugin?

Post 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

Tags:
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Override Phoca download Plugin?

Post 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
If you find Phoca extensions useful, please support the project
farmiva@yahoo.com
Phoca Newbie
Phoca Newbie
Posts: 8
Joined: 27 Nov 2019, 10:30

Re: Override Phoca download Plugin?

Post by farmiva@yahoo.com »

Any plan to do that? it's sometimes really necessary.
Unfortunately I did that by direct modification
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Override Phoca download Plugin?

Post 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
If you find Phoca extensions useful, please support the project
farmiva@yahoo.com
Phoca Newbie
Phoca Newbie
Posts: 8
Joined: 27 Nov 2019, 10:30

Re: Override Phoca download Plugin?

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Override Phoca download Plugin?

Post 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
If you find Phoca extensions useful, please support the project
farmiva@yahoo.com
Phoca Newbie
Phoca Newbie
Posts: 8
Joined: 27 Nov 2019, 10:30

Re: Override Phoca download Plugin?

Post by farmiva@yahoo.com »

Opps! that's what I do already :)
Thank you anyway.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Override Phoca download Plugin?

Post by Jan »

Yes, it really seems that this is the easiest way. :idea:

Jan
If you find Phoca extensions useful, please support the project
Post Reply