Phoca Download Plugin - right icon in Joomla article

Phoca Download - download manager
fonk77
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 16 Jul 2010, 16:54

Phoca Download Plugin - right icon in Joomla article

Post by fonk77 »

Hello!
First I want to say with respect, that the Phoca Download Plugin is a very good and smart work and I think it integrates very clean into Joomla!

My Question:

Is there a (more or less simple) way to show the right file-icon for a Phoca Download-Link and also to display the right filesize in an artikle? At the moment there will be only a Linked Filename with a standard icon, when i put:

phocadownload view=file|id=1

in an article.

For example i want to have a link like this in an article:

[PDF-Icon] download file [12 KB] or
[WORD-Icon] download file [12 KB]

I searched a lot in the forum, but without success.

Maybe i would try to "hack" the source, but this is shurly hard work & maybe its not necessary...

best regards : Jochen
fonk77
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 16 Jul 2010, 16:54

Phoca Download Plugin - one possible solution for icons

Post by fonk77 »

OK, for the file icon in Articles, i found an relative easy CSS solution...

1. Wrap the phocadownload-code in tinymce in a div and name that div e.g. pdf...
so one have this code in the html-editor-win of tinymce:

<div class="pdf">{phocadownload view=file|id=222}</div>
<div class="word">{phocadownload view=file|id=444}</div>

than add 2 styles in your joomla template.css AND editor.css:

.pdf {
margin:0;
}

.pdf .phocadownloadfile16 {
padding:2px 2px 2px 20px;
background:url(pdf3.gif) left top no-repeat;
}

.word {
margin:0;
}

.word .phocadownloadfile16 {
padding:2px 2px 2px 20px;
background:url(pdf3.gif) left top no-repeat;
}

etc. for other icon / filetypes

if you add the styles to editor.css, then you might be able to
give an element the style "pdf" from the left format dropdown in tinymce.
inside this element, put the phocadownload-code.

in my case i activated also DIV in the right format-box of tinymce and used a DIV as wrap around
phocadownload-code, because i could not use <p>.
(the generated phocadownload-code is wrapped in a div already, so DIV inside p -> no valid html)

regards: Jochen
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca Download Plugin - right icon in Joomla article

Post by Jan »

Hi, thank you for this guide.


Jan
If you find Phoca extensions useful, please support the project
fonk77
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 16 Jul 2010, 16:54

Re: Phoca Download Plugin - right icon in Joomla article

Post by fonk77 »

you're welcome!
Nice component, good work!

best regards : Jochen
Post Reply