Download title instead of filename

Phoca Download - download manager
leewilson78
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 05 Jan 2009, 16:58

Download title instead of filename

Post by leewilson78 »

Hi all,

Is it possible to have the download link the title of the file, instead of the filename?

Thanks
leewilson78
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 05 Jan 2009, 16:58

SOLVED

Post by leewilson78 »

Solved it, open up: components/com_phocadownload/views/category/tmpl/default.php

Change the following:

Code: Select all

// Title or name
			
			if ($this->paramstmpl['filename_or_name'] == 'title') {
				$displayNameHead = '';
				$displayName = $valueDoc->title;
			} else if ($this->paramstmpl['filename_or_name'] == 'filename'){
				$displayNameHead = '';
				$displayName = PhocaDownloadHelper::getTitleFromFilenameWithExt( $valueDoc->filename );
			} else if ($this->paramstmpl['filename_or_name'] == 'filenametitle'){
				$displayNameHead = '<div><strong>'.$valueDoc->title.'</strong></div>';
				$displayName = PhocaDownloadHelper::getTitleFromFilenameWithExt( $valueDoc->filename );
			}
to:

Code: Select all

// Title or name
			
			if ($this->paramstmpl['filename_or_name'] == 'filename') {
				$displayNameHead = '';
				$displayName = $valueDoc->title;
			} else if ($this->paramstmpl['filename_or_name'] == 'title'){
				$displayNameHead = '';
				$displayName = PhocaDownloadHelper::getTitleFromFilenameWithExt( $valueDoc->filename );
			} else if ($this->paramstmpl['filename_or_name'] == 'filenametitle'){
				$displayNameHead = '<div><strong>'.$valueDoc->title.'</strong></div>';
				$displayName = PhocaDownloadHelper::getTitleFromFilenameWithExt( $valueDoc->filename );
			}
Looks like this should be an option somewhere, I couldn't find it though.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Download title instead of filename

Post by Jan »

yes it is in paramters - File Name or Name

Jan
If you find Phoca extensions useful, please support the project
QldFirey
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 20 Jun 2010, 02:55

Re: Download title instead of filename

Post by QldFirey »

Where are the Paramters?

Thanks, Chris.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Download title instead of filename

Post by Jan »

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