1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-07-03 06:55:03 +03:00

Merge pull request #116 from psnet/master

- вынос количества тегов в блоке "теги" в конфиг. в т.ч. персональных
This commit is contained in:
Mzhelskiy Maxim 2012-04-26 21:05:46 -07:00
commit 47f17cd5f3
15 changed files with 57 additions and 46 deletions

View file

@ -460,7 +460,7 @@ class ActionBlog extends Action {
/** /**
* Формируем постраничность * Формируем постраничность
*/ */
$aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.blog.users_per_page'),4,Router::GetPath('blog')."admin/{$oBlog->getId()}"); $aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.blog.users_per_page'),Config::Get('pagination.pages.count'),Router::GetPath('blog')."admin/{$oBlog->getId()}");
$this->Viewer_Assign('aPaging',$aPaging); $this->Viewer_Assign('aPaging',$aPaging);
$this->Viewer_AddHtmlTitle($oBlog->getTitle()); $this->Viewer_AddHtmlTitle($oBlog->getTitle());
@ -609,7 +609,7 @@ class ActionBlog extends Action {
/** /**
* Формируем постраничность * Формируем постраничность
*/ */
$aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.topic.per_page'),4,Router::GetPath('blog').$sShowType,array('period'=>$sPeriod)); $aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.topic.per_page'),Config::Get('pagination.pages.count'),Router::GetPath('blog').$sShowType,array('period'=>$sPeriod));
/** /**
* Вызов хуков * Вызов хуков
*/ */
@ -713,7 +713,7 @@ class ActionBlog extends Action {
$iMaxIdComment=$aReturn['iMaxIdComment']; $iMaxIdComment=$aReturn['iMaxIdComment'];
$aComments=$aReturn['comments']; $aComments=$aReturn['comments'];
if (Config::Get('module.comment.use_nested') and Config::Get('module.comment.nested_per_page')) { if (Config::Get('module.comment.use_nested') and Config::Get('module.comment.nested_per_page')) {
$aPaging=$this->Viewer_MakePaging($aReturn['count'],$iPage,Config::Get('module.comment.nested_per_page'),4,''); $aPaging=$this->Viewer_MakePaging($aReturn['count'],$iPage,Config::Get('module.comment.nested_per_page'),Config::Get('pagination.pages.count'),'');
if (!Config::Get('module.comment.nested_page_reverse') and $aPaging) { if (!Config::Get('module.comment.nested_page_reverse') and $aPaging) {
// переворачиваем страницы в обратном порядке // переворачиваем страницы в обратном порядке
$aPaging['aPagesLeft']=array_reverse($aPaging['aPagesLeft']); $aPaging['aPagesLeft']=array_reverse($aPaging['aPagesLeft']);
@ -785,7 +785,7 @@ class ActionBlog extends Action {
/** /**
* Формируем постраничность * Формируем постраничность
*/ */
$aPaging=$this->Viewer_MakePaging($aBlogUsersResult['count'],$iPage,Config::Get('module.blog.users_per_page'),4,$oBlog->getUrlFull().'users'); $aPaging=$this->Viewer_MakePaging($aBlogUsersResult['count'],$iPage,Config::Get('module.blog.users_per_page'),Config::Get('pagination.pages.count'),$oBlog->getUrlFull().'users');
$this->Viewer_Assign('aPaging',$aPaging); $this->Viewer_Assign('aPaging',$aPaging);
/** /**
* Вызов хуков * Вызов хуков
@ -863,8 +863,8 @@ class ActionBlog extends Action {
* Формируем постраничность * Формируем постраничность
*/ */
$aPaging=($sShowType=='good') $aPaging=($sShowType=='good')
? $this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.topic.per_page'),4,rtrim($oBlog->getUrlFull(),'/')) ? $this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.topic.per_page'),Config::Get('pagination.pages.count'),rtrim($oBlog->getUrlFull(),'/'))
: $this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.topic.per_page'),4,$oBlog->getUrlFull().$sShowType,array('period'=>$sPeriod)); : $this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.topic.per_page'),Config::Get('pagination.pages.count'),$oBlog->getUrlFull().$sShowType,array('period'=>$sPeriod));
/** /**
* Получаем число новых топиков в текущем блоге * Получаем число новых топиков в текущем блоге
*/ */

View file

@ -95,7 +95,7 @@ class ActionBlogs extends Action {
/** /**
* Формируем постраничность * Формируем постраничность
*/ */
$aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.blog.per_page'),4,Router::GetPath('blogs'),array('order'=>$sOrder,'order_way'=>$sOrderWay)); $aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.blog.per_page'),Config::Get('pagination.pages.count'),Router::GetPath('blogs'),array('order'=>$sOrder,'order_way'=>$sOrderWay));
/** /**
* Загружаем переменные в шаблон * Загружаем переменные в шаблон
*/ */

View file

@ -72,7 +72,7 @@ class ActionComments extends Action {
/** /**
* Формируем постраничность * Формируем постраничность
*/ */
$aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.comment.per_page'),4,Router::GetPath('comments')); $aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.comment.per_page'),Config::Get('pagination.pages.count'),Router::GetPath('comments'));
/** /**
* Загружаем переменные в шаблон * Загружаем переменные в шаблон
*/ */

View file

@ -116,7 +116,7 @@ class ActionIndex extends Action {
/** /**
* Формируем постраничность * Формируем постраничность
*/ */
$aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.topic.per_page'),4,Router::GetPath('index').'top',array('period'=>$sPeriod)); $aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.topic.per_page'),Config::Get('pagination.pages.count'),Router::GetPath('index').'top',array('period'=>$sPeriod));
/** /**
* Загружаем переменные в шаблон * Загружаем переменные в шаблон
*/ */
@ -160,7 +160,7 @@ class ActionIndex extends Action {
/** /**
* Формируем постраничность * Формируем постраничность
*/ */
$aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.topic.per_page'),4,Router::GetPath('index').'discussed',array('period'=>$sPeriod)); $aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.topic.per_page'),Config::Get('pagination.pages.count'),Router::GetPath('index').'discussed',array('period'=>$sPeriod));
/** /**
* Загружаем переменные в шаблон * Загружаем переменные в шаблон
*/ */
@ -194,7 +194,7 @@ class ActionIndex extends Action {
/** /**
* Формируем постраничность * Формируем постраничность
*/ */
$aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.topic.per_page'),4,Router::GetPath('index').'new'); $aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.topic.per_page'),Config::Get('pagination.pages.count'),Router::GetPath('index').'new');
/** /**
* Загружаем переменные в шаблон * Загружаем переменные в шаблон
*/ */
@ -227,7 +227,7 @@ class ActionIndex extends Action {
/** /**
* Формируем постраничность * Формируем постраничность
*/ */
$aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.topic.per_page'),4,Router::GetPath('index')); $aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.topic.per_page'),Config::Get('pagination.pages.count'),Router::GetPath('index'));
/** /**
* Загружаем переменные в шаблон * Загружаем переменные в шаблон
*/ */

View file

@ -110,7 +110,7 @@ class ActionPeople extends Action {
/** /**
* Формируем постраничность * Формируем постраничность
*/ */
$aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.user.per_page'),4,Router::GetPath('people').$this->sCurrentEvent.'/'.$oCountry->getId()); $aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.user.per_page'),Config::Get('pagination.pages.count'),Router::GetPath('people').$this->sCurrentEvent.'/'.$oCountry->getId());
/** /**
* Загружаем переменные в шаблон * Загружаем переменные в шаблон
*/ */
@ -148,7 +148,7 @@ class ActionPeople extends Action {
/** /**
* Формируем постраничность * Формируем постраничность
*/ */
$aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.user.per_page'),4,Router::GetPath('people').$this->sCurrentEvent.'/'.$oCity->getId()); $aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.user.per_page'),Config::Get('pagination.pages.count'),Router::GetPath('people').$this->sCurrentEvent.'/'.$oCity->getId());
/** /**
* Загружаем переменные в шаблон * Загружаем переменные в шаблон
*/ */
@ -228,7 +228,7 @@ class ActionPeople extends Action {
/** /**
* Формируем постраничность * Формируем постраничность
*/ */
$aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.user.per_page'),4,Router::GetPath('people').'index',array('order'=>$sOrder,'order_way'=>$sOrderWay)); $aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.user.per_page'),Config::Get('pagination.pages.count'),Router::GetPath('people').'index',array('order'=>$sOrder,'order_way'=>$sOrderWay));
/** /**
* Получаем алфавитный указатель на список пользователей * Получаем алфавитный указатель на список пользователей
*/ */

View file

@ -101,7 +101,7 @@ class ActionPersonalBlog extends Action {
/** /**
* Формируем постраничность * Формируем постраничность
*/ */
$aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.topic.per_page'),4,Router::GetPath('personal_blog').$sShowType,array('period'=>$sPeriod)); $aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.topic.per_page'),Config::Get('pagination.pages.count'),Router::GetPath('personal_blog').$sShowType,array('period'=>$sPeriod));
/** /**
* Вызов хуков * Вызов хуков
*/ */

View file

@ -122,7 +122,7 @@ class ActionProfile extends Action {
/** /**
* Формируем постраничность * Формируем постраничность
*/ */
$aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.user.per_page'),4,$this->oUserProfile->getUserWebPath().'friends'); $aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.user.per_page'),Config::Get('pagination.pages.count'),$this->oUserProfile->getUserWebPath().'friends');
/** /**
* Загружаем переменные в шаблон * Загружаем переменные в шаблон
*/ */
@ -156,7 +156,7 @@ class ActionProfile extends Action {
/** /**
* Формируем постраничность * Формируем постраничность
*/ */
$aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.topic.per_page'),4,$this->oUserProfile->getUserWebPath().'created/topics'); $aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.topic.per_page'),Config::Get('pagination.pages.count'),$this->oUserProfile->getUserWebPath().'created/topics');
/** /**
* Загружаем переменные в шаблон * Загружаем переменные в шаблон
*/ */
@ -190,7 +190,7 @@ class ActionProfile extends Action {
/** /**
* Формируем постраничность * Формируем постраничность
*/ */
$aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.comment.per_page'),4,$this->oUserProfile->getUserWebPath().'created/comments'); $aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.comment.per_page'),Config::Get('pagination.pages.count'),$this->oUserProfile->getUserWebPath().'created/comments');
/** /**
* Загружаем переменные в шаблон * Загружаем переменные в шаблон
*/ */
@ -228,7 +228,7 @@ class ActionProfile extends Action {
/** /**
* Формируем постраничность * Формируем постраничность
*/ */
$aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.topic.per_page'),4,$this->oUserProfile->getUserWebPath().'favourites/topics'); $aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.topic.per_page'),Config::Get('pagination.pages.count'),$this->oUserProfile->getUserWebPath().'favourites/topics');
/** /**
* Загружаем переменные в шаблон * Загружаем переменные в шаблон
*/ */
@ -270,7 +270,7 @@ class ActionProfile extends Action {
/** /**
* Формируем постраничность * Формируем постраничность
*/ */
$aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.topic.per_page'),4,$this->oUserProfile->getUserWebPath().'favourites/topics/tag/'.htmlspecialchars($sTag)); $aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.topic.per_page'),Config::Get('pagination.pages.count'),$this->oUserProfile->getUserWebPath().'favourites/topics/tag/'.htmlspecialchars($sTag));
/** /**
* Загружаем переменные в шаблон * Загружаем переменные в шаблон
*/ */
@ -305,7 +305,7 @@ class ActionProfile extends Action {
/** /**
* Формируем постраничность * Формируем постраничность
*/ */
$aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.comment.per_page'),4,$this->oUserProfile->getUserWebPath().'favourites/comments'); $aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.comment.per_page'),Config::Get('pagination.pages.count'),$this->oUserProfile->getUserWebPath().'favourites/comments');
/** /**
* Загружаем переменные в шаблон * Загружаем переменные в шаблон
*/ */
@ -612,7 +612,7 @@ class ActionProfile extends Action {
/** /**
* Формируем постраничность * Формируем постраничность
*/ */
$aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.user.usernote_per_page'),4,$this->oUserProfile->getUserWebPath().'created/notes'); $aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.user.usernote_per_page'),Config::Get('pagination.pages.count'),$this->oUserProfile->getUserWebPath().'created/notes');
/** /**
* Загружаем переменные в шаблон * Загружаем переменные в шаблон
*/ */

View file

@ -217,7 +217,7 @@ class ActionSearch extends Action {
$aRes['aCounts'][$aReq['sType']], $aRes['aCounts'][$aReq['sType']],
$aReq['iPage'], $aReq['iPage'],
$iLimit, $iLimit,
4, Config::Get('pagination.pages.count'),
Router::GetPath('search').$aReq['sType'], Router::GetPath('search').$aReq['sType'],
array( array(
'q' => $aReq['q'] 'q' => $aReq['q']

View file

@ -64,7 +64,7 @@ class ActionTag extends Action {
/** /**
* Формируем постраничность * Формируем постраничность
*/ */
$aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.topic.per_page'),4,Router::GetPath('tag').htmlspecialchars($sTag)); $aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.topic.per_page'),Config::Get('pagination.pages.count'),Router::GetPath('tag').htmlspecialchars($sTag));
/** /**
* Загружаем переменные в шаблон * Загружаем переменные в шаблон
*/ */

View file

@ -162,7 +162,7 @@ class ActionTalk extends Action {
* Формируем постраничность * Формируем постраничность
*/ */
$aPaging=$this->Viewer_MakePaging( $aPaging=$this->Viewer_MakePaging(
$aResult['count'],$iPage,$iPerPage,4, $aResult['count'],$iPage,$iPerPage,Config::Get('pagination.pages.count'),
Router::GetPath('talk').$this->sCurrentEvent, Router::GetPath('talk').$this->sCurrentEvent,
array_intersect_key( array_intersect_key(
$_REQUEST, $_REQUEST,
@ -295,7 +295,7 @@ class ActionTalk extends Action {
* Формируем постраничность * Формируем постраничность
*/ */
$aPaging=$this->Viewer_MakePaging( $aPaging=$this->Viewer_MakePaging(
$aResult['count'],$iPage,Config::Get('module.talk.per_page'),4, $aResult['count'],$iPage,Config::Get('module.talk.per_page'),Config::Get('pagination.pages.count'),
Router::GetPath('talk').$this->sCurrentEvent Router::GetPath('talk').$this->sCurrentEvent
); );
/** /**

View file

@ -211,7 +211,7 @@ class ActionTopic extends Action {
/** /**
* Формируем постраничность * Формируем постраничность
*/ */
$aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.topic.per_page'),4,Router::GetPath('topic').$this->sCurrentEvent); $aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.topic.per_page'),Config::Get('pagination.pages.count'),Router::GetPath('topic').$this->sCurrentEvent);
/** /**
* Загружаем переменные в шаблон * Загружаем переменные в шаблон
*/ */

View file

@ -24,7 +24,7 @@ class BlockTags extends Block {
/** /**
* Получаем список тегов * Получаем список тегов
*/ */
$aTags=$this->oEngine->Topic_GetOpenTopicTags(70); $aTags=$this->oEngine->Topic_GetOpenTopicTags(Config::Get('block.tags.tags_count'));
/** /**
* Расчитываем логарифмическое облако тегов * Расчитываем логарифмическое облако тегов
*/ */
@ -39,7 +39,7 @@ class BlockTags extends Block {
* Теги пользователя * Теги пользователя
*/ */
if ($oUserCurrent=$this->User_getUserCurrent()) { if ($oUserCurrent=$this->User_getUserCurrent()) {
$aTags=$this->oEngine->Topic_GetOpenTopicTags(70,$oUserCurrent->getId()); $aTags=$this->oEngine->Topic_GetOpenTopicTags(Config::Get('block.tags.personal_tags_count'), $oUserCurrent->getId());
/** /**
* Расчитываем логарифмическое облако тегов * Расчитываем логарифмическое облако тегов
*/ */
@ -53,4 +53,5 @@ class BlockTags extends Block {
} }
} }
} }
?> ?>

View file

@ -1181,7 +1181,7 @@ class ModuleUser extends Module {
$oImage->output(null,$sFileTmp); $oImage->output(null,$sFileTmp);
} }
if ($sFileFoto=$this->Image_Resize($sFileTmp,$sDirUpload,func_generator(6),Config::Get('view.img_max_width'),Config::Get('view.img_max_height'),250,null,true,$aParams)) { if ($sFileFoto=$this->Image_Resize($sFileTmp,$sDirUpload,func_generator(6),Config::Get('view.img_max_width'),Config::Get('view.img_max_height'),Config::Get('module.user.profile_photo_width'),null,true,$aParams)) {
@unlink($sFileTmp); @unlink($sFileTmp);
/** /**
* удаляем старое фото * удаляем старое фото

View file

@ -40,6 +40,15 @@ $config['seo']['description_words_count'] = 20; // количество сло
*/ */
$config['block']['stream']['row'] = 20; // сколько записей выводить в блоке "Прямой эфир" $config['block']['stream']['row'] = 20; // сколько записей выводить в блоке "Прямой эфир"
$config['block']['blogs']['row'] = 10; // сколько записей выводить в блоке "Блоги" $config['block']['blogs']['row'] = 10; // сколько записей выводить в блоке "Блоги"
$config['block']['tags']['tags_count'] = 70; // сколько тегов выводить в блоке "теги"
$config['block']['tags']['personal_tags_count'] = 70; // сколько тегов пользователя выводить в блоке "теги"
/**
* Настройка пагинации
*/
$config['pagination']['pages']['count'] = 4; // количество ссылок на другие страницы в пагинации
/** /**
* Настройка путей * Настройка путей
* Если необходимо установить движек в директорию(не корень сайта) то следует сделать так: * Если необходимо установить движек в директорию(не корень сайта) то следует сделать так:
@ -191,6 +200,7 @@ $config['module']['user']['time_active'] = 60*60*24*7; // Число секун
$config['module']['user']['usernote_text_max'] = 250; // Максимальный размер заметки о пользователе $config['module']['user']['usernote_text_max'] = 250; // Максимальный размер заметки о пользователе
$config['module']['user']['usernote_per_page'] = 20; // Число заметок на одну страницу $config['module']['user']['usernote_per_page'] = 20; // Число заметок на одну страницу
$config['module']['user']['userfield_max_identical'] = 2; // Максимальное число контактов одного типа $config['module']['user']['userfield_max_identical'] = 2; // Максимальное число контактов одного типа
$config['module']['user']['profile_photo_width'] = 250; // ширина квадрата фотографии в профиле, px
// Модуль Comment // Модуль Comment
$config['module']['comment']['per_page'] = 20; // Число комментариев на одну страницу(это касается только полного списка комментариев прямого эфира) $config['module']['comment']['per_page'] = 20; // Число комментариев на одну страницу(это касается только полного списка комментариев прямого эфира)
$config['module']['comment']['bad'] = -5; // Рейтинг комментария, начиная с которого он будет скрыт $config['module']['comment']['bad'] = -5; // Рейтинг комментария, начиная с которого он будет скрыт
@ -261,7 +271,7 @@ $config['module']['wall']['text_min'] = 1; // Ограничение на ми
* Настройка топика-фотосета * Настройка топика-фотосета
*/ */
$config['module']['image']['photoset']['jpg_quality'] = 100; // настройка модуля Image, качество обработки фото $config['module']['image']['photoset']['jpg_quality'] = 100; // настройка модуля Image, качество обработки фото
$config['module']['topic']['photoset']['photo_max_size'] = 6*1024; //kb // максимально допустимый размер фото $config['module']['topic']['photoset']['photo_max_size'] = 6*1024; // максимально допустимый размер фото, Kb
$config['module']['topic']['photoset']['count_photos_min'] = 2; // минимальное количество фоток $config['module']['topic']['photoset']['count_photos_min'] = 2; // минимальное количество фоток
$config['module']['topic']['photoset']['count_photos_max'] = 30; // максимальное количество фоток $config['module']['topic']['photoset']['count_photos_max'] = 30; // максимальное количество фоток
$config['module']['topic']['photoset']['per_page'] = 20; // число фоток для одновременной загрузки $config['module']['topic']['photoset']['per_page'] = 20; // число фоток для одновременной загрузки

View file

@ -124,7 +124,7 @@ class PluginProfiler_ActionProfiler extends ActionPlugin {
* Формируем постраничность * Формируем постраничность
*/ */
$aPaging=$this->Viewer_MakePaging( $aPaging=$this->Viewer_MakePaging(
$aResult['count'],$iPage,Config::Get('plugin.profiler.per_page'),4, $aResult['count'],$iPage,Config::Get('plugin.profiler.per_page'),Config::Get('pagination.pages.count'),
Router::GetPath('profiler').$this->sCurrentEvent, Router::GetPath('profiler').$this->sCurrentEvent,
array_intersect_key( array_intersect_key(
$_REQUEST, $_REQUEST,