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

Placeholders?Where can I modify them?

Started by robotnick, 22.07.2014 18:42:50

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

robotnick

Hi!
I've been checking the 3.2 documentation and I'm unable to find an answer, same with old documentation.
As far as I understand, the  {placeholders} are used in the Layouts so we can flexible addapt them to our needs. This is a great feature.

However, I've the following issue:
Where are the {placeholders} defined?E.g: {files_title_text} is substituted automagically by "Files:" string. Where does that "Files:" come from?So I can tell it to paint "Your files:"?

Also, my kindly suggestion is to remove styles from all the placeholders, otherwise the Layout forms loses part of its big potential.
E,g: The placeholder {pic_is_new} is in my case substituted by <span class="jdbutton jorange jstatus"> NEW </span>.

If I want to modify how the "New item" button is shown, I'm forced to:
a)Discover where the {pic_is_new} is defined so i can change it to, e.g, <span class="myownstyle">New</span>. This is the correct way.
b)The hackish way, hacking the jorange/jdbutton/jstatus class in the .css file so instead painting an orange button it paints a purple one.

Hope the suggestion makes sense and someone also can help me finding where those {placeholders} come from.

  •  

Arno

Hi.
QuoteWhere are the {placeholders} defined?E.g: {files_title_text} is substituted automagically by "Files:" string. Where does that "Files:" come from?So I can tell it to paint "Your files:"?
The label text comes from the language files. So when you need a other text, search it in your frontend language file and change it. You can do this in the jD layout manager.
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

robotnick

Thanks Arno, and the {pic_is_new}? So I can modify its styling   :)
  •  

Arno

Quote from: robotnick on 23.07.2014 13:00:19
Thanks Arno, and the {pic_is_new}? So I can modify its styling   :)
- when you have selected a pic for this status, it is used in the default php like this:
   
        $newpic = '<img src="'.JURI::base().'images/jdownloads/newimages/'.$jlistConfig['picname.is.file.new'].'" alt="" />';

        // compute for NEW symbol
        $days_diff = JDHelper::computeDateDifference(date('Y-m-d H:i:s'), $this->item->date_added);
        if ($jlistConfig['days.is.file.new'] > 0 && $days_diff <= $jlistConfig['days.is.file.new']){
            // is the old button used?
            if ($jlistConfig['use.css.buttons.instead.icons'] == '0'){           
                $body = str_replace('{pic_is_new}', $newpic, $body);
            } else {
                // CSS Button is selected
                $body = str_replace('{pic_is_new}', '<span class="jdbutton '.$status_color_new.' jstatus">'.JText::_('COM_JDOWNLOADS_NEW').'</span>', $body);
            }   
        } else {   
            $body = str_replace('{pic_is_new}', '', $body);
        }

- when you have activated the new css buttons in jD configuration, you can change the css classes in the file: JOOMLA/components/com_jdownloads/assets/css/jdownloads_buttons.css
- this can you also do in the jD layout manager
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •