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

[many games] AdsQL Advertisements System - v1.7.8 - Last Updated 2011-04-02


Post New Thread Reply   
 
Thread Tools Display Modes
Snaggle
AlliedModders Donor
Join Date: Jul 2010
Location: England
Old 03-10-2011 , 14:00   Re: [many games] AdsQL Advertisements System - v1.7.6 - Last Updated 2011-03-06
Reply With Quote #121

Heyop, been using the plugin now and it's worked great with no problems. I was just wondering if it would be possible to make ads show for people with certain flags?

For example, I have a set of players on my server with access to the "o" flag. Could it be possible to setup an advert that displays for the "o" flag people only?

Thanks
Snaggle is offline
PharaohsPaw
Senior Member
Join Date: Dec 2008
Old 03-10-2011 , 15:38   Re: [many games] AdsQL Advertisements System - v1.7.6 - Last Updated 2011-03-06
Reply With Quote #122

sorry, i don't speak russian (or any other languages than english), and I'm not familiar with coding html, php, or sourcemod for supporting other languages.

If someone wants to help we can look into it, but short of that, it's probably not going to happen.
PharaohsPaw is offline
Payalnick
Junior Member
Join Date: Mar 2011
Old 03-10-2011 , 15:44   Re: [many games] AdsQL Advertisements System - v1.7.6 - Last Updated 2011-03-06
Reply With Quote #123

Problem in the coding
Russian plugins work on utf8_general_ci, this utf8_swedish_ci but for some reason question (????????) signs are displayed
I change utf8_swedish_ci to utf8_general_ci - don't help.
Sorry for my bad english, i'm from Russia

Last edited by Payalnick; 03-10-2011 at 15:53.
Payalnick is offline
PharaohsPaw
Senior Member
Join Date: Dec 2008
Old 03-10-2011 , 15:51   Re: [many games] AdsQL Advertisements System - v1.7.6 - Last Updated 2011-03-06
Reply With Quote #124

Quote:
Originally Posted by Snaggle View Post
Heyop, been using the plugin now and it's worked great with no problems. I was just wondering if it would be possible to make ads show for people with certain flags?

For example, I have a set of players on my server with access to the "o" flag. Could it be possible to setup an advert that displays for the "o" flag people only?

Thanks
The plugin can currently (optionally) show ads only to people who have the "a" admin flag. It would probably be fairly simple to make which (single) flag the plugin shows special ads to, by making which admin flag gets the special ads configurable via a CVAR.

If you mean adding ANOTHER special class of ads, so for example you have one class of ads that only show to people with the "a" admin flag, others that only show to people with the "o" flag, etc., well, that's a different kettle of fish and I'm really not sure how many people honestly need that. It could be done, but it would require changes both to the web interface as well as adding another section of code to the ads display function in the plugin. And probably converting the Ad Visibility from radio buttons to a checkbox so nobody complains that they can't show an ad to both special classes of admins at the same time... and then some...

If I made the plugin configurable as to which admin flag gets the special ads when you set an ad for "admins only", would that be good enough? If so, it wouldn't be hard to do and I can probably get it into the next plugin update.

If not, being honest it's probably not something I'm going to want to mess with anytime soon.

PharaohsPaw

Last edited by PharaohsPaw; 03-10-2011 at 15:56.
PharaohsPaw is offline
PharaohsPaw
Senior Member
Join Date: Dec 2008
Old 03-10-2011 , 17:54   Re: [many games] AdsQL Advertisements System - v1.7.6 - Last Updated 2011-03-06
Reply With Quote #125

Quote:
Originally Posted by Payalnick View Post
Problem in the coding
Russian plugins work on utf8_general_ci, this utf8_swedish_ci but for some reason question (????????) signs are displayed
I change utf8_swedish_ci to utf8_general_ci - don't help.
Sorry for my bad english, i'm from Russia
displayed WHERE?

Please provide details
PharaohsPaw is offline
Payalnick
Junior Member
Join Date: Mar 2011
Old 03-11-2011 , 01:20   Re: [many games] AdsQL Advertisements System - v1.7.6 - Last Updated 2011-03-06
Reply With Quote #126

in game chat
Payalnick is offline
PharaohsPaw
Senior Member
Join Date: Dec 2008
Old 03-11-2011 , 06:23   Re: [many games] AdsQL Advertisements System - v1.7.6 - Last Updated 2011-03-06
Reply With Quote #127

Quote:
Originally Posted by Payalnick View Post
in game chat
Ah, so the ads themselves just display a bunch of question marks.

OK, sounds like some kind of charset issue. It was probably good that you tried changing the charset in the database. There may be 1-2 more places in the db tables that need changing as well.

I won't be able to look at this until sometime this evening, and it may take a little while to straighten out. But I do have a couple of ideas. Hopefully it is just charset translation stuff.

In the meantime, you may want to try removing the ads you had put in the database before you changed the utf8_swedish_ci to utf8_general_ci, and try putting one or two of them back in again to see if will display those you put back in correctly.

I have not really dealt with charset issues in sourcemod or web coding before, but I ran into one case at work a few years ago that involved character set problems. The short version was that when they changed the "system character set" on an application, all existing filenames for files written by the application previously were no longer readable by the clients. The filenames hadnt actually changed but because they changed the "source" character set setting in the application, they were "translated" incorrectly when displayed to the clients.

This is why I think you may want to try adding 1-2 new ads and see if those display correctly or not. If it doesn't work, it probably means there is somehwere else we need to look at charset settings.

cheers,
PharaohsPaw

Last edited by PharaohsPaw; 03-11-2011 at 11:27.
PharaohsPaw is offline
SauceHelmet07
Junior Member
Join Date: Apr 2006
Old 03-11-2011 , 22:53   Re: [many games] AdsQL Advertisements System - v1.7.6 - Last Updated 2011-03-06
Reply With Quote #128

Hey Pharaoh,

Not sure if this is due to the update or what, but the console says AdSQL is firing the ads, yet they aren't appearing in-game.

I've changed maps & did server restarts but I can't get them to show in-game for some reason.

Console:


L 03/11/2011 - 21:45:04: [adsql.smx] [AdsQL] - DBconnect: hndl value = '24052067'
L 03/11/2011 - 21:45:04: [adsql.smx] [AdsQL] - Connected Successfully to Database


L 03/11/2011 - 21:45:14: [adsql.smx] [AdsQL] - Using Server ID 'bob' for ads search
L 03/11/2011 - 21:45:14: [adsql.smx] [AdsQL] - SetupAds: We do not already have an Ad Display Timer
L 03/11/2011 - 21:45:14: [adsql.smx] [AdsQL] - SetupAds: Created a New Ad Display Timer
L 03/11/2011 - 21:45:14: [adsql.smx] [AdsQL] - SetupAds finishing, resetting bAdsBeingSetupAlready to false
[AdsQL] 15 rows found

Then it lists all the ads here and begins firing them.

L 03/11/2011 - 21:48:09: [adsql.smx] [Ads-QL] Firing Ad 4/15 [21:48:09]: s, {GREEN}Type {LIGHTGREEN}motd {GREEN}for a list of server rules., all, cstrike


Any ideas?

Edit: Just tried the plugin on another server, same exact issue. Only difference is console, it doesn't say Firing, it just says

[Ads-QL] Ad 2/13: s, {GREEN}Type {LIGHTGREEN}motd {GREEN}for a list of server rules., all, cstrike

Last edited by SauceHelmet07; 03-12-2011 at 02:15.
SauceHelmet07 is offline
PharaohsPaw
Senior Member
Join Date: Dec 2008
Old 03-12-2011 , 08:15   Re: [many games] AdsQL Advertisements System - v1.7.6 - Last Updated 2011-03-06
Reply With Quote #129

Quote:
Originally Posted by SauceHelmet07 View Post
Hey Pharaoh,

Not sure if this is due to the update or what, but the console says AdSQL is firing the ads, yet they aren't appearing in-game.

[snip]

Then it lists all the ads here and begins firing them.

L 03/11/2011 - 21:48:09: [adsql.smx] [Ads-QL] Firing Ad 4/15 [21:48:09]: s, {GREEN}Type {LIGHTGREEN}motd {GREEN}for a list of server rules., all, cstrike
Umm, is that really a lowercase "s" right before the ad text?

ie:

L 03/11/2011 - 21:48:09: [adsql.smx] [Ads-QL] Firing Ad 4/15 [21:48:09]: s, {GREEN}Type {LIGHTGREEN}motd {GREEN}for a list of server rules., all, cstrike

if so, then my immediate guess is that the ad is not actually displaying (even though you see the "firing ad" message in debug log output) because it doesn't know what an "s" type ad is. It is supposed to be "S" (capital S).

Quote from the source code section responsible for displaying "say" type ads:
Code:
                if (StrContains(sType, "S") != -1)
                {
Did you manually edit ads in your database or something? I have checked all "legacy" ads in my database as well as new ones I have added through the newer web interface and don't have any "say" type ads (all but 1-2 of ours are say ads) that had the ad type set to lowercase "s". I have also edited several ads. They are all uppercase S. So I don't think this is a problem with the plugin or the web interface writing a lowercase "s" into the ad type field in the database. The most likely cause I can think of is that these ads were added/edited manually and you didn't put uppercase S's into the field.

You are probably going to have to go back and fix your ads.

PS: if you are using a different web interface to edit these ads besides mine, you'll need to take this up with whoever wrote the other interface.


Quote:
Originally Posted by SauceHelmet07 View Post
Edit: Just tried the plugin on another server, same exact issue. Only difference is console, it doesn't say Firing, it just says

[Ads-QL] Ad 2/13: s, {GREEN}Type {LIGHTGREEN}motd {GREEN}for a list of server rules., all, cstrike
The obvious explanation here is that you are running a different version of the plugin on that server which displays a different debug-level log message. See the Changelog

Last edited by PharaohsPaw; 03-12-2011 at 09:31.
PharaohsPaw is offline
SauceHelmet07
Junior Member
Join Date: Apr 2006
Old 03-12-2011 , 09:12   Re: [many games] AdsQL Advertisements System - v1.7.6 - Last Updated 2011-03-06
Reply With Quote #130

Doh, that was it. Works flawlessly now. Thanks for putting up with my minuscule mistakes

One, probably last, question:

Was looking into server ID strings, and I'm not entirely sure if this would work or not.

zm, zm2, zml, zmp - would these conflict?

Thanks again.
SauceHelmet07 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 16:19.


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