Jump to content
Дизайн и модификация IPS Community IPBSkinsBETA
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
alcatras

Ограничить добавление файлов в загрузках

Recommended Posts

Как ограничить количество добавляемых файлов в загрузках? Как на хостинг, так и по url.

Share this post


Link to post

\applications\downloads\modules\front\downloads\submit.php

\applications\downloads\modules\front\downloads\view.php

найти

'allowedFileTypes' => $category->types,

заменить на

'allowedFileTypes' => $category->types, 'maxFiles' => 5,

 

найти

$form->add( new \IPS\Helpers\Form\Stack( 'url_files', isset( $data['url_files'] ) ? $data['url_files'] : array(), FALSE, array( 'stackFieldType' => 'Url' ), array( 'IPS\downloads\File', 'blacklistCheck' ) ) );

заменить на

$form->add( new \IPS\Helpers\Form\Stack( 'url_files', isset( $data['url_files'] ) ? $data['url_files'] : array(), FALSE, array( 'stackFieldType' => 'Url', 'maxItems' => 5 ), array( 'IPS\downloads\File', 'blacklistCheck' ) ) );

найти

$form->add( new \IPS\Helpers\Form\Stack( 'url_files', $linkedFiles, FALSE, array( 'stackFieldType' => 'Url' ), array( 'IPS\downloads\File', 'blacklistCheck' ) ) );

заменить на

$form->add( new \IPS\Helpers\Form\Stack( 'url_files', $linkedFiles, FALSE, array( 'stackFieldType' => 'Url', 'maxItems' => 5 ), array( 'IPS\downloads\File', 'blacklistCheck' ) ) );

  • Upvote 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...