Атаман Posted July 25, 2013 Share Posted July 25, 2013 Возникла ситуация удалить потерянные файлы и миниатюры с целью экономии места. Загрузку файлов делал с помощью Стандартный скрипт через Пересчет и обновление работает только для постов на форуме. А для Ip.Content не хочетХочу изменить размер миниатюр, у удалить потеряные вложения. /uploads/monthly_07_2013/post--1-1-1111111. А с таким названием не проверяет. Я так понимаю rebuild.php /uploads/monthly_07_2013/ccs-1-1-1111111.jpg Если кто-то владеет информацией подскажите пожалуйста. Link to comment Share on other sites More sharing options...
Атаман Posted July 25, 2013 Author Share Posted July 25, 2013 Я так понимаю нужно прописать. Найти: $this->DB->build( array( 'select' => '*', 'from' => 'attachments', 'where' => "attach_rel_module IN('post','msg')", 'order' => 'attach_id ASC', 'limit' => array($start,$end) ) ); $outer = $this->DB->execute(); Заменить: $this->DB->build( array( 'select' => '*', 'from' => 'attachments', 'where' => "attach_rel_module IN('post','msg','ccs')", 'order' => 'attach_id ASC', 'limit' => array($start,$end) ) ); $outer = $this->DB->execute(); Link to comment Share on other sites More sharing options...
siv1987 Posted July 25, 2013 Share Posted July 25, 2013 Попробуй. По идее так. 1 Link to comment Share on other sites More sharing options...
Атаман Posted July 25, 2013 Author Share Posted July 25, 2013 Сейчас на виртуалку сайт загружу. То очень много вложений. Link to comment Share on other sites More sharing options...
siv1987 Posted July 25, 2013 Share Posted July 25, 2013 Там еще и во втором запросе поменять нужно. Link to comment Share on other sites More sharing options...
Атаман Posted July 25, 2013 Author Share Posted July 25, 2013 Там еще и во втором запросе поменять нужно. Увидел, там для миниатюр, процесс пошел. Миниатюры меняют разрешение. Link to comment Share on other sites More sharing options...
Атаман Posted July 25, 2013 Author Share Posted July 25, 2013 cleanattachments Не работает. Что-то пропустил. Link to comment Share on other sites More sharing options...
Атаман Posted July 25, 2013 Author Share Posted July 25, 2013 Пробую else if ( strstr( $file, 'post-','ccs' ) ) Link to comment Share on other sites More sharing options...
siv1987 Posted July 25, 2013 Share Posted July 25, 2013 cleanattachments Не работает. Что-то пропустил. strstr( $nfile->getFilename(), 'post-' )заменить на: strstr( $nfile->getFilename(), 'post-' ) OR strstr( $nfile->getFilename(), 'ccs-' ) strstr( $file, 'post-' )заменить на: strstr( $file, 'post-' ) OR strstr( $file, 'ccs-' ) 1 Link to comment Share on other sites More sharing options...
Атаман Posted July 25, 2013 Author Share Posted July 25, 2013 Спасибо, сейчас попробую. Link to comment Share on other sites More sharing options...
Атаман Posted July 25, 2013 Author Share Posted July 25, 2013 Работает, спасибо еще раз. Link to comment Share on other sites More sharing options...
Атаман Posted July 25, 2013 Author Share Posted July 25, 2013 Правим: rebuild.php (\admin\applications\core\modules_admin\tools) Ищем: $this->DB->build( array( 'select' => '*', 'from' => 'attachments', 'where' => "attach_rel_module IN('post','msg')", 'order' => 'attach_id ASC', 'limit' => array($start,$end) ) ); $outer = $this->DB->execute(); Меняем: $this->DB->build( array( 'select' => '*', 'from' => 'attachments', 'where' => "attach_rel_module IN('post','msg','ccs')", 'order' => 'attach_id ASC', 'limit' => array($start,$end) ) ); $outer = $this->DB->execute(); Ищем: $tmp = $this->DB->buildAndFetch( array( 'select' => 'attach_id', 'from' => 'attachments', 'where' => "attach_rel_module IN('post','msg')", 'limit' => array($dis,1) ) ); $max = intval( $tmp['attach_id'] ); Меняем: $tmp = $this->DB->buildAndFetch( array( 'select' => 'attach_id', 'from' => 'attachments', 'where' => "attach_rel_module IN('post','msg','ccs')", 'limit' => array($dis,1) ) ); $max = intval( $tmp['attach_id'] ); Ищем:strstr( $nfile->getFilename(), 'post-' )Меняем:strstr( $nfile->getFilename(), 'post-' ) OR strstr( $nfile->getFilename(), 'ccs-' )Ищем:strstr( $file, 'post-' )Меняем:strstr( $file, 'post-' ) OR strstr( $file, 'ccs-' ) 1 Link to comment Share on other sites More sharing options...
Атаман Posted November 4, 2013 Author Share Posted November 4, 2013 Для ipb 3.4.6 Правка последняя отличается else if ( strstr( $file->getFilename(), 'post-' ) OR strstr( $file, 'ccs-' ) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now