April 18, 2016 in Feedback
Currently, in \IPS\Output::sendOutput, you check whether there are any ads on the current page, and update the ad impressions count in the DB. Aside from this not working correctly, it would also be really useful (and sensible) if this were abstracted to a separate function, probably as a member of \IPS\core\Advertisment. That way, you're not including arbitrary code in the output class (code in the output class shouldn't really care whether there are ads on the page), and you also make it hookable, so if I decide that I want to increment some other advert counts for a third party plugin, or that I don't want to log the impression count in the database (or maybe not log it at all, which is entirely reasonable), it is actually possible without overriding the entirety of \IPS\Output::sendOutput.
This topic is now archived and is closed to further replies.
Started 28 minutes ago
Started November 25
Started 8 hours ago