WhyCry Posted April 26, 2015 Posted April 26, 2015 Sorry if these questions were asked before, but I couldn't find anything. I'm trying to fetch 10 files from each download category ID by modifying my templates.I found some reference in recentFiles template, but the $files variable is already passed to this widget with the data.{{if count( $files )}} {{foreach $files as $file}} {template="fileRow" group="widgets" app="downloads" params="$file, $orientation"} {{endforeach}} {{else}} no files {{endif}} So question is, how do I populate $files variable with files from specific category? When browsing category parent, I see 'No files in this category yet.' message.I'm treating parent categories as containers, I'm not planning to add any files there (files will be added to children only). So I'm wondering, is there any way to show files in parent category from children categories instead? How to disable default value for file VERSION? Thanks!
WhyCry Posted April 28, 2015 Author Posted April 28, 2015 Maybe someone can at least guide me to documentation where I can find the answers to these questions?
sasiko Posted April 30, 2015 Posted April 30, 2015 just wanna share my discovery,to disable file version complete you need to edit one file manually submit.php located on /forum/applications/downloads/modules/front/downloadsfind the line row 182 and remove this code line or to just change value just change the numbers$form->add( new \IPS\Helpers\Form\Text( 'file_version', '1.0.0', FALSE, array( 'maxLength' => 32 ) ) );
WhyCry Posted April 30, 2015 Author Posted April 30, 2015 just wanna share my discovery,to disable file version complete you need to edit one file manually submit.php located on /forum/applications/downloads/modules/front/downloadsfind the line row 182 and remove this code line or to just change value just change the numbers$form->add( new \IPS\Helpers\Form\Text( 'file_version', '1.0.0', FALSE, array( 'maxLength' => 32 ) ) ); Thanks for sharing. Modifying core files means that any modifications will be overwritten with the upgrade.It would be better to come up with a hook that would disable this line, or maybe simple javascript to just remove this from the submit page.I decided not to use versioning in IPDownloads, because it reduces the control over each entry. File edit is not allowing to add more files/change version once file is posted.Also without versioning each revision is shown in RSS feed separately, which is not happening when versioning is enabled.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.