Page 1 of 1

Phoca Download Plugin - right icon in Joomla article

Posted: 16 Jul 2010, 17:13
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

Phoca Download Plugin - one possible solution for icons

Posted: 16 Jul 2010, 19:53
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

Re: Phoca Download Plugin - right icon in Joomla article

Posted: 17 Jul 2010, 14:15
by Jan
Hi, thank you for this guide.


Jan

Re: Phoca Download Plugin - right icon in Joomla article

Posted: 17 Jul 2010, 14:50
by fonk77
you're welcome!
Nice component, good work!

best regards : Jochen