Hello,
I'd like to add the author to the module jdownloads_latest.
Could you please help me?
Yours Georg
go to /modules/mod_jdownloads_latest/tmpl
make a duplicate of alternative.php
add the following code at line 150:
// add the author
$html .= '<div style="padding-bottom: 3px; text-align:'.$date_alignment.';"><small><a href="'.$files[$i]->url_home .'">' .$files[$i]->author.'</a></small></div>';
You can also use url_author but both need to contain the full urls to work so: 'https://google.com'
Go to you module and select the new created layout at the 'Alternative Layout' list.
Maybe it is an idea if the layout function of jdownloads also would work for the modules?
Quote from: Tazzios on 07.04.2020 16:18:13but both need to contain the full urls to work so: 'https://google.com'
Sorry, but I do not understand that?
Where do I have to insert the url?
Quote from: Tazzios on 07.04.2020 16:43:29
Maybe it is an idea if the layout function of jdownloads also would work for the modules?
Yes, that would be great :)
Can you integrate the code in the module?
Hi
What Tazzios was saying is that when you specify the Author url in the Download it needs to be a full url including the https:// part.Colin
Quote from: Tazzios on 07.04.2020 16:18:13
go to /modules/mod_jdownloads_latest/tmpl
make a duplicate of alternative.php
add the following code at line 150:
// add the author
$html .= '<div style="padding-bottom: 3px; text-align:'.$date_alignment.';"><small><a href="'.$files[$i]->url_home .'">' .$files[$i]->author.'</a></small></div>';
Go to you module and select the new created layout at the 'Alternative Layout' list.
I tried it that way. But it didn't work.
The author isn't be shown...😥
What is wrong? Could you help me?
HiFirst just in case please make a backup of your site!!!
Please find attached a zip file called alternate-new.zip. Extract a file called alternate-new.phpCopy the php file to location <your site>\modules\mod_jdownloads_latest\tmpl\You should find a file called alternate.php there already - if it is not there check which location you are using.
pic Latest-module-01.png shows the results after doing the setup as noted below.
Check that tab menu assignment is set up to actually show the module! - see Latest-module-02.pngOn tab Advaced select 'alternate-nes' - see pic Latest-module-03.png
To test add an author name to one of the latest Downloads - see pic Latest-module-04.png
Best wishes
Colin
Hello Colin, thank you very much. It works ;-)
I made the mistake because I thought that the creator is showing.
But now I replaced the author with creator and it works.