AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   SourceBans / SourceBans++ (https://forums.alliedmods.net/forumdisplay.php?f=152)
-   -   Release SourceBans++ (v1.6.4) [Updated: 2021-10-06] (https://forums.alliedmods.net/showthread.php?t=263735)

haho_maniac 03-14-2016 18:46

Re: [RELEASE] SourceBans++ (v1.5.4.2) [Updated: 2016-03-09]
 
Hello, yesterday I installed SourceBans++ 1.5.4.2 and this is my first time using it. I managed to create groups, to add admins and there is up to date information about the number of players. My only problem is the in the web section Home>Servers I can see only the number of players and there are no names. There is maxplayers sign but nothing else.

ffriozi 03-14-2016 19:07

Re: [RELEASE] SourceBans++ (v1.5.4.2) [Updated: 2016-03-09]
 
Hello guys im stuck at installation part.

i enter all the correct information but when i click next the page is blank.. look

http://i.imgur.com/9bBw0sY.png

http://i.imgur.com/ewJFmns.png


what is going on? thanks

Sw33T3R 03-15-2016 11:54

Re: [RELEASE] SourceBans++ (v1.5.4.2) [Updated: 2016-03-09]
 
Quote:

Originally Posted by durangod (Post 2401658)
Ok folks here is the Mod for Steam Login:

Name: Steam Login Option Mod

What does it do: It allows admin to select weather to show or not to show the steam login link on the login form. This is done by means of selection the option in admin panel - web panel settings - features. If the item is checked the steam signon will show, if it is not checked it will not. And the steam page has been locked down from direct public execution only while the selection is off.

See the image attached to show you the location of the new item setting.

Be sure you always use ONLY either notepad, progarmmers notepad, or notepad++ to edit code files. Normal word processing software's have hidden codes which will mess up your code files.

Of course the dev of this plugin is welcome to add this to the core production release if they choose.
I have included the zip file with the files you need. Please refer to the files for changes even though i will go over this below in detail. Also remember that all mods will be removed whenever you update the main plugin and the mods will have to be replaced.

Ok lets go:

Lets do the template files first.

Open themes/<theme name>/page_admin_settings_features.tpl

Code:

<!-- added for steam login option mod -->
  <tr>
  <td valign="top"><div class="rowdesc">{help_icon title="Enable Steam Login" message="Check this box, if you want to enable the Steam login button on the login form."}Enable Steam Login</div></td>
      <td>
      <div align="left">
          <input type="checkbox" name="enable_steamlogin" id="enable_steamlogin" />
      </div>
      <div id="enable_steamlogin.msg" class="badentry"></div>
      </td>
  </tr>
<!-- end steam login option mod -->

open themes/<theme_name>/page_login.tpl

old code
Code:

<center><a href="steamopenid.php"><img src="images/steamlogin.png"></a></center>
new code

Code:

-{if $steamlogin_show == 1}-
<center><a href="steamopenid.php"><img src="images/steamlogin.png"></a></center>
-{/if}-

open pages/admin.settings.php
3 changes in this file

PHP Code:

//added for steam login option mod

   
$steamloginopt = (isset($_POST['enable_steamlogin']) && $_POST['enable_steamlogin'] == "on" 0);

// end steam login option mod 

you dont have to copy the //NEW CODE that is just for your reference
however do include the //modified comment above your change

PHP Code:

//modified for steam login option mod
//ORIGINAL CODE
(" . (int)$adminrehash . "'config.enableadminrehashing')");

//NEW CODE 
(" 
. (int)$adminrehash ", 'config.enableadminrehashing'),
(" 
. (int)$steamloginopt ", 'config.enablesteamlogin')"); 

now all the way toward the bottom of the file is this last addition

PHP Code:


/* added for steam login option mod */
$('enable_steamlogin').checked = <?php echo $GLOBALS['config']['config.enablesteamlogin']?>;
/* end steam login option mod */

open includes/user-functions.php

PHP Code:


/**
 * added for the steam login option mod
 * checks the value of the config setting
 * called by  steamopenid.php 
 * called by pages/pages.login.php
 * @param int 1 or 0
 * @return int 
 */
function get_steamenabled_conf($value)
{
 
$settingvalue "config.enablesteamlogin";
 
$query $GLOBALS['db']->GetRow("SELECT `value` FROM `" DB_PREFIX "_settings` WHERE `setting` = '$settingvalue'");
 
$value intval($query['value']);
return 
$value;


open steamopenid.php
two additions in this file

PHP Code:

// added for steam login option mod
include_once('includes/user-functions.php');

$steam_conf_value get_steamenabled_conf($confvalue);

if(
$steam_conf_value 0)
{
//end steam login option mod 

all the way to the bottom of the file

PHP Code:

//added for steam login option mod
//else if the steam config is 0
}else{
       
header("location: ./");
       exit;
      }
//close else 
//end steam login option mod 

Database

manual insert into sb_settings
setting = config.enablesteamlogin
value = 1

or run this sql (fill in your db info in the sql

INSERT INTO `YOURDBPREFIX_YOURDBNAME`.`sb_settings` (`setting`, `value`) VALUES ('config.enablesteamlogin', '1');

refresh your cache from admin and your all set, try it out and let me know if you have any issues.

Thanks dave

attached files

features_ss.jpg (shows the new feature item in settings)

steam_signon_mod.zip (modified files)

Thanks but i have problem with it...
After clicking login button on steam www page i have it

Code:

Not Found

The requested URL /sourcebans/nevvy.pl/sourcebans was not found on this server.

But when i go to my sb page I'm logged

Here is my web url from config php

Code:

define('SB_WP_URL','nevvy.pl/sourcebans');

DarkDeviL 03-15-2016 16:40

Re: [RELEASE] SourceBans++ (v1.5.4.2) [Updated: 2016-03-09]
 
Quote:

Originally Posted by durangod (Post 2402199)
@arne1288 its ok arne, I don't require a thank you or anything.

My words was meant as constructive feedback: It makes no sense to provide a half solution, and if you are unable to do more than a half solution, you're actually better of not sharing the half solution. Half solutions will just lead to trouble for the end users in the end.

And I would like to add that these words are not at all meant to be offending!

You actually ended up providing a "full solution" on this. And on behalf of all the users, I'd like to thank you for that. :)

Great job!


Quote:

Originally Posted by Sw33T3R (Post 2402738)
Thanks but i have problem with it...
After clicking login button on steam www page i have it

Code:

Not Found

The requested URL /sourcebans/nevvy.pl/sourcebans was not found on this server.

But when i go to my sb page I'm logged

Here is my web url from config php

Code:

define('SB_WP_URL','nevvy.pl/sourcebans');

Unless you provide a full URL, the URL will be relative, starting from the path you enter into your browser.

E.g. if you are on https://www.example.net/sourcebans/ and you set an URL of
Code:

define('SB_WP_URL','nevvy.pl/sourcebans');
then the links that are based on SB_WP_URL will lead to

Code:

https://www.example.net/sourcebans/nevvy.pl/sourcebans
Use this one:
Code:

define('SB_WP_URL','http://nevvy.pl/sourcebans');

ffriozi 03-16-2016 12:00

Re: [RELEASE] SourceBans++ (v1.5.4.2) [Updated: 2016-03-09]
 
Guys, i would like to know if is possible to add a submenu to my rank page.
Someone can point me to the right file to edit? thanks.

Example:

http://i.imgur.com/QIlaKkS.png

NomisCZ 03-18-2016 16:15

Re: [RELEASE] SourceBans++ (v1.5.4.2) [Updated: 2016-03-09]
 
Quote:

Originally Posted by ffriozi (Post 2402998)
Guys, i would like to know if is possible to add a submenu to my rank page.
Someone can point me to the right file to edit? thanks.

Example:

http://i.imgur.com/QIlaKkS.png


You can do it in /includes/system-functions.php
Lines: 169 - 172

PHP Code:

...

/**
 * Displays the pagetabs
 *
 * @return noreturn
 */
function BuildPageTabs()
{
    global 
$userbank;
    
AddTab("Dashboard""index.php?p=home""This page shows an overview of your bans and servers.");
    
AddTab("Servers""index.php?p=servers""All of your servers and their status can be viewed here");
    
AddTab("&nbsp;Bans&nbsp;""index.php?p=banlist""All of the bans in the database can be viewed from here.");
    
AddTab("Comms""index.php?p=commslist""All of the communication bans (such as chat gags and voice mutes) in the database can be viewed from here.");

AddTab("Rank""http://mydomain.com/ranks""This page shows players rank."); // <= HERE ADD NEW LINE WITH YOUR CUSTOM LINK

... 


KiR 03-18-2016 17:36

Re: [RELEASE] SourceBans++ (v1.5.4.2) [Updated: 2016-03-09]
 
v1.5.4.2
sorry can not be banned by Steam3 :(

MaloModo 03-19-2016 13:06

Re: [RELEASE] SourceBans++ (v1.5.4.2) [Updated: 2016-03-09]
 
Started getting this error all of sudden loading sourcebans page(s):

Code:

Error: the server returned the following HTTP status: 500
Received:
<!-- SHTML Wrapper - 500 Server Error -->
[an error occurred while processing this directive

I reinstalled/upgraded to latest but zero change. The pages will load but very slowly. One suggestion I found was to change permission of files to 0755 on host but that didn't seem to help. I will continue to search but just posting here as someone might know a "quick" fix?

Had been running this for months without any issues.

jpwanabe 03-19-2016 13:09

Re: [RELEASE] SourceBans++ (v1.5.4.2) [Updated: 2016-03-09]
 
Quote:

Originally Posted by MaloModo (Post 2403908)
Started getting this error all of sudden loading sourcebans page(s):

Code:

Error: the server returned the following HTTP status: 500
Received:
<!-- SHTML Wrapper - 500 Server Error -->
[an error occurred while processing this directive

I reinstalled/upgraded to latest but zero change. The pages will load but very slowly. One suggestion I find was to change permission of files to 0755 on host but that didn't seemed to help. I will continue to search but just posting here as someone might know a "quick" fix?

Had been running this for months without any issues.

Check your MySQL server. I was getting these errors and then I noticed my MySQL was maxing out. You may have to give it more power to fix this. That's how I did it

haho_maniac 03-21-2016 02:57

Re: [RELEASE] SourceBans++ (v1.5.4.2) [Updated: 2016-03-09]
 
Hello Guys,

I have the following problem:

When I try to send a message to a player using sourcebans++ right click menu I get the following error:

http://imgur.com/sDEWd41

Please give some advice.


All times are GMT -4. The time now is 19:46.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.