PDA

View Full Version : Pay Per Click plugin has been released


Dave Baker
05-29-2008, 09:32 AM
Greetings all,
Get ability to create pay-per-click (http://en.wikipedia.org/wiki/Pay_per_click) directory.
There are several configuration settings in the plugin:
amount of top rates. - how many top rates will be shown in your suggest-listing page for category where listing will be placed
Reset unique status of click every [...] day[s] - how offen click from the same ip addresse will be taken into consideration
use whole rate
Ppc settings you will be able to find here: Admin Panel » Configuration » Miscellaneous

After installation will be added additional field "rate" where you will be able to suggest your rate(in suggest listing page) or edit it(in edit-listing page) for each click(unique click) on the listing url.

In User account will be created new tab/option(PPC Account) where users can manage their current balance (add funds, review balance and transactions).
For each listing (in "my listings" tab) will be added "Statistics of clicks" option which helps you to review all clicks with options for sorting like:
Sorted By Ip-address or date
From The last day, week, month, year, begining
Show only paid clicks

Also will be added option for sorting links in categories of your directory by ppc rates Admin Panel » Configuration » Listings Configuration » Listings order by.

Admin can manage users balance via Admin Panel » Manage Accounts
To review clicks statistic go to Admin Panel » Manage Accounts » click on number of all listings

After user balance will be depleted, user

If user's balance is short of money for one or several listing, user will receive email with message that balance is depleted for each listing which is short of balance. The email template you can change here: Admin Panel » Configuration » Email Templates » Depleted balance

You can test it here: http://intellitests.com/v2204/
username: dave
password: dave
Or you can create your own account.

If you made any changes in your purchase.php you need to add changes in the file manually:
***Open purchase.php and find code***

if (!file_exists(ESYN_HOME."plugins".ESYN_DS.$_POST['type']."/pre_".$_POST['type'].".php"))
{
$_GET['error'] = "404";
require_once("./error.php");
die();
}

require_once(ESYN_HOME."plugins".ESYN_DS.$_POST['type'].ESYN_DS."pre_".$_POST['type'].".php");
?>

<script type="text/javascript">
document.forms["check_out_form"].submit();
</script>

</body>
</html>

***Before add code***

esynConfig::startHook("purchaseTotalData");

***save file***

If you made any changes in your suggest-listing.php you need to add changes in the file manually:
***Open suggest-listing.php and find code***

// Deep links
if(isset($plan['deep_links'], $_POST['deep_links'], $_POST['deep_links']['title'], $_POST['deep_links']['url'])
&& is_array($_POST['deep_links']['url'])
&& is_array($_POST['deep_links']['title'])
&& (int)$plan['deep_links'] > 1)
{
$urls = &$_POST['deep_links']['url'];
$titles = &$_POST['deep_links']['title'];
foreach($urls as $i => $u)
{
// valid url, not empty title and is deep link
if(false !== strpos($u, $listing['url']))
{
$listing['_deep_links'][esynSanitize::sql($u)] = esynSanitize::sql($titles[$i]);
}
else
{
$listing['_deep_links'][] = 'empty';
}
}
}
// end Deep links

***Below add***

$additionalPaymentClause = false;

***Save file***

If you made any changes in your templates/yourTemplate/edit-listing.tpl you need to add changes in the file manually:
***Open templates/yourTemplate/edit-listing.tpl and find code:***

{include file="header.tpl"}

<h1>{$lang.edit_listing}</h1>

{if $msg}
<div class="notification"><ol>{$msg}</ol></div>
{/if}

<div class="box">
<strong>{$lang.category}:</strong> {$listing.category_title|escape:"html"} <a href="javascript: void(0);" onclick="moveListing({$listing.id});"><img src="{$img}move_16.png" alt="{$lang.move_listing}" title="{$lang.move_listing}" /></a><br />
<div id="moveto{$listing.id}" style="display:none;" class="moveto">&nbsp;</div>

<form action="{$config.base}{$config.dir}edit-listing.php?id={$listing.id}" method="post" name="edit_listing" enctype="multipart/form-data">

***Below add***

{esynHooker name="editListingForm"}

***save file**

Simon Gooffin
05-29-2008, 12:33 PM
Thanks Dave

smartpc
05-29-2008, 12:48 PM
Quality addition. :applause: