Skip to content

Вложения

Возникла ситуация удалить потерянные файлы и миниатюры с целью экономии места.

 

Загрузку файлов делал с помощью

 

Стандартный скрипт через Пересчет и обновление работает только для постов на форуме. А для Ip.Content не хочет

Хочу изменить размер миниатюр, у удалить потеряные вложения.

 

/uploads/monthly_07_2013/post--1-1-1111111.

 

А с таким названием не проверяет. Я так понимаю rebuild.php

 

/uploads/monthly_07_2013/ccs-1-1-1111111.jpg

 

Если кто-то владеет информацией подскажите пожалуйста.

Featured Replies

  • Author

Я так понимаю нужно прописать.

 

Найти:

$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();

Попробуй. По идее так.

  • Author

Сейчас на виртуалку сайт загружу. То очень много вложений.

Там еще и во втором запросе поменять нужно.

  • Author

Там еще и во втором запросе поменять нужно.

 

Увидел, там для миниатюр, процесс пошел. Миниатюры меняют разрешение.

  • Author

cleanattachments Не работает. Что-то пропустил.

  • Author

Пробую

 

else if ( strstr( $file, 'post-','ccs' ) )

cleanattachments Не работает. Что-то пропустил.

 

strstr( $nfile->getFilename(), 'post-' )

заменить на: strstr( $nfile->getFilename(), 'post-' ) OR strstr( $nfile->getFilename(), 'ccs-' )

 

strstr( $file, 'post-' )

заменить на: strstr( $file, 'post-' ) OR strstr( $file, 'ccs-' )

  • Author

Спасибо, сейчас попробую.

  • Author

Работает, спасибо еще раз.

  • Author

Правим: 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-' )

  • 3 months later...
  • Author

Для ipb 3.4.6 Правка последняя отличается

 

else if ( strstr( $file->getFilename(), 'post-' ) OR strstr( $file, 'ccs-' )

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.