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

Short description on summary page?

Started by romagromov, 29.05.2015 14:47:29

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

romagromov

Hi!
I need to include short description on summary page.
Of course, placeholders does not work in this layout.
Also I need to add custom fields in summary layout.
And additional information: downloads count, license type, OS and Report Link!

Can you point me in right direction how to make this?

I tried to add  this code in /components/com_jdownloads/views/summary/tmpl/default.php

// custom fields
           $custom_fields_arr = JDHelper::existsCustomFieldsTitles();
           $row_custom_values = array('dummy',$files[$i]->custom_field_1, $files[$i]->custom_field_2, $files[$i]->custom_field_3, $files[$i]->custom_field_4, $files[$i]->custom_field_5,
           $files[$i]->custom_field_6, $files[$i]->custom_field_7, $files[$i]->custom_field_8, $files[$i]->custom_field_9, $files[$i]->custom_field_10, $files[$i]->custom_field_11, $files[$i]->custom_field_12, $files[$i]->custom_field_13, $files[$i]->custom_field_14);
           for ($x=1; $x<15; $x++){
               // replace placeholder with title and value
               if (in_array($x,$custom_fields_arr[0]) && $row_custom_values[$x] && $row_custom_values[$x] != '0000-00-00'){
                   $html_file = str_replace("{custom_title_$x}", $custom_fields_arr[1][$x-1], $html_file);
                   if ($x > 5){
                       $html_file = str_replace("{custom_value_$x}", stripslashes($row_custom_values[$x]), $html_file);
                   } else {
                       $html_file = str_replace("{custom_value_$x}", $custom_fields_arr[2][$x-1][$row_custom_values[$x]], $html_file);
                   }    
               } else {
                   // remove placeholder
                   if ($jlistConfig['remove.field.title.when.empty']){
                       $html_file = str_replace("{custom_title_$x}", '', $html_file);
                   } else {
                       $html_file = str_replace("{custom_title_$x}", $custom_fields_arr[1][$x-1], $html_file);
                   }    
                   $html_file = str_replace("{custom_value_$x}", '', $html_file);
               }    
           }



But this method does not work.

Thanks.
Best free windows software for your PC at bestwinsoft.com
  •  

romagromov

Best free windows software for your PC at bestwinsoft.com
  •  

Arno

Hi,
sorry again for the delay.  :-\
Have you tried to use the {description} placeholder?

Maybe can be the problem that we must on the summary page display the content from more as only a single Download? ::)
But i will see what i can do here.
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

romagromov

Quote from: Arno on 20.06.2015 14:07:02
Hi,
sorry again for the delay.  :-\
Have you tried to use the {description} placeholder?

Maybe can be the problem that we must on the summary page display the content from more as only a single Download? ::)
But i will see what i can do here.

Hi!

{description} - does not work.

And I very need to displays additional information: downloads count, license type, Operating System and Report Link on summary page.

No, I use only 1 download on summary page.
Best free windows software for your PC at bestwinsoft.com
  •  

Arno

Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •