форум vBSupport.ru > vBulletin > Old vB versions (3.0.x & 2.x.x) > vBulletin 3.6.x > Hacks, mods and scripts [3.6.x]
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'а физически не в состоянии проверять все стили, хаки и нули, выкладываемые пользователями.
Помните: безопасность Вашего проекта - Ваша забота.
Убедительная просьба: при обнаружении уязвимостей или сомнительных кодов обязательно отписывайтесь в теме хака/стиля
Спасибо за понимание
 
 
 
 
ssmol
Специалист
 
ssmol's Avatar
Default Group Access Control By Day(s)
0

1. './admincp/usergroup.php'


FIND

Code:
Code:
require_once(DIR . '/includes/functions_ranks.php');
UNDER THAT, ADD

Code:
Code:
include_once ( DIR . '/includes/functions_access.php' );
FIND

Code:

Code:
print_submit_row(iif($_REQUEST['do'] == 'add', $vbphrase['save'], $vbphrase['update']));
ABOVE THAT, ADD

Code:

Code:
print_table_header ( $vbphrase['group_access_permissions'] );
print_yes_no_row ( $vbphrase['new_group_access'], 'usergroup[newgroupaccess]', $usergroup['newgroupaccess'] );
$new_access = fetch_group_days ( $usergroup['newgroupdays'] );
print_label_row($vbphrase['new_group_days'], "<select name='access[]' tabindex='1' class='bginput' multiple size='5'>" . construct_select_options ( $new_access[0], $new_access[1] ) . "</select>", '', 'top', 'newgroupdays');
print_table_break();
FIND

Code:

Code:
$vbulletin->input->clean_array_gpc('p', array(
'usergroup' => TYPE_ARRAY,
'ugid_base' => TYPE_INT,
));
REPLACE WITH

Code:

Code:
$vbulletin->input->clean_array_gpc('p', array(
'usergroup' => TYPE_ARRAY,
'ugid_base' => TYPE_INT,
'access' => TYPE_ARRAY,
));
$vbulletin->GPC['usergroup']['newgroupdays'] = update_group_days ( $vbulletin->GPC['access'] );


// end code edits './admincp/usergroup.php'

2. './global.php'


FIND

Code:
Code:
require_once(CWD . '/includes/init.php');
BELOW THAT, ADD

Code:

Code:
include_once ( CWD . '/includes/functions_access.php' );
FIND

Code:

Code:
// phpinfo display for support purposes
if ($_REQUEST['do'] == 'phpinfo')
{
ABOVE THAT, ADD

Code:

Code:
/* test the group day access permissions */
if ( $vbulletin->userinfo['permissions']['newgroupaccess'] )
{
if ( group_access_test ( $vbulletin->userinfo['permissions']['newgroupdays'] ) === false )
{
// no access today, give the error message
eval ( standard_error ( fetch_error ( 'uganottoday', $vbulletin->userinfo['permissions']['title'], $vbulletin->userinfo['permissions']['usergroupid'] ) ) );
}
}


// end of code edits for './global.php'

3.

DB ALTER AND ADD PHRASES.... (add your db prefix, if your using one!)

Code:

Code:
###
# - alter the user groups table to add the access permissions
###
ALTER TABLE usergroup ADD newgroupaccess TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', ADD newgroupdays INT(10) UNSIGNED NOT NULL DEFAULT '0';
###
##- admin cp helper phrases!
###
INSERT INTO phrase VALUES ( '', -1, 'group_access_permissions', 'Group Board Access Permissions', 3, 'group_access' );
 
INSERT INTO phrase VALUES ( '', -1, 'new_group_access', 'Place This User Group Under Forum Access Control', 3, 'group_access' );
INSERT INTO phrase VALUES ( '', -1, 'usergroup_add_edit_newgroupaccess_title', 'Place This User Group Under Forum Access Control', 6000, 'group_access' );
INSERT INTO phrase VALUES ( '', -1, 'usergroup_add_edit_newgroupaccess_text', 'If this option is set to (yes) then the user group access control will check if this group can access your forum on that given day!', 6000, 'group_access' );
INSERT INTO adminhelp VALUES ( '', 'usergroup', 'add,edit', 'newgroupaccess', 990, 1, 'group_access' );
INSERT INTO phrase VALUES ( '', -1, 'new_group_days', 'Select The Days This User Group Can\'t Access The Forum, (*) = selected', 3, 'group_access' );
INSERT INTO phrase VALUES ( '', -1, 'usergroup_add_edit_newgroupdays_title', 'Select The Days This User Group Can\'t Access The Forum', 6000, 'group_access' );
INSERT INTO phrase VALUES ( '', -1, 'usergroup_add_edit_newgroupdays_text', 'This option is only used if the above option * Place This User Group Is Under Forum Access Control * is set to (yes). This option allows you to select the days that this user group is not allowed to view any content on your forum.', 6000, 'group_access' );
INSERT INTO adminhelp VALUES ( '', 'usergroup', 'add,edit', 'newgroupdays', 991, 1, 'group_access' );
###
##- no access today error!
###
 
INSERT INTO phrase VALUES ( '', -1, 'uganottoday', 'Sorry the administrator has limited your usergroup {1}, (id:{2}), to certain days that you may view the forum. This is one of those days you don\'t have access to the forum. Please consider joining the forum to remove this restriction!', 1000, 'group_access' );
Be sure to go to Languages & Phrases >> Language Manager >> Click -> [Rebuild All Languages]

4.

upload the attached script (functions_access.php.txt), to you './includes/' directory, rename to 'functions_access.php'!

done

enjoy

me!

snap shots....

Forum Access Error Message

error.png

Group Option, Admin CP

option.png


:::UPDATE:::

Fixed the first phrase...

It was... (wrong)

Code:
Code:
INSERT INTO phrase VALUES ( '', -1, 'new_group_permissions', 'Group Board Access Permissions', 3, 'group_access' );
it should be... (fixed)

Code:

Code:
INSERT INTO phrase VALUES ( '', -1, 'group_access_permissions', 'Group Board Access Permissions', 3, 'group_access' );
Attached Files
File Type: txt functions_access.php.txt (880 Bytes, 9 views)
Bot
Yandex Bot Yandex Bot is online now
 
Join Date: 05.05.2005
Реклама на форуме А что у нас тут интересного? =)
 
 
Malcolm Reed
Эксперт
 
Malcolm Reed's Avatar
Default
0

а можно краткое описание на русском? просто я не смог понять зачем оно надо из названия.
 
 
jedl2007
Специалист
 
jedl2007's Avatar
Default
0

+1 описание(
 
 
sash
Специалист
 
sash's Avatar
Default
0

+1 описание
 
 
Cr00t
Продвинутый
Default
0

А что тут понимать? По-моему всё крайне просто. Из названия понятно что управление доступом в раздела по заданным дням
 
 
atomar
Продвинутый
 
atomar's Avatar
Default
0

Я так понял что этот хак позволяет давать доступ в определенные разделы только тем юзерам, которые зарегистрированны энное кол-во дней.
 


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 08:56 PM.


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