Jump to content

IP.Downloads, how to list files from specific category


WhyCry

Recommended Posts

Sorry if these questions were asked before, but I couldn't find anything.

  1. 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? 
     
  2. 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?

     
  3. How to disable default value for file VERSION?

Thanks!

 

Link to comment
Share on other sites

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/downloads

find 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 ) ) );

 

Link to comment
Share on other sites

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/downloads

find 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.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...