News:

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

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!
  •