File Description in Plugin Output

Phoca Download - download manager
cgniuses
Phoca Member
Phoca Member
Posts: 13
Joined: 04 May 2017, 21:20

File Description in Plugin Output

Post by cgniuses »

I was trying to get the description of files to show when {phocadownload view=filelist|id=XX} is initiated. I tried several methods but none seem to work. in the content plugin file phocadownload.php I have the code below on line 305

Code: Select all

if ($iMime == 1) {
$description = $item->description;
$output .= '<div class="pd-filename phocadownloadfilelistitem phoca-dl-file-box-mod">'.  $imageFileName['filenamethumb']. '<div class="pd-document'.(int)$iSize.'" '. $imageFileName['filenamestyle'].'><a href="'. JRoute::_($link).'" '. $targetOutput.'>'. $textOutput.'</a><br />$description</div></div>';
I am running joomla version 3.7 and phocadownload version 3.1.2 and content plugin version 3.1.2

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

Re: File Description in Plugin Output

Post by Jan »

Hi, first of all, you need to load the description from the database.
plugins/content/phocadownload/phocadownload.php
line cca: 255

Code: Select all

$query = 'SELECT a.id, a.title, a.alias, a.filename_play, a.filename_preview, a.link_external, a.image_filename, a.filename, c.id as catid, a.confirm_license, c.title as cattitle, c.alias as catalias,'
TO:

Code: Select all

$query = 'SELECT a.id, a.title, a.alias, a.filename_play, a.filename_preview, a.link_external, a.image_filename, a.filename, c.id as catid, a.confirm_license, c.title as cattitle, c.alias as catalias, a.description,'
Then you can display the description in the code.

Jan
If you find Phoca extensions useful, please support the project
cgniuses
Phoca Member
Phoca Member
Posts: 13
Joined: 04 May 2017, 21:20

Re: File Description in Plugin Output

Post by cgniuses »

Thanks a lot. This worked like a charm for what I needed it to do
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: File Description in Plugin Output

Post by Jan »

Ok, great to hear it.

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