Hi,
First of all, I'd like to thank you for your great work towards improving experience with Joomla!
I have no words to say how much your work has helped me
Now the thing: When I use Phoca Download Plugin, it displays a frame and inside there is an icon for download and the name of the file. I'd like it to display only the icon and nothing more (no frames, no different backgrounds, no filenames).
I presume the file phocadownload.css is responsible for that but i have no idea what I should edit there.
Thanks for your help
[Phoca download plugin] Only the icon visible
-
- Phoca Newbie
- Posts: 3
- Joined: 15 Oct 2009, 13:07
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: [Phoca download plugin] Only the icon visible
Hi, not only the css but the php too. you should remove the link and add the url on the image then. so this needs to be customized in the css and php file too (I didn't do such changes so I don't know what exactly needs to be edited there ).
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 3
- Joined: 15 Oct 2009, 13:07
Re: [Phoca download plugin] Only the icon visible
Hi,
Thank you for your reply
In that case I'll just wait for someone who will be able to do that.
Thank you for your reply
In that case I'll just wait for someone who will be able to do that.
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: [Phoca download plugin] Only the icon visible
Ok
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 3
- Joined: 11 May 2010, 01:53
Re: [Phoca download plugin] Only the icon visible
I know it's been a while since this was requested but I just needed this fix recently and figured it out. Hopefully, this will help others who are searching.
Disclaimer: I've only tested this for the specific purpose of removing the download icon and wrapping box within an article, when creating a 'direct file' link. Read through first to avoid even more stress!
THIS TWEAK will remove the fancy CSS styling of a download link (download icon, box frame, etc.) and simply present the text link....
Step 1:
Path your way over to the plugin CSS file...
plugins/content/phocadownload/css/phocadownload.css
Open this file to edit...
Step 2:
At this point, you simply comment block out whatever CSS snippet you are using. For example, in my use, I was only concerned with 'file' links appearing in my articles which were originally set for size 16; so I just comment blocked as follows (I bold to better identify snippet):
/*
.phocadownloadfile16 {
background: #fdfdfd url(../images/icon-download-16.png) 5px center no-repeat;
border:1px solid #cccccc;
margin:5px;
padding: 5px 5px 5px 25px;
}*/
WALLAH! Refresh your page and the cute download icon, box, etc...is GONE; only a simply text link is left.
Step 3 (Optional):
The above step two may work for you but what I didn't like is that my text links ended up separate lines (or 'blocked' in CSS lingo). To fix this, un-comment block the code (from above sample) and add the 'display: inline;' line, comment-block everything else. Sample:
.phocadownloadfile16 {
display: inline;
/*
background: #fdfdfd url(../images/icon-download-16.png) 5px center no-repeat;
border:1px solid #cccccc;
margin:5px;
padding: 5px 5px 5px 25px;
*/
}
Now your text should stay inline with the rest of your text.
I always comment block instead of deleted the original code. This allows me to revert back in case I screw something up or want to copy/modify it to something else.
Hope this helps!
Disclaimer: I've only tested this for the specific purpose of removing the download icon and wrapping box within an article, when creating a 'direct file' link. Read through first to avoid even more stress!
THIS TWEAK will remove the fancy CSS styling of a download link (download icon, box frame, etc.) and simply present the text link....
Step 1:
Path your way over to the plugin CSS file...
plugins/content/phocadownload/css/phocadownload.css
Open this file to edit...
Step 2:
At this point, you simply comment block out whatever CSS snippet you are using. For example, in my use, I was only concerned with 'file' links appearing in my articles which were originally set for size 16; so I just comment blocked as follows (I bold to better identify snippet):
/*
.phocadownloadfile16 {
background: #fdfdfd url(../images/icon-download-16.png) 5px center no-repeat;
border:1px solid #cccccc;
margin:5px;
padding: 5px 5px 5px 25px;
}*/
WALLAH! Refresh your page and the cute download icon, box, etc...is GONE; only a simply text link is left.
Step 3 (Optional):
The above step two may work for you but what I didn't like is that my text links ended up separate lines (or 'blocked' in CSS lingo). To fix this, un-comment block the code (from above sample) and add the 'display: inline;' line, comment-block everything else. Sample:
.phocadownloadfile16 {
display: inline;
/*
background: #fdfdfd url(../images/icon-download-16.png) 5px center no-repeat;
border:1px solid #cccccc;
margin:5px;
padding: 5px 5px 5px 25px;
*/
}
Now your text should stay inline with the rest of your text.
I always comment block instead of deleted the original code. This allows me to revert back in case I screw something up or want to copy/modify it to something else.
Hope this helps!
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: [Phoca download plugin] Only the icon visible
Hi, thank you for the guide.
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 13
- Joined: 13 May 2008, 00:54
Re: [Phoca download plugin] Only the icon visible
Hi there, I have both the component and the plugin working perfectly. Thanks for making them available!
However, I would also like to have only an icon, instead of turning the "title" into a link.
I don't have all the elements to judge, but i believe that this method of activating the download by using the title is a little bit intrusive. If what the plugin does is to associate an article with a "file to download", why making the title the "link to download it? In my case, the file to download is not related to the article, or to the article's title, thus, it shouldn't use the title as a link. I'm only providing a scenario where that logic don't work as right. Please consider in future releases to provide both options to use only an icon, or the title (or maybe a better one).
As for right now, the CSS changes are easy to make, but the PHP changes are not, at least for me! Do you know what changes to the php need to be done in order to add the link to an image instead of to the "title"?
Thanks a mil
fdkid
However, I would also like to have only an icon, instead of turning the "title" into a link.
I don't have all the elements to judge, but i believe that this method of activating the download by using the title is a little bit intrusive. If what the plugin does is to associate an article with a "file to download", why making the title the "link to download it? In my case, the file to download is not related to the article, or to the article's title, thus, it shouldn't use the title as a link. I'm only providing a scenario where that logic don't work as right. Please consider in future releases to provide both options to use only an icon, or the title (or maybe a better one).
As for right now, the CSS changes are easy to make, but the PHP changes are not, at least for me! Do you know what changes to the php need to be done in order to add the link to an image instead of to the "title"?
Thanks a mil
fdkid
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: [Phoca download plugin] Only the icon visible
Hi, added into the feature request list.
For now this needs to becustomized in php, so the title will be removed:
plugins/content/phocadownload/phocadownload.php (not sure if this is correct, I am not on my PC now)
Jan
For now this needs to becustomized in php, so the title will be removed:
plugins/content/phocadownload/phocadownload.php (not sure if this is correct, I am not on my PC now)
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 13
- Joined: 13 May 2008, 00:54
Re: [Phoca download plugin] Only the icon visible
Hi Jan, thanks for your prompt response.
I've been giving it a lot of try and error without success, i'm not a developer. I know from many other posts that you're super busy, but if you could find the time to take a look at that code it will be much appreciated. If, however, i succeed, will come back here ASAP with whatever i could come up with. Many thanks for the phoca + components. cheers
I've been giving it a lot of try and error without success, i'm not a developer. I know from many other posts that you're super busy, but if you could find the time to take a look at that code it will be much appreciated. If, however, i succeed, will come back here ASAP with whatever i could come up with. Many thanks for the phoca + components. cheers
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: [Phoca download plugin] Only the icon visible
plugins/content/phocadownload/phocadownload.php
There are a lot of places where to change it (because there is sections, section, category, file, ... link) So you should look at the section you are interested - e.g. category view, e.g. filepreviewlink:
line cca 458 or 468
The $textOutput needs to be changed - you can find it on other places in the code too.
Jan
There are a lot of places where to change it (because there is sections, section, category, file, ... link) So you should look at the section you are interested - e.g. category view, e.g. filepreviewlink:
line cca 458 or 468
Code: Select all
$output .= '<div class="phocadownloadfile'.(int)$iSize.'"><a href="'. JRoute::_($link).'" '.$targetOutput.'>'. $textOutput.'</a></div>';
Jan
If you find Phoca extensions useful, please support the project