get ptc ad v2
From CashCrusaderWiki
(Difference between revisions)
m |
(Contest PTC info) |
||
Line 1: | Line 1: | ||
- | {{DISPLAYTITLE: | + | {{DISPLAYTITLE:init_contestptc_stats}} |
- | Action '' | + | Action ''init_contestptc_stats'' fetches statistics of a [[Contest_Paid_To_Click_Advertising|contest PTC]] ad group. |
- | '''Required CashCrusader version:''' 2. | + | '''Required CashCrusader version:''' 2.27 |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | '''Example | + | '''Example usage:''' |
- | ''<?php action( | + | ''<?php $contest = action('init_contestptc_stats', 'contest|1|1'); ?>'' |
- | ''' | + | '''Argument details, from left to right:''' |
- | + | contest = this is the ad group for the contest PTCs<br /> | |
- | + | 1 = fetch last contest winner of this specific group, 1=true 0=false<br /> | |
- | + | 1 = calculate user's contest PTC win counter for this specific group, 1=true 0=false<br /> | |
- | 1 = | + | |
- | + | ||
- | ''' | + | '''Return value:''' |
- | + | This action returns an array which has contest details. If all details are not needed, the call can be optimized by disabling some statistics as described above. | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | '''Example | + | '''Example return value:''' |
- | $ | + | Array |
- | + | ( | |
- | + | [prize] => $0.10 | |
+ | [clicks_left] => 672 | ||
+ | [last_winner] => JohnDoe | ||
+ | [wins] => 5 | ||
+ | ) | ||
- | |||
- | |||
- | + | [[Category:Actions|init_contestptc_stats]] | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | [[Category:Actions| | + | |
[[Category:Customize]] | [[Category:Customize]] |
Revision as of 20:43, 26 January 2012
Action init_contestptc_stats fetches statistics of a contest PTC ad group.
Required CashCrusader version: 2.27
Example usage:
<?php $contest = action('init_contestptc_stats', 'contest|1|1'); ?>
Argument details, from left to right:
contest = this is the ad group for the contest PTCs
1 = fetch last contest winner of this specific group, 1=true 0=false
1 = calculate user's contest PTC win counter for this specific group, 1=true 0=false
Return value:
This action returns an array which has contest details. If all details are not needed, the call can be optimized by disabling some statistics as described above.
Example return value:
Array ( [prize] => $0.10 [clicks_left] => 672 [last_winner] => JohnDoe [wins] => 5 )