jDownloads Support Forum

Older Versions => jDownloads 3.2 (Support ended) => General => Topic started by: mhoney on 15.05.2020 18:05:24

Title: Accessing System_Text from JDownloads Latest Module
Post by: mhoney on 15.05.2020 18:05:24
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.

Title: Re: Accessing System_Text from JDownloads Latest Module
Post by: ColinM on 17.05.2020 11:08:43
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