форум vBSupport.ru > vBulletin > Вопрос — Ответ
Register Меню vBsupport Изображения Files Manager О рекламе Today's Posts Search
  • Родная гавань
  • Блок РКН снят
  • Premoderation
  • For English speaking users
  • Каталог Фрилансеров
  • If you want to buy some product or script
  • Администраторам
VBsupport перешел с домена .ORG на родной .RU Ура! Пожалуйста, обновите свои закладки - VBsupport.ru
Блок РКН снят, форум доступен на всей территории России, включая новые терртории, без VPN
На форуме введена премодерация ВСЕХ новых пользователей

Почта с временных сервисов, типа mailinator.com, gawab.com и/или прочих, которые предоставляют временный почтовый ящик без регистрации и/или почтовый ящик для рассылки спама, отслеживается и блокируется, а так же заносится в спам-блок форума, аккаунты удаляются
for English speaking users:
You may be surprised with restriction of access to the attachments of the forum. The reason is the recent change in vbsupport.org strategy:

- users with reputation < 10 belong to "simple_users" users' group
- if your reputation > 10 then administrator (kerk, Luvilla) can decide to move you into an "improved" group, but only manually

Main idea is to increase motivation of community members to share their ideas and willingness to support to each other. You may write an article for the subject where you are good enough, you may answer questions, you may share vbulletin.com/org content with vbsupport.org users, receiving "thanks" equal your reputation points. We should not only consume, we should produce something.

- you may:
* increase your reputation (doing something useful for another members of community) and being improved
* purchase temporary access to the improved category:
10 $ for 3 months. - this group can download attachments, reputation/posts do not matter.
20 $ for 3 months. - this group can download attachments, reputation/posts do not matter + adds eliminated + Inbox capacity increased + files manager increased permissions.

Please contact kerk or Luvilla regarding payments.

Important!:
- if your reputation will become less then 0, you will be moved into "simple_users" users' group automatically.*
*for temporary groups (pre-paid for 3 months) reputation/posts do not matter.
Уважаемые пользователи!

На форуме открыт новый раздел "Каталог фрилансеров"

и отдельный раздел для платных заказов "Куплю/Закажу"

Если вы хотите приобрести какой то скрипт/продукт/хак из каталогов перечисленных ниже:
Каталог модулей/хаков
Ещё раз обращаем Ваше внимание: всё, что Вы скачиваете и устанавливаете на свой форум, Вы устанавливаете исключительно на свой страх и риск.
Сообщество vBSupport'а физически не в состоянии проверять все стили, хаки и нули, выкладываемые пользователями.
Помните: безопасность Вашего проекта - Ваша забота.
Убедительная просьба: при обнаружении уязвимостей или сомнительных кодов обязательно отписывайтесь в теме хака/стиля
Спасибо за понимание
 
 
 
 
sanika
Продвинутый
 
sanika's Avatar
Default Как убрать ограничение на заголовок для админа
0

Для всех юзеров установлено ограничение на длину заголовка создаваемой темы. Хочу убрать это ограничения для админа. для этого в шаблоне установил условие ограничения длины текстового поля, в includes/class_dm_threadpost.php сделал условие на вывод ошибки и обрезание длинного тайтла

PHP Code:
    function verify_title(&$title)
    {
        
// replace html-encoded spaces with actual spaces
        
$title preg_replace('/&#(0*32|x0*20);/'' '$title);

        
$title trim($title);
if(
intval($this->registry->userinfo['userid'])!="1")
{
        if (
$this->registry->options['titlemaxchars'] AND $title != $this->existing['title'])
        {
            if (!empty(
$this->info['show_title_error']))
            {
                if ((
$titlelen vbstrlen($title)) > $this->registry->options['titlemaxchars'])
                {
                    
// title too long
                    
$this->error('title_toolong'$titlelen$this->registry->options['titlemaxchars']);
                    return 
false;
                }
            }
            else if (empty(
$this->info['is_automated']) OR !empty($this->info['chop_title']))
            {
                
// not showing the title length error, just chop it
                
$title vbchop($title$this->registry->options['titlemaxchars']);
            }
        }
}
        
// censor, remove all caps subjects, and htmlspecialchars post title
        
$title htmlspecialchars_uni(fetch_no_shouting_text(fetch_censored_text($title)));

        
// do word wrapping
        
if ($this->registry->options['wordwrap'] != 0)
        {
            
$title fetch_word_wrapped_string($title);
        }

        return 
true;
    } 
Теперь тайтл для админа пропускает хорошо, но после ограниченного количества символов делает пробел. Т.е. если стоит ограничение в 10 символов, то тайтл для админа На 15 символов будет віглядеть так ********** *****. второй день бьюсь с єтим пробелом и не могу решить. может кто-то знает в чем дело? или как это сделать проще?
Bot
Yandex Bot Yandex Bot is online now
 
Join Date: 05.05.2005
Реклама на форуме А что у нас тут интересного? =)
 
 
gap
Знаток
 
gap's Avatar
Default
1

А 'wordwarp' (Максимальное количество символов до перевода строки) пробовали отключить или увеличить?
 
 
sanika
Продвинутый
 
sanika's Avatar
Default
0

Мне надо только для админа сделать, а значит просто из изменить значение ничего не даст же? Или я не прав?
 
 
GiRassell
Эксперт
 
GiRassell's Avatar
Default
1

Может я конечно не совсем правильно понял. А что мешает повесить модуль?

Местоположение модуля: global_setup_complete
PHP Code:
if ($vbulletin->userinfo['usergroupid'] == 6)
{
$vbulletin->options['titlemaxchars'] = 250;

Code:
Это ограничение на количество символов в названии тем и заголовков сообщений. Пожалуйста, введите значение больше 0 и меньше 251.
 
 
sanika
Продвинутый
 
sanika's Avatar
Default
0

@GiRassell, то что надо. спасибо большущее. Только я воспользовался советом @gap, и сделал еще одно изменение

PHP Code:
if ($vbulletin->userinfo['usergroupid'] == 6)
{
$vbulletin->options['titlemaxchars'] = 250;
$vbulletin->options['wordwrap'] = 250;

Теперь работает как надо!

Last edited by sanika : 11-20-2013 at 07:40 PM.
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT +4. The time now is 03:38 AM.


Powered by vBulletin® Version 3.6.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.