1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-05-22 02:38:18 +03:00

- вынос количества тегов в блоке "теги" в конфиг. в т.ч. персональных

- вынос количества страниц в пагинации в конфиг
- вынос размера фото в профиле в конфиг


Signed-off-by: Serge Pustovit <light.feel@gmail.com>
This commit is contained in:
Serge Pustovit 2012-04-25 17:47:47 +03:00
parent bc88ee755e
commit 1d808b8b57
15 changed files with 56 additions and 45 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_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'];
$aComments=$aReturn['comments'];
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) {
// переворачиваем страницы в обратном порядке
$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);
/**
* Вызов хуков
@ -863,8 +863,8 @@ class ActionBlog extends Action {
* Формируем постраничность
*/
$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'),4,$oBlog->getUrlFull().$sShowType,array('period'=>$sPeriod));
? $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'),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']],
$aReq['iPage'],
$iLimit,
4,
Config::Get('pagination.pages.count'),
Router::GetPath('search').$aReq['sType'],
array(
'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(
$aResult['count'],$iPage,$iPerPage,4,
$aResult['count'],$iPage,$iPerPage,Config::Get('pagination.pages.count'),
Router::GetPath('talk').$this->sCurrentEvent,
array_intersect_key(
$_REQUEST,
@ -295,7 +295,7 @@ class ActionTalk extends Action {
* Формируем постраничность
*/
$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
);
/**

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()) {
$aTags=$this->oEngine->Topic_GetOpenTopicTags(70,$oUserCurrent->getId());
$aTags=$this->oEngine->Topic_GetOpenTopicTags(Config::Get('block.tags.open_topic_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);
}
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);
/**
* удаляем старое фото

View file

@ -38,8 +38,17 @@ $config['seo']['description_words_count'] = 20; // количество сло
/**
* Настройка основных блоков
*/
$config['block']['stream']['row'] = 20; // сколько записей выводить в блоке "Прямой эфир"
$config['block']['blogs']['row'] = 10; // сколько записей выводить в блоке "Блоги"
$config['block']['stream']['row'] = 20; // сколько записей выводить в блоке "Прямой эфир"
$config['block']['blogs']['row'] = 10; // сколько записей выводить в блоке "Блоги"
$config['block']['tags']['tags_count'] = 70; // сколько тегов выводить в блоке "теги"
$config['block']['tags']['open_topic_tags_count'] = 70; // сколько тегов пользователя выводить в блоке "теги"
/**
* Настройка пагинации
*/
$config['pagination']['pages']['count'] = 4; // количество ссылок на другие страницы в пагинации
/**
* Настройка путей
* Если необходимо установить движек в директорию(не корень сайта) то следует сделать так:
@ -188,9 +197,10 @@ $config['module']['user']['avatar_size'] = array(100,64,48,24,0); // Списо
$config['module']['user']['login']['min_size'] = 3; // Минимальное количество символов в логине
$config['module']['user']['login']['max_size'] = 30; // Максимальное количество символов в логине
$config['module']['user']['time_active'] = 60*60*24*7; // Число секунд с момента последнего посещения пользователем сайта, в течение которых он считается активным
$config['module']['user']['usernote_text_max'] = 250; // Максимальный размер заметки о пользователе
$config['module']['user']['usernote_per_page'] = 20; // Число заметок на одну страницу
$config['module']['user']['usernote_text_max'] = 250; // Максимальный размер заметки о пользователе
$config['module']['user']['usernote_per_page'] = 20; // Число заметок на одну страницу
$config['module']['user']['userfield_max_identical'] = 2; // Максимальное число контактов одного типа
$config['module']['user']['profile_photo_width'] = 250; // ширина квадрата фотографии в профиле, px
// Модуль Comment
$config['module']['comment']['per_page'] = 20; // Число комментариев на одну страницу(это касается только полного списка комментариев прямого эфира)
$config['module']['comment']['bad'] = -5; // Рейтинг комментария, начиная с которого он будет скрыт
@ -252,20 +262,20 @@ $config['module']['ls']['send_general'] = true; // Отправка на сер
$config['module']['ls']['use_counter'] = true; // Использование счетчика GA
// Модуль Wall - стена
$config['module']['wall']['count_last_reply'] = 3; // Число последних ответов на сообщени на стене для отображения в ленте
$config['module']['wall']['per_page'] = 10; // Число сообщений на стене на одну страницу
$config['module']['wall']['text_max'] = 250; // Ограничение на максимальное количество символов в одном сообщении на стене
$config['module']['wall']['text_min'] = 1; // Ограничение на минимальное количество символов в одном сообщении на стене
$config['module']['wall']['per_page'] = 10; // Число сообщений на стене на одну страницу
$config['module']['wall']['text_max'] = 250; // Ограничение на максимальное количество символов в одном сообщении на стене
$config['module']['wall']['text_min'] = 1; // Ограничение на минимальное количество символов в одном сообщении на стене
/**
* Настройка топика-фотосета
*/
$config['module']['image']['photoset']['jpg_quality'] = 100; // настройка модуля Image, качество обработки фото
$config['module']['topic']['photoset']['photo_max_size'] = 6*1024; //kb // максимально допустимый размер фото
$config['module']['topic']['photoset']['count_photos_min'] = 2; // минимальное количество фоток
$config['module']['topic']['photoset']['count_photos_max'] = 30; // максимальное количество фоток
$config['module']['topic']['photoset']['per_page'] = 20; // число фоток для одновременной загрузки
$config['module']['topic']['photoset']['size'] = array( // список размеров превью, которые необходимо делать при загрузке фото
$config['module']['image']['photoset']['jpg_quality'] = 100; // настройка модуля Image, качество обработки фото
$config['module']['topic']['photoset']['photo_max_size'] = 6*1024; // максимально допустимый размер фото, Kb
$config['module']['topic']['photoset']['count_photos_min'] = 2; // минимальное количество фоток
$config['module']['topic']['photoset']['count_photos_max'] = 30; // максимальное количество фоток
$config['module']['topic']['photoset']['per_page'] = 20; // число фоток для одновременной загрузки
$config['module']['topic']['photoset']['size'] = array( // список размеров превью, которые необходимо делать при загрузке фото
array(
'w' => 1000,
'h' => null,

View file

@ -124,7 +124,7 @@ class PluginProfiler_ActionProfiler extends ActionPlugin {
* Формируем постраничность
*/
$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,
array_intersect_key(
$_REQUEST,