AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   SourceBans / SourceBans++ (https://forums.alliedmods.net/forumdisplay.php?f=152)
-   -   Release SourceBans Star Theme (SB++v1.6.3) (https://forums.alliedmods.net/showthread.php?t=311054)

Distortion 11-05-2018 08:46

Re: SourceBans Star Theme (v1.6.3)
 
New images have been added to repository.
Games, Linux, windows, smac and vac icons changed.
In servers page, you'll see the new icons changed through js in off-canvas.js
You can download new updates from github.

Cheerz.

shtopor 11-11-2018 03:04

Re: SourceBans Star Theme (v1.6.3)
 
1 Attachment(s)
Quote:

Originally Posted by Distortion (Post 2622739)
New images have been added to repository.
Games, Linux, windows, smac and vac icons changed.
In servers page, you'll see the new icons changed through js in off-canvas.js
You can download new updates from github.

Cheerz.

Hi
Pls, fix it

Distortion 11-11-2018 16:18

Re: SourceBans Star Theme (v1.6.3)
 
UPDATE
Rightclick menu (context menu) fixed
https://image.ibb.co/fqzwcq/context.jpg

Quote:

Originally Posted by shtopor (Post 2623524)
Hi
Pls, fix it

It works. When the time has expired or a player has been banned permanently, it shows fully loaded progress bar. Here is a working example from my local website
https://image.ibb.co/htf2Hq/remaining.jpg

raj kaul 11-11-2018 22:14

Re: SourceBans Star Theme (v1.6.3)
 
Quote:

Originally Posted by Distortion (Post 2623603)
UPDATE
Rightclick menu (context menu) fixed
https://image.ibb.co/fqzwcq/context.jpg


It works. When the time has expired or a player has been banned permanently, it shows fully loaded progress bar. Here is a working example from my local website
https://image.ibb.co/htf2Hq/remaining.jpg

ty for this update :bacon!::bacon!::bacon!::bacon!:

asdfxD 11-11-2018 23:32

Re: SourceBans Star Theme (v1.6.3)
 
Remaining time bar is not working for me too (time ban)

https://i.imgur.com/9RSwIgG.png

Distortion 11-11-2018 23:42

Re: SourceBans Star Theme (v1.6.3)
 
Quote:

Originally Posted by asdfxD (Post 2623645)
Remaining time bar is not working for me too (time ban)

https://i.imgur.com/9RSwIgG.png

Could you please send me your website link?
and create a ban for at least 2 hours so I can do some debugging on inspect console.

Also it is not updating in realtime, you have to reload the page to see result.

bmsmod 11-12-2018 22:00

Re: SourceBans Star Theme (v1.6.3)
 
PHP is not my thing. Getting these errors. I imagine its something on my end but have no idea.


[256] mysqli error: [1048: Column 'aid' cannot be null] in EXECUTE("INSERT INTO sb_log(type,title,message, function, query, aid, host, created)
VALUES ('w','PHP Warning','[512] math: parameter \'e\' is empty
\nError on line 65 in file /var/www/sites/prgaming/public/sourcebans/includes/smarty/plugins/function.math.php','/var/www/sites/prgaming/public/sourcebans/includes/smarty/plugins/function.math.php - 65
/var/www/sites/prgaming/public/sourcebans/themes_c/star^%%42^420^420ABB47%%page_dashboard.tpl.ph p - 186
/var/www/sites/prgaming/public/sourcebans/includes/smarty/Smarty.class.php - 1263
/var/www/sites/prgaming/public/sourcebans/includes/smarty/Smarty.class.php - 1113
','N/A',NULL,'xx.xx.xx.xxx',1542076819)")


Fatal error on line 79 in file /var/www/sites/prgaming/public/sourcebans/includes/adodb/adodb-errorhandler.inc.php
Parent Function /var/www/sites/prgaming/public/sourcebans/includes/adodb/adodb-errorhandler.inc.php - 79
/var/www/sites/prgaming/public/sourcebans/includes/adodb/adodb.inc.php - 1250
/var/www/sites/prgaming/public/sourcebans/includes/adodb/adodb.inc.php - 1190
/var/www/sites/prgaming/public/sourcebans/includes/CSystemLog.php - 91
Query String N/A
IP

Thanks!

Note replaced the IP with X

Distortion 11-13-2018 02:46

Re: SourceBans Star Theme (v1.6.3)
 
Quote:

Originally Posted by bmsmod (Post 2623789)
PHP is not my thing. Getting these errors. I imagine its something on my end but have no idea.


[256] mysqli error: [1048: Column 'aid' cannot be null] in EXECUTE("INSERT INTO sb_log(type,title,message, function, query, aid, host, created)
VALUES ('w','PHP Warning','[512] math: parameter \'e\' is empty
\nError on line 65 in file /var/www/sites/prgaming/public/sourcebans/includes/smarty/plugins/function.math.php','/var/www/sites/prgaming/public/sourcebans/includes/smarty/plugins/function.math.php - 65
/var/www/sites/prgaming/public/sourcebans/themes_c/star^%%42^420^420ABB47%%page_dashboard.tpl.ph p - 186
/var/www/sites/prgaming/public/sourcebans/includes/smarty/Smarty.class.php - 1263
/var/www/sites/prgaming/public/sourcebans/includes/smarty/Smarty.class.php - 1113
','N/A',NULL,'xx.xx.xx.xxx',1542076819)")


Fatal error on line 79 in file /var/www/sites/prgaming/public/sourcebans/includes/adodb/adodb-errorhandler.inc.php
Parent Function /var/www/sites/prgaming/public/sourcebans/includes/adodb/adodb-errorhandler.inc.php - 79
/var/www/sites/prgaming/public/sourcebans/includes/adodb/adodb.inc.php - 1250
/var/www/sites/prgaming/public/sourcebans/includes/adodb/adodb.inc.php - 1190
/var/www/sites/prgaming/public/sourcebans/includes/CSystemLog.php - 91
Query String N/A
IP

Thanks!

Note replaced the IP with X

On page_dashboard.tpl at line 164 there is a math function to calculate percentage of time between end and created.
PHP Code:

{math equation="( n - c ) / ( ( e - c ) / 100 )" e=$player.e_secs c=$player.c_secs n=$smarty.now

Currently I'm working on a solution.

I don't want you to add some lines to page.home.php file because it's not in theme folder. Also I believe that it's not the purpose of themes.

As you can see at #L125, sourcebans gets ends and created columns from database but it's not including them to array that we can use in dashboard.tpl file.

In my case, I've added these lines after #L150
PHP Code:

$info['e_secs'] = $res->fields['ends'];
$info['c_secs'] = $res->fields['created']; 

If you don't want to edit php file, you can replace #L164 with a simple change

This is a fake solution. It'll generate random number between 10-90 (both included)

Old Code
PHP Code:

<div class="progress-bar bg-warning progress-bar-striped" role="progressbar" style="width: {math equation=") / ( ( ) / 100 )" e=$player.e_secs c=$player.c_secs n=$smarty.now}%"

New Code
PHP Code:

<div class="progress-bar bg-warning progress-bar-striped" role="progressbar" style="width: {10|rand:90}%"

It will stop warnings, but I'll make it as soon as possible.

Cheerz.

asdfxD 11-15-2018 10:10

Re: SourceBans Star Theme (v1.6.3)
 
Yellow progress bar works now with latest git version, but it seems not correctly. random results after refreshing the page.

https://s15.directupload.net/images/181115/kjuu55ib.gif

Distortion 11-15-2018 11:16

Re: SourceBans Star Theme (v1.6.3)
 
Quote:

Originally Posted by asdfxD (Post 2624156)
Yellow progress bar works now with latest git version, but it seems not correctly. random results after refreshing the page.

https://s15.directupload.net/images/181115/kjuu55ib.gif

As I said in my last reply,

Code:

This is a fake solution. It'll generate random number between 10-90 (both included)
I have a working solution but it contains php codes in it. Getting some informations from database. In my opinion it is not safe to use it that way. Nvm, still working on it!!


All times are GMT -4. The time now is 14:54.

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