| Next: Yawns::Article | Previous: Yawns::About | [Table of Contents] |
Yawns::Adverts - A module for working with user-submitted adverts.
#!/usr/bin/perl -w
use Yawns::Adverts;
use strict;
my $add = Yawns::Adverts->new();
$add->addAdvert( title => "Title",
link => "http://foo.com/",
show => 1000 );
This module will deal with fetching, adding, and deleting user-submitted adverts to your Yawns website.
Create a new instance of this object.
Return the number of adverts which are active.
Return the number of adverts which are pending approval.
Record an advert click to the given ID.
Add a new advert to the site.
Retrieve all known information about the given advert.
Delete all adverts by the given user.
Return a hash-ref of all the adverts that the given user has posted.
Remove an advert from the site.
Disable an advert from the rotation
Enable an advert in the rotation.
Delete an advert
Fetch a random advert from the pool of available ones.
Choose only "enabled" adverts where the number of times that the advert has been shown is less than the number of times it has been paid to be displayed.
This will increase the "displayed" count - so it shouldn't be called unless the advert is intended to be displayed.
Fetch all the adverts from the pool of active ones.
Fetch all the adverts, that is both active and inactive ones.
Clean any cached content we might have.
Steve Kemp
http://www.steve.org.uk/
Copyright (c) 2005,2006 by Steve Kemp. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The LICENSE file contains the full text of the license.