Phoca Download Plugin - Icons
-
- Phoca Newbie
- Posts: 4
- Joined: 07 Mar 2008, 09:08
Phoca Download Plugin - Icons
Hey there,
i just tested the Phoca Download Plugin and it works great. The only thing i'm missing is, that when you link a file directly the icon of the file is always the same (harddrive with arrow).
Is it possible to show the icon provided (add file dialog) next to it and not just a standard icon? That would be really great. The reason is, that i display a language flag next to the files, if i link through the download plugin, you can't see in what language that file content is.
I would really appreciate it.
Thanks in advance and for the great download-component.
i just tested the Phoca Download Plugin and it works great. The only thing i'm missing is, that when you link a file directly the icon of the file is always the same (harddrive with arrow).
Is it possible to show the icon provided (add file dialog) next to it and not just a standard icon? That would be really great. The reason is, that i display a language flag next to the files, if i link through the download plugin, you can't see in what language that file content is.
I would really appreciate it.
Thanks in advance and for the great download-component.
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Phoca Download Plugin - Icons
Hi, now you can change the size of the icon, I will take a look at it, maybe I will find some behaviour how to paste there custom image.
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Enthusiast
- Posts: 85
- Joined: 10 May 2008, 21:11
Re: Phoca Download Plugin - Icons
I too am interested in this idea. With the download plugin, I want to insert a PDF file, and would like to show a PDF icon to the user. I suppose I could just overwrite the /plugins/content/phocadownload/images/icon-download-64.png file, but what if I need to show some other type of file besides PDF? There should be a way to change the icon in the plugin But very nice plugin overall for sure!
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Phoca Download Plugin - Icons
Hi, yes, it is in feature request list. Not the only limitation factor is the time
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 3
- Joined: 03 Feb 2011, 19:26
Re: Phoca Download Plugin - Icons
Just wanted to express my "vote" for this feature. Icon based on filetype seems essential to me.
Thanks!
Thanks!
-
- Phoca Newbie
- Posts: 1
- Joined: 30 Nov 2011, 11:31
Re: Phoca Download Plugin - Icons
This has also got my vote with one minor tweak - the ability to have no icon sometimes. For example sometimes I need to include a link to a file in the middle of a sentence. I don't want an icon to appear in this instance but I may want the icons in a list of links.
Could this be added as an attribute e.g. "icon=pdf | xls | doc | img | mov | mp3 | no"?
Could this be added as an attribute e.g. "icon=pdf | xls | doc | img | mov | mp3 | no"?
-
- Phoca Member
- Posts: 11
- Joined: 10 Jun 2009, 23:54
Re: Phoca Download Plugin - Icons
The Add File form has a field for custom file icon, it only seems not to be implemented in the plugin (the plugin only shows generic icon). Being able to override in the code attributes that you insert into the article seems to be the way to go if you need this file linked without its icon once in a while, but an a general option might be useful as well, if this is the way you need your files linked most of the time and only exceptionally need an icon for a file. Via general option this behavior could be swapped and then overridden for specific places when needed.
A good idea, I vote "for".
As of Phoca Download Plugin v 2.1.6 this functionality is still missing.
A good idea, I vote "for".
As of Phoca Download Plugin v 2.1.6 this functionality is still missing.
-
- Phoca Member
- Posts: 11
- Joined: 10 Jun 2009, 23:54
Re: Phoca Download Plugin - Icons
This is an ancient post, but it is relatively simple to achieve this with only CSS overrides.korvax wrote:Is it possible to show the icon provided (add file dialog) next to it and not just a standard icon? That would be really great. The reason is, that i display a language flag next to the files, if i link through the download plugin, you can't see in what language that file content is.
Since you call out this plugin via text code, you can wrap the code into a proprietary DIV, for example:
Code: Select all
<div class="download-icon-pdf">
{phocadownload view=filelist|id=2}
</div>
Code: Select all
.download-icon-pdf .phocadownloadfilelist {
background:none;
border:none;
}
.download-icon-pdf .phocadownloadfilelist32 {
border-bottom: 1px solid #EEE;
background: transparent url(../images/icon-pdf-32.png) 5px center no-repeat;
}
.phocadownloadfilelist regulates the area around the file-block and
.phocadownloadfilelist32 regulates the individual file container block and the 32 depends on the icon size chosen from the general options.
Then place an image file with the content and dimensions (32x32 in this case) of your liking to your "images" directory withing your template directory.
Code: Select all
../your-template/images/icon-pdf-32.png
-
- Phoca Member
- Posts: 11
- Joined: 10 Jun 2009, 23:54
Re: Phoca Download Plugin - Icons
I figured it out.
Jan, this will take 30min max for you to implement properly
Go to FILELIST section (around line 230).
Into the SELECT query add somewhere "a.image_filename,"
Goto line 272, modify to the following:
This might not be the most elegant way (hardcoding CSS), but it gets results. Since the icon is displayed as a background image for a div, the other way would be to include PHP code in CSS and THAT is a mess, I have seen it
Jan, this will take 30min max for you to implement properly
Code: Select all
plugins/content/phocadonwload/phocadownload.php
Into the SELECT query add somewhere "a.image_filename,"
Goto line 272, modify to the following:
Code: Select all
} else {
$link = PhocaDownloadHelperRoute::getFileRoute($item->id,$item->catid,$item->alias,$item->catalias, 0, 'download');
$icon = $item->image_filename;
}
$output .= '<div class="phocadownloadfilelist'.(int)$iSize.'" style="background:url(../images/phocadownload/'.$icon.') 5px center no-repeat;"><a href="'. JRoute::_($link).'" '.$targetOutput.'>'. $textOutput.'</a></div>';
}
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Phoca Download Plugin - Icons
Hi, thank you for the guide.
Jan
Jan
If you find Phoca extensions useful, please support the project