Raised This Month: $51 Target: $400
 12% 

AdsQL Advertisements System - v2.31 - Last Updated 2013-01-25


Post New Thread Reply   
 
Thread Tools Display Modes
Schpraaankiii
Veteran Member
Join Date: Dec 2009
Location: Sweden Norrköping
Old 05-17-2015 , 20:39   Re: AdsQL Advertisements System - v2.31 - Last Updated 2013-01-25
Reply With Quote #81

Love this plugin!
Could you add so that only level 6-9 admins can edit ads added by level 6-9 admins.
As example, a level 3 admin can only edit ads created by a level 3-5 admin whilst a level 6-9 admin can edit whatever.
__________________
CAOSK-ESPORTS.COM
Schpraaankiii is offline
Send a message via Skype™ to Schpraaankiii
LiMaaa
AlliedModders Donor
Join Date: Oct 2010
Location: Behind You
Old 07-02-2015 , 08:34   Re: AdsQL Advertisements System - v2.31 - Last Updated 2013-01-25
Reply With Quote #82

{PORT} Function seem to be broken (tested in tf2). {IP} Works fine though.
Also would be nice to have support of morecolors in this. That way users can just add their own colors according to morecolors.
__________________
>>> Hiring SourcePawn, Node.js, SteamAPI DEVS <<<
Feel free to add me on steam or PM me on the forums.
Endless Gamers Community
http://endlessgamers.com
LiMaaa is offline
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 07-02-2015 , 08:55   Re: AdsQL Advertisements System - v2.31 - Last Updated 2013-01-25
Reply With Quote #83

Quote:
Originally Posted by AdRianaLiMaaa View Post
{PORT} Function seem to be broken (tested in tf2). {IP} Works fine though.
Also would be nice to have support of morecolors in this. That way users can just add their own colors according to morecolors.
The way I see the code from OP, it doesn't have parsing for {IP} or {PORT} built-in.

However, in the end, it does seem to check if there are {} blocks that hasn't yet been parsed, and if there is, it looks them up in the server configuration variables, which should mean if you write {mp_timelimit} (even if that one wasn't supported), it would try to find it and use the contents of that server variable.

Both from a CS:S server, and from the console in the TF2 client, I see this:

Code:
] ip
"ip" = "localhost"
 - Overrides IP for multihomed hosts
] port
Unknown command "port"
] hostip
"hostip" = ""
 - Host game server ip
] hostport
"hostport" = "27015"
 - Host game server port
]
Could you eventually try {HOSTPORT} and return with the result?
__________________
Mostly known as "DarkDeviL".

Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread].
DarkDeviL is offline
LiMaaa
AlliedModders Donor
Join Date: Oct 2010
Location: Behind You
Old 07-02-2015 , 10:18   Re: AdsQL Advertisements System - v2.31 - Last Updated 2013-01-25
Reply With Quote #84

Quote:
Originally Posted by arne1288 View Post
The way I see the code from OP, it doesn't have parsing for {IP} or {PORT} built-in.

However, in the end, it does seem to check if there are {} blocks that hasn't yet been parsed, and if there is, it looks them up in the server configuration variables, which should mean if you write {mp_timelimit} (even if that one wasn't supported), it would try to find it and use the contents of that server variable.

Both from a CS:S server, and from the console in the TF2 client, I see this:

Code:
] ip
"ip" = "localhost"
 - Overrides IP for multihomed hosts
] port
Unknown command "port"
] hostip
"hostip" = ""
 - Host game server ip
] hostport
"hostport" = "27015"
 - Host game server port
]
Could you eventually try {HOSTPORT} and return with the result?
Confirming {HOSTPORT} does supply the port of the server, so replace:
Code:
{IP}:{PORT}
with

Code:
{IP}:{HOSTPORT}
I also wanted to include some prefixes from extended_advertisements to work in TF2 and CSGO. Help would be appreciated, eg:

Code:
{CLIENT_NAME}
Another bug i seem to have found: With {DEFAULT}, colors go by team colors on CS:GO, instead of white. This only happens if {DEFAULT} is at the very beginning of an ad:

Code:
{DEFAULT}Check out our server. {GREEN}It is pretty!
__________________
>>> Hiring SourcePawn, Node.js, SteamAPI DEVS <<<
Feel free to add me on steam or PM me on the forums.
Endless Gamers Community
http://endlessgamers.com

Last edited by LiMaaa; 07-02-2015 at 14:40.
LiMaaa is offline
LnG
Junior Member
Join Date: Sep 2006
Old 08-24-2015 , 13:12   Re: AdsQL Advertisements System - v2.31 - Last Updated 2013-01-25
Reply With Quote #85

This is not really an error since it does not happen to normal users, I guess the dev made the plugin like this on purpose. The plugin is ignoring the server id if "game" is set to "All" in the database, but then again who runs ads on multiple games and at the same time specify serverid.

Its an easy fix though for those that do, just replace this:

Code:
Format(query, sizeof(query), "SELECT * FROM adsmysql WHERE ( game='All' OR (game LIKE '%%%s%%' AND gamesrvid='All') OR (game LIKE '%%%s%%' AND gamesrvid LIKE '%%%s%%') ) ORDER BY id;", GameSearchName, GameSearchName, GameSrvID);
with this:

Code:
Format(query, sizeof(query), "SELECT * FROM adsmysql WHERE ( (game='All' AND gamesrvid='All') OR (game='All' AND gamesrvid='%%%s%%') OR (game LIKE '%%%s%%' AND gamesrvid='All') OR (game LIKE '%%%s%%' AND gamesrvid LIKE '%%%s%%') ) ORDER BY id;", GameSrvID, GameSearchName, GameSearchName, GameSrvID);

Last edited by LnG; 08-24-2015 at 13:25.
LnG is offline
nco
Junior Member
Join Date: Mar 2016
Location: c:/home
Old 02-03-2017 , 19:35   Re: AdsQL Advertisements System - v2.31 - Last Updated 2013-01-25
Reply With Quote #86

Very nice Plugin i like it!
Can someone helping me with updating the colors for csgo?

Last edited by nco; 02-03-2017 at 19:36. Reason: written wrong
nco is offline
good_live
AlliedModders Donor
Join Date: Oct 2013
Old 02-04-2017 , 02:14   Re: AdsQL Advertisements System - v2.31 - Last Updated 2013-01-25
Reply With Quote #87

This one should work with CS:GO
You'll need multicolors for compilation: https://forums.alliedmods.net/showthread.php?t=247770
Attached Files
File Type: sp Get Plugin or Get Source (adsql.sp - 154 views - 31.9 KB)
File Type: inc htmlspecialchars.inc (924 Bytes, 128 views)
good_live is offline
nco
Junior Member
Join Date: Mar 2016
Location: c:/home
Old 02-04-2017 , 07:38   Re: AdsQL Advertisements System - v2.31 - Last Updated 2013-01-25
Reply With Quote #88

Quote:
Originally Posted by good_live View Post
This one should work with CS:GO
You'll need multicolors for compilation: https://forums.alliedmods.net/showthread.php?t=247770
Its Working thanks
But the color {BLUE} ist showing as green?
Maybe a possbile fix ?
Edit: im using Lightblue now its ok

Last edited by nco; 02-04-2017 at 07:39. Reason: edit:
nco is offline
rowedahelicon
Senior Member
Join Date: Feb 2011
Location: The Observatory
Old 06-15-2018 , 04:36   Re: AdsQL Advertisements System - v2.31 - Last Updated 2013-01-25
Reply With Quote #89

Hello, I quickly edited this to support installations of php 5.5.x onward, I cleaned up every bug* I could find so hopefully anyone who needs this may use it.

If you have any suggestions or any bugs you'd like me to try and fix, let me know and I'll do so when I have the free time!

https://gitlab.com/Rowedahelicon/adsql-revision

*Edit: I cleaned every fatal bug that stopped it from not working on modern installs, but the page itself is littered with some wacky security flaws. I intend to redesign the backend for this entirely for those interested
__________________
SCG, A furry community in the stars - https://www.scg.wtf

Last edited by rowedahelicon; 06-15-2018 at 04:56.
rowedahelicon is offline
Send a message via Skype™ to rowedahelicon
Kebab230
Member
Join Date: Jan 2018
Old 03-05-2021 , 09:57   Re: AdsQL Advertisements System - v2.31 - Last Updated 2013-01-25
Reply With Quote #90

is there anyway to add line break in advert messages?
Kebab230 is offline
Reply



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

Forum Jump


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


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