Правила форума Гаранты форума
Размещение рекламы AMX-X компилятор

Здравствуйте, гость Вход | Регистрация

Наши новости:

14-дек
24-апр
10-апр
11-апр

Hiring Developer to do some work - CS Bans

Статус пользователя polas19
сообщение 8.1.2022, 0:47
Сообщение #1
Стаж: 4 года 9 месяцев

Сообщений: 7
Благодарностей: 1
Полезность: 0

Hi,

I don't speak Russian, so I will write in English. I'd like to make some changes to CS-Bans and make it better to use for myself because the current version is honestly bad and not good, and I don't know how much I'm supposed to pay the developer. I'll write what I want to add/change to CS-Bans you can talk to me on Discord, I'm ready to negotiate the price and how much work budget you want to ask for.

CS-Bans - Add/Change.

1) If you add a ban from cs-bans, the admin name must be the same as the username of who added the ban.
2) Remove the ability to add Admin in SteamID or IP, and keep only the nick type.
3) Remove "Assign admins to servers" I want if I add a admin to be automatically added to all servers I own.
4) Replace "Add Access Flag" with a list/choosemenu so I can easily add a VIP or Admin.
5) Change the amxadmin expiration date to "days" instead of the date in Admins on servers page.
6) I only want the user created during CS-Bans installation to be able to add/remove WEB admins.
7) Combine the options for ban types (SteamID or IP) into one with name SteamID + IP.
8) Few minor fixes.

Contact me on Discord: Lopisbys#8633

Thanks.
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   Цитировать сообщение
Статус пользователя Gecko
сообщение 8.1.2022, 22:59
Сообщение #2
Стаж: 7 лет 4 месяца

Сообщений: 1247
Благодарностей: 518
Полезность: 345

polas19,
Первый пункт даю бесплатно, так как этот функционал реально полезный.

protected/controllers/bansController.php

Найти
Код
$model->admin_nick = 'Web';

заменить на
Код
$model->admin_nick = Yii::app()->user->name;

В итоге должно выглядеть так:
Код
        if(isset($_POST['Bans'])) {
            $model->attributes=$_POST['Bans'];
            $model->admin_nick = Yii::app()->user->name;
            $model->server_name = 'Забанен с сайта';
            if ($model->save()) {
                $this->redirect(array('view', 'id' => $model->bid));
            }
        }

А если нужно чтобы обновило имя админа который отредактировал бан

protected/controllers/bansController.php
найти
Код
$model->attributes=$_POST['Bans'];

и добавить ниже
Код
$model->admin_nick = Yii::app()->user->name;


Должно быть так:
Код
        if(isset($_POST['Bans'])) {
            $model->attributes=$_POST['Bans'];
            $model->admin_nick = Yii::app()->user->name;
            if(isset($_POST['selfreasoncheckbox']) && isset($_POST['self_ban_reason'])) {
                $model->ban_reason = $_POST['self_ban_reason'];
            }
            if ($model->save()) {
                $this->redirect(array('view', 'id' => $model->bid));
            }
        }



Попробуй написать сюда > BaHeK - он в теме.

Отредактировал: Gecko, - 8.1.2022, 23:21


Не отвечаю на ЛС.
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя polas19
сообщение 9.1.2022, 1:00
Сообщение #3
Стаж: 4 года 9 месяцев

Сообщений: 7
Благодарностей: 1
Полезность: 0

Gecko,

Thanks for your response, I have done almost all the work and the points I wrote here, I am still willing to do more but it require someone with more knowledge than me, I am translating it to English and as well making it better than the current version out side which is sucks.

Here is the current work done: https://banstest25.000webhostapp.com/csbans/bans/index.html

You can watch it out ;)

I will try to get in touch with bahek, but if anyone here is still want to help me out, my offer is still here.

Отредактировал: polas19, - 9.1.2022, 1:02
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
  Ответить в данную темуНачать новую тему
 
0 пользователей и 1 гостей читают эту тему: