Customizing RevMax signup forms
Warning this information may be outdated. Please see the forum for up to date RevMax help and instructions. http://www.openxpayments.com.
I see many purchase OpenX Plugin RevMax and never do get it fully integrated into their sites look and feel, perhaps leaving some potential advertising customers wondering if they are even at the same website they wish to advertise on.
I will try to express some simple methods here, hopefully in time I can post more.
First lets take a look at adding a advertising package to a php web page
by using php to pull the ad package information from the ox_RM_adpackages table.
First we need to include init.php and RevMax.functions so we know where we are at and make functions within RevMax available on the current web page.
//init tells us where we are at require_once 'openx/init.php'; // nothing works without functions require_once MAX_PATH . '/www/admin/plugins/RevMax/lib/RevMax.functions.php';
Next we need to define and make a connection to the OpenX database.
global $conn; $config = $GLOBALS['_MAX']['CONF'];
Now we need to choose exactly what package and information we wish to list. The below example will return the first ad package set as a subscription from within RevMax, or produce an error as to why it couldn’t.
$sql = "SELECT * FROM `{$config['table']['prefix']}RM_packages` WHERE `selling`='Subscription' LIMIT 0, 1"; $res = mysql_query($sql, $conn) or die(mysql_error()); // by changing " WHERE `selling`='Subscription' LIMIT 0, 1"; " // to WHERE `selling`='AdViews' LIMIT 0, 1"; // we can now list the first available AdViews package
We can now list that information on the web page.
<?php while($row = mysql_fetch_assoc($res)) { ?> <td width="27%" colspan="3" align="center" style="border-style: none; border-width: medium" height="50"> $<?php echo $row['packagename']; ?> $<?php echo $row['packagecost']; ?> </td> <?php } ?> <?php mysql_free_result($res); ?>
Using the same above call one can list packages depending on Subscription, AdViews, or AdClicks. Using that information you can then place a link with the current package information on any page
That pages package will always reflect the current package description and price within RevMax ad packages.
You can then link this information directly to the a slightly modified advertisers signup form such as this one. “moded-advertisers.php?packageid=4″
You will note that the advertiser sign up form displays this package (#4) on the form and does not offer alternatives. This method is extremely helpful when you have several sites you wish to sell advertising on independently and do not wish these packages to be available on the list on the advertisers signup screen or the clients reorder page. You can set a package as private in RevMax ad packages, and still list it elsewhere like above.
You can download the moded advertisers.php here , compare the original lines 434 to the new at line 421.
Any questions , errors contact me.
















