News:

Support for jDownloads 3 has been ended
Since 17 August 2023 Joomla.org has discontinued support for Joomla 3.x. Therefore, we will no longer offer official support for our Joomla 3 jDownloads version 3.9.x from January 2024.
Please update your website to the latest Joomla version (Joomla 4 or Joomla 5) as soon as possible. Afterwards, please update jDownloads to the latest published version. The longer you delay, the more difficult the upgrade process for your website is likely to be.

Main Menu
Support-Forum

Problem with layout with checkboxes and vie on all-download page

Started by kaddibo, 06.07.2016 20:39:06

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kaddibo

Hello ,
I have made a layout with 2 different areas.

The first one is not a download it is a preview for video files.
The video is only shown in the details page and only for specific User group. This download doesnt have a download file.

The second normal downloadfiles  with files only to download for guest or usergroup.

1.----------------------------------------------
My problem the checkbox_top and the form_button shouldbe hidden if there are no files to download or there are no permission to download. I have tried a lot in the override-file but I'm not a php-freak. Could anybody help with the override?

2.------------------------------------
My second problem is, that in the view "Alle Downloads"
http://bst.trittec.de/component/jdownloads/all?Itemid=-1

no Icons is visible width the info tooltip like lock
http://bst.trittec.de/component/jdownloads/category/8-formulare-programme?Itemid=-1
or eye
http://bst.trittec.de/component/jdownloads/category/2-schulungen?Itemid=-1

I dont know why, but in the original layouts of the component this was the same. How could i make them visible in the override?

Thank you



  •  

ColinM

Hi
I will try to help.  Your  layouts look nice.  Please excuse all the questions but I need to understand. :)
First could you let us know: Which version of jD and which version of Joomla!

Also where did the 'eye' and 'lock' images come from.  Did you upload them?

Have you changed any of the PHP files?

Also is your first type of layout, where there is no downloadable file, really meant to be describing a Category or sub category of the type of Downloads in the Category?  If this is the case there is a simpler solution.


jD uses language files so you will only find the text string "Select all files:" in the language files.  A little error has occurred with the German Translation file as the string is still the same as the English version.
Both the English and the German language files have COM_JDOWNLOADS_SETTINGS_INSTALL_1="<b>Select all files: </b>"
It is COM_JDOWNLOADS_SETTINGS_INSTALL_1 that is used in the php code.  This occurs in com_jdownloads\script.php in the middle of a database related query -Please do not attempt to change!!



Problem 1
A Download consists of multiple parts such as images, description, a downloadable file.  It is still a Download in jD terms if some parts are absent. This includes cases where there is no downloadable file
If there are no Downloads then jD does not produce the text line and checkbox with Select all files:
You actually have a Download but it does not have a file to download.
When there is no file to Download then an individual checkbox does not appear alongside the file name.
So we have an obscure bug that if no listed Download has a downloadable file then the Select all files:  and associated checkbox, and the Continue (Fortfahren) button should not appear.




Problem 2
I will need to ck further here.
But please could you check all is well (apart from above) if you use one of the standard v3.2 Files layouts.
Also could you export your layouts (they are exported as xml files) and then send to me by PM so I may study them in order to advise.  Also any associaed images and icons.


Colin
Colin M
  •  

kaddibo

Hello Collin,
I have sendt you an PM.
Thank you for your time.
  •  

ColinM

Hi Katrin
Got your PM and will look further.

First however regarding Problem 1 as I said you have discovered an obscure bug.
QuoteSo we have an obscure bug that if no listed Download has a downloadable file then the Select all files:  and associated checkbox, and the Continue (Fortfahren) button should not appear.
As yet that has not been added to the bug list but I will list it today and reference you posting.

Also it is standard that checkboxes ONLY work when it is a 'List All Categories display and similar - or putting another way they do not work when one uses List All Downloads.  There reasons for this are I believe historic and have origins in the earliest version 1 releases of jD. I will ask Arno to explain further.

I need to understand why you need the two layouts.
Is the first one is to show information about several Downloads to public and guests OR is it for each Download.  I ask as there may be better solutions.  Please advise.

I think that the second layout is meant as the actual Download one for registered users. Is that correct?

Colin
Colin M
  •  

kaddibo

Hi Collin,
first sorry for my english. I hope i unsterstood everything right.
So the bug is maybe only a bug for me, because its a download component that i wanted zu use for further reasons.

I wanted a preview for guests for all downloads and videos. its a need of the company i work to inform interested partner, what support they can get.
So the read more is only visible for partners. public downlads could easyly downloaded via downloadbutton.
The videos should only be seen from partners. The Idea was to have video workshops as preview (only image) for guests and video player and especially download file when needed for partners.

So if that is a problem I think the videothing should be killed and moved to Newspart of the website. If there is a  download I could load ist there in the article. Then the select thing wouldn't be a problem.
What do you think.

regards Katrin


  •  

kaddibo

The solution for the checkbox language thing I have found now.
The Checkbox-Text can be overrided in the konfiguration Tab Frontend.
There is a Field Checkbox-Text. I have written there as in the picture. Now the select label has a german text.

[gelöscht durch Administrator]
  •  

ColinM

Katrin
I had forgotten that set up in config - Frontend!!!

Please look at the Hide functionality in the jDownloads System Plugin.  I have not used it thoroughly but it may be a good solution.
I will test on a standard layout where parts are only visible to Registered users.
Have some meetings most of today
Colin
Colin M
  •  

ColinM

Katrin
I think your requirements may be met using standard jD features.  Please see the two pics attached.
The first pic shows the Download when viewed by Public or Guest. The second one shows much more information including ability to download, see more text, see the details and any audio or video preview..

I have modified a Files layout to include the 'hide' functionality to control what is shown for images, previews and Details. What is shown in the Description is set in the Download itself.
The Download is setup with Public view Access and Registered permission to Download.

In the pics shown clicking on the Download name will go to another view that tells user they cannot download. But that behaviour is selectable. See
http://www.jdownloads.net/documentations/item/download-actions-direct-via-summary-page-or-via-download-details

I will PM you the layout I used for the above

Colin


[gelöscht durch Administrator]
Colin M
  •  

kaddibo

Hello Collin,
Thank you for your advise. I have found another possibility.
I overrided the file categoriy/default in line 1403.

if ($user_can_see_download_url){               
$detail_link_text = '<a href="'.$title_link.'" class="btn btn-primary">'.JText::_('COM_JDOWNLOADS_FE_DETAILS_LINK_TEXT_TO_DETAILS').'</a>';}
else {$detail_link_text = '';}



I used another if  for the permission. So the read more will only be seen if you have the permission to download a file.
For the preview you can only see the read mor if you have the permissen to download if there was one. If there is some reason for hiding a video for example I can also do it like you say.

I also did some other ovverrides. It took me a lot of time. But now I have the views that I wanted.
The only thing is the bug with the select all files an the form-button. But its ok for now.
If there is any solution for the bug please send me a message.

When I' am done with all views and downloads I will write a summary of all changes I have made to get this layouts working.

Thank you very much.  :)

  •