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

Accessing System_Text from JDownloads Latest Module

Started by mhoney, 15.05.2020 18:05:24

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mhoney

I would like to access the System.List from the JDownloads Latest module so I can add the system_text information to the newest downloads.  I found the code that does that for the Download Details but don't know how to add it to the Latest module, I'm not much of a programmer.

Here is the code I'd like to get working:

// set system value
        $this->item_sys_values = explode(',' , JDHelper::getOnlyLanguageSubstring($jlistConfig['system.list']));
        if ($this->item->system == 0 ) {
             $body = str_replace('{system_text}', '', $body);
        } else {
             $body = str_replace('{system_text}', $this->item_sys_values[$this->item->system], $body);
        }


When I try to use this to get the system_text I get an error about JDHelper not being found.

  •  

ColinM

HiIn general the layout 'placeholders' such as {system_text} are not available in jD modules.  It would be a useful addition to provide one or two such place holders - so need to make this a suggestion.
Note If you add special code it will be overwritten on the next upodate unless you use an override
Colin
Colin M
  •