News:

Dear forum visitors, if the support forum is not available, please try again a few minutes later. Thanks!

Main Menu
Support-Forum

Read more url in files layout

Started by TE_, 26.04.2015 12:16:03

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

TE_

Hi,

iam trying to make an layout for files which would display only the "thumbnail image" of the file in the view where after clicking the image the details will be displayed. The problem is i cant find the "right" placeholder which represent just the "read more" url which i could add to the "a" tag. I tried to add the {link_to_details} placeholder but it geenrates the "read more" button and cant be used inside the "a" tag. Any idea what placeholder could do it or any trick?

iam using the jDownloads Version 3.2.31

regards,
Tomas
  •  

ColinM

Hi
This sounds a nice idea.  I do not think there is a totally suitable place holder but see below.  I think you should put this in Suggestions.
I understand that by "read more" you would like to go to the Summary page.  Is that correct?

Apart from the Download button  the other item that goes to the Summary, if set in Config, is the Download name.  So a move in the direction would be to  arrange that the name is say below the thumbnail, and make it multi column so you have a 'mosaic' of thumbnails.  You would need something like that anyway.
To make the thumbnail as the download link would require an extra config parameter, and of course a new placeholder with relevant supprt code.

Colin
Colin M
  •  

TE_

Hi Colin,

yes, i want to point to the "summary page". Reading your reply in the morning i decided to look on the php template code and added two "custom" place holders for this purpose, wasnt so hard  ::) anyway, now iam thinking if its fit my expectations, anyway will play with this a bit and will see what will be the output... However, if anyone would like to do the same, here are the changes:

in \com_jdownloads\views\category\tmpl\default.php:


                $url_link_text = $title_link; 
                $alt_link_text = $files[$i]->file_title;
and

                $html_file = str_replace('{url_to_details}', $url_link_text, $html_file);
                $html_file = str_replace('{alt_to_details}', $alt_link_text, $html_file);



the layout will after look like this:


{files_title_begin}<div style="background-color:#EFEFEF; padding:6px;">
{files_title_text}</div>{files_title_end}
  <div style='float:left;width:25%'>
        {screenshot_begin}<a href="{url_to_details}"><img src="{thumbnail}" alt="{alt_to_details}" /></a>{screenshot_end}
</div>


regards,

Tomas
  •  

ColinM

Hi Tomas
You might also want to make changes to \com_jdownloads\views\files\tmpl\default.php

Please see http://www.jdownloads.net/documentations/item/which-layout-is-used-where as jD uses different layouts at different stages.

Colin
Colin M
  •  

TE_

Hi Colin,

thank you for the hint. I will try to adjust the settings to my layout and will see how it will behave :). Will post after the link to it.

regards,

Tomas
  •  

pistapasta

Please add this code natively in next version of jdownloads... :'( :'( :'(
  •  

ColinM

#6
Hi
Presently Downloads are shown with a Download icon picture, a Download name and various other information including the Download button. 
What I understand is that you would like a Layout that just shows the file icon picture.

Now one can control from the Config parameters what happens when a user clicks on the Download icon picture or the Download name; and also what happens when a user clicks on a Download button.  This is explained in
http://www.jdownloads.net/documentations/item/download-actions-direct-via-summary-page-or-via-download-details

If you look at the new v3.2 layouts you will find one called Files link only v3.2 in the Files Section.  That was specifically designed just to show the Download name, the version and pics for New and Hot if those criteria apply.

It consists of just a single line of html code as below
<div class = "jd_files_oneline" style="">{file_title}{release}{pic_is_new}{pic_is_hot}{pic_is_updated} </div>

This layout was designed for the content plugin.  If however it is activated as the Files layout then it will produce a picture such as attatched.  This looks a bit messy

However if I add a bit of css style and remove some  placeholders it will look like the second pic.  It could be improved further but I only spent a few minutes just to demonstrate possibilities. Obviously it could be changed to show  just the file icon or icon and name.

If you could let me know with maybe a rough picture of what you would like I will set up a new layout for you.  This will appear in the Layout Library that we will be adding to the available Downloads.

Colin

Colin

[gelöscht durch Administrator]
Colin M
  •