jDownloadsownloads.com

Support-Forum

jDownloads for Joomla 3.x => jDownloads 3.9 => Suggestions - Feature Request => Topic started by: tschortsch.de on 22.03.2020 15:18:20

Title: Add Author to Module
Post by: tschortsch.de on 22.03.2020 15:18:20
Hello,
I'd like to add the author to the module jdownloads_latest.
Could you please help me?

Yours Georg
Title: Re: Add Author to Module
Post by: 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:
Code: [Select]
// 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.
Title: Re: Add Author to Module
Post by: 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?
Title: Re: Add Author to Module
Post by: tschortsch.de on 10.04.2020 16:25:05
but 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?
Title: Re: Add Author to Module
Post by: tschortsch.de on 10.04.2020 16:27:31
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?
Title: Re: Add Author to Module
Post by: ColinM on 11.04.2020 11:00:29
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
Title: Re: Add Author to Module
Post by: tschortsch.de on 11.04.2020 16:06:49
go to /modules/mod_jdownloads_latest/tmpl
make a duplicate of alternative.php      

add the following code at line 150:
Code: [Select]
// 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?
Title: Re: Add Author to Module
Post by: ColinM on 12.04.2020 16:09:29
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
Title: Re: Add Author to Module
Post by: tschortsch.de on 13.04.2020 16:36:16
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.