Хак похожих новостей DLE 9.6-9.7

  


То что уже давно ищут многие владельцев сайтов,которым надоело удалять повторявшие  файлы на сайте.
Я хочу вам представит Хак для DLE который поможет вам в удалении похожих файлов.
Думаю данный хак понадобится тем у кого много очень фалов, подойдет для сайтов варезников,
Работает дай ХАК только на версиях DLE 9.6-9.7. Можете так же еще интересных хаков найти у нас тут.

Этап установки :
1)Файл: /engine/modules/show.full.php

Найти:
Код
</span></font><span class="variable" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(181, 137, 0); white-space: pre;">$allowed_cats</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);"> = </span><span class="keyword" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(133, 153, 0); white-space: pre;">array</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);">();</span></div><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);">  
  </span><span class="keyword" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(133, 153, 0); white-space: pre;">foreach</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);"> (</span><span class="variable" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(181, 137, 0); white-space: pre;">$user_group</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);"> </span><span class="keyword" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(133, 153, 0); white-space: pre;">as</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);"> </span><span class="variable" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(181, 137, 0); white-space: pre;">$value</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);">) {
  </span><span class="keyword" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(133, 153, 0); white-space: pre;">if</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);"> (</span><span class="variable" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(181, 137, 0); white-space: pre;">$value</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);">[</span><span class="string" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(42, 161, 152); white-space: pre;">'allow_cats'</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);">] != </span><span class="string" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(42, 161, 152); white-space: pre;">"all"</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);"> </span><span class="keyword" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(133, 153, 0); white-space: pre;">AND</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);"> !</span><span class="variable" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(181, 137, 0); white-space: pre;">$value</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);">[</span><span class="string" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(42, 161, 152); white-space: pre;">'allow_short'</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);">] ) </span><span class="variable" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(181, 137, 0); white-space: pre;">$allowed_cats</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);">[] = </span><span class="variable" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(181, 137, 0); white-space: pre;">$db</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);">->safesql(</span><span class="variable" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(181, 137, 0); white-space: pre;">$value</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);">[</span><span class="string" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(42, 161, 152); white-space: pre;">'allow_cats'</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);">]);
  }
   
  </span><span class="keyword" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(133, 153, 0); white-space: pre;">if</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);"> (count(</span><span class="variable" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(181, 137, 0); white-space: pre;">$allowed_cats</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);">)) {
  </span><span class="variable" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(181, 137, 0); white-space: pre;">$allowed_cats</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);"> = implode(</span><span class="string" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(42, 161, 152); white-space: pre;">","</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);">, </span><span class="variable" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(181, 137, 0); white-space: pre;">$allowed_cats</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);">);
  </span><span class="variable" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(181, 137, 0); white-space: pre;">$allowed_cats</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);"> = explode(</span><span class="string" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(42, 161, 152); white-space: pre;">","</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);">, </span><span class="variable" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(181, 137, 0); white-space: pre;">$allowed_cats</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);">);
  </span><span class="variable" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(181, 137, 0); white-space: pre;">$allowed_cats</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);"> = array_unique(</span><span class="variable" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(181, 137, 0); white-space: pre;">$allowed_cats</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);">);
  sort(</span><span class="variable" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(181, 137, 0); white-space: pre;">$allowed_cats</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);">);
   
  </span><span class="keyword" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(133, 153, 0); white-space: pre;">if</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);"> (</span><span class="variable" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(181, 137, 0); white-space: pre;">$config</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);">[</span><span class="string" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(42, 161, 152); white-space: pre;">'allow_multi_category'</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);">]) {
   
  </span><span class="variable" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(181, 137, 0); white-space: pre;">$allowed_cats</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);"> = </span><span class="string" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(42, 161, 152); white-space: pre;">"category regexp '[[:<:]]("</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);"> . implode ( </span><span class="string" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(42, 161, 152); white-space: pre;">'|'</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);">, </span><span class="variable" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(181, 137, 0); white-space: pre;">$allowed_cats</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);"> ) . </span><span class="string" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(42, 161, 152); white-space: pre;">")[[:>:]]' AND "</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);">;
   
  } </span><span class="keyword" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(133, 153, 0); white-space: pre;">else</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);"> {
   
  </span><span class="variable" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(181, 137, 0); white-space: pre;">$allowed_cats</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);"> = </span><span class="string" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(42, 161, 152); white-space: pre;">"category IN ('"</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);"> . implode ( </span><span class="string" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(42, 161, 152); white-space: pre;">"','"</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);">, </span><span class="variable" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(181, 137, 0); white-space: pre;">$allowed_cats</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);"> ) . </span><span class="string" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(42, 161, 152); white-space: pre;">"') AND "</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);">;
   
  } </span><div><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);"> } </span><span class="keyword" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(133, 153, 0); white-space: pre;">else</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);"> </span><span class="variable" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(181, 137, 0); white-space: pre;">$allowed_cats</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);">=</span><span class="string" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(42, 161, 152); white-space: pre;">""</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);">;</span><font color="#807a73" face="Cuprum, sans-serif" size="2"><span style="line-height: 16px;">

Меняем на :
Код
</span></font><span style="color: rgb(147, 161, 161); font-family: Cuprum, sans-serif; font-size: 13px; font-style: italic; line-height: 16px; white-space: pre;">#*** Category Related News * by MSW ***#</span></div><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);"> </span><span class="variable" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(181, 137, 0); white-space: pre;">$cat_array</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);"> = </span><span class="keyword" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(133, 153, 0); white-space: pre;">array</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);">();
  </span><span class="keyword" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(133, 153, 0); white-space: pre;">foreach</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);">(</span><span class="variable" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(181, 137, 0); white-space: pre;">$cat_list</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);"> </span><span class="keyword" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(133, 153, 0); white-space: pre;">as</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);"> </span><span class="variable" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(181, 137, 0); white-space: pre;">$post_cat</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);">) {
  </span><span class="variable" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(181, 137, 0); white-space: pre;">$cat_array</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);"> = array_unique( array_merge( </span><span class="variable" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(181, 137, 0); white-space: pre;">$cat_array</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);">, explode( </span><span class="string" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(42, 161, 152); white-space: pre;">'|'</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);">, get_sub_cats( </span><span class="variable" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(181, 137, 0); white-space: pre;">$cat_info</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);">[</span><span class="variable" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(181, 137, 0); white-space: pre;">$post_cat</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);">][</span><span class="string" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(42, 161, 152); white-space: pre;">'parentid'</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);">] ) ) ) );
  }
  </span><span class="keyword" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(133, 153, 0); white-space: pre;">if</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);">(</span><span class="variable" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(181, 137, 0); white-space: pre;">$config</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);">[</span><span class="string" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(42, 161, 152); white-space: pre;">'allow_multi_category'</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);">]) {
  </span><span class="variable" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(181, 137, 0); white-space: pre;">$allowed_cats</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);"> = </span><span class="string" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(42, 161, 152); white-space: pre;">"category regexp '[[:<:]]("</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);">. implode( </span><span class="string" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(42, 161, 152); white-space: pre;">'|'</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);">, </span><span class="variable" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(181, 137, 0); white-space: pre;">$cat_array</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);"> ) .</span><span class="string" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(42, 161, 152); white-space: pre;">")[[:>:]]' AND "</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);">;
  } </span><span class="keyword" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(133, 153, 0); white-space: pre;">else</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);"> {
  </span><span class="variable" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(181, 137, 0); white-space: pre;">$allowed_cats</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);"> = </span><span class="string" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(42, 161, 152); white-space: pre;">"category IN ('"</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);">. implode( </span><span class="string" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(42, 161, 152); white-space: pre;">','</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);">, </span><span class="variable" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(181, 137, 0); white-space: pre;">$cat_array</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);"> ) .</span><span class="string" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(42, 161, 152); white-space: pre;">"') AND "</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);">;
  } </span><div><span style="color: rgb(147, 161, 161); font-family: Cuprum, sans-serif; font-size: 13px; font-style: italic; line-height: 16px; white-space: pre;">#*** Category Related News * by MSW ***#</span><font color="#807a73" face="Cuprum, sans-serif" size="2"><span style="line-height: 16px;">


2)Выполнить запрос в MySQL:

Код
</span></font><span class="keyword" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(133, 153, 0); white-space: pre; background-color: rgb(249, 250, 250);">UPDATE</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);"> </span><span class="string" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(42, 161, 152); white-space: pre; background-color: rgb(249, 250, 250);">`dle_post_extras`</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);"> </span><span class="keyword" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(133, 153, 0); white-space: pre; background-color: rgb(249, 250, 250);">SET</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);"> </span><span class="string" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(42, 161, 152); white-space: pre; background-color: rgb(249, 250, 250);">`related_ids`</span><span style="color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; white-space: pre; background-color: rgb(249, 250, 250);"> = </span><span class="string" style="margin: 0px; padding: 0px; border: 0px; font-family: Cuprum, sans-serif; font-size: 13px; line-height: 16px; vertical-align: baseline; color: rgb(42, 161, 152); white-space: pre; background-color: rgb(249, 250, 250);">""</span><span style="line-height: 16px; color: rgb(128, 122, 115); font-family: Cuprum, sans-serif; font-size: small;">

3) Очистить кеш в админке DLE.

Вот и все,пользуемся.

Хак похожих новостей DLE 9.6-9.7 - Хаки для dle - Каталог файлов - Все для uCoz, DLE, Joomla, скрипты для uCoz

Категория: Хаки для dle Просмотров: 1020