jDownloadsownloads.com


Author Topic: Accessing System_Text from JDownloads Latest Module  (Read 597 times)

0 Members and 1 Guest are viewing this topic.

Offline mhoney

  • Newbie
  • *
  • Posts: 14
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:

Code: [Select]
// 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.

« Last Edit: 17.05.2020 11:03:43 by ColinM »

Offline ColinM

  • Moderator
  • *
  • Posts: 3.922
Re: Accessing System_Text from JDownloads Latest Module
« Reply #1 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