Pages: [1]   Go Down
  Print  
Author Topic: Point Ads are coming first and then Cash Ads  (Read 100 times)
HP
Jr. Member
**
Offline Offline

Posts: 58


View Profile
« on: January 25, 2012, 10:41:43 PM »

Hello,

In my Site, in View Ads Page, I had seen that Point ads are coming first then Cash ads are coming. I want that Cash ads should come first then the Point ads...

Is that Possible?

Thanks Smiley
Logged
Upgrade to an SDR 3
bprasetio
Global Moderator
Hero Member
*****
Offline Offline

Posts: 835


View Profile
« Reply #1 on: January 26, 2012, 06:21:35 PM »

the view ads concept is not about which come first: points or cash, but the value of the ads.
View Ads page is displayed by sorting ads from highest value to the lowest one by default.

Generally, admins assigned point based ad with the value bigger than 0 (for example: 1, 2, 100, 200, etc) and assigned cash based ad with the value lower than 0 (for example: 0.0025, 0.005, 0.01, etc)
so, this will display the point based first and then cash based ads in the view ads page.
if you set the points to for example 0.0025, 0.005, the ads will be mix displayed.

so, if you want to force to display the cash based ads first you have to modify the script a little bit.
you have to modify members/click.php file
look for the piece of code below, somewhere in the beginning of the file
Quote
$sql = $Db1->query("SELECT * FROM ads WHERE
    credits>=1
   and active=1
   and (country='' or country='{$thismemberinfo[country]}')
   and (daily_limit>views_today or daily_limit=0)
   and (upgrade='' or upgrade='1')
   ORDER BY $orderby $type
");


change to
Quote
$sql = $Db1->query("(SELECT * FROM ads WHERE
    credits>=1
   and active=1
   and (country='' or country='{$thismemberinfo[country]}')
   and (daily_limit>views_today or daily_limit=0)
   and (upgrade='' or upgrade='1')
   and class <> 'P'
   ORDER BY $orderby $type)
   UNION
   (SELECT * FROM ads WHERE
    credits>=1
   and active=1
   and (country='' or country='{$thismemberinfo[country]}')
   and (daily_limit>views_today or daily_limit=0)
   and (upgrade='' or upgrade='1')
   and class = 'P'
   ORDER BY $orderby $type)
");   


then look for code below:
Quote
$sql = $Db1->query("SELECT * FROM ads WHERE
   credits>=1
   and active=1
   and (country='' or country='{$thismemberinfo[country]}')
   and (daily_limit>views_today or daily_limit=0)
   and (upgrade='0' ".($thismemberinfo[type]==1?" or upgrade='1'":"").")
   ORDER BY $orderby $type
");   

and change to:
Quote
$sql = $Db1->query("(SELECT * FROM ads WHERE
   credits>=1
   and active=1
   and (country='' or country='{$thismemberinfo[country]}')
   and (daily_limit>views_today or daily_limit=0)
   and (upgrade='0' ".($thismemberinfo[type]==1?" or upgrade='1'":"").")
   and class <> 'P'
   ORDER BY $orderby $type)
   UNION
   (SELECT * FROM ads WHERE
    credits>=1
   and active=1
   and (country='' or country='{$thismemberinfo[country]}')
   and (daily_limit>views_today or daily_limit=0)
   and (upgrade='0' ".($thismemberinfo[type]==1?" or upgrade='1'":"").")
   and class = 'P'
   ORDER BY $orderby $type)
");   

I havent tested it in the live site, so just hope that it works.
Logged

Presenting MyGPT Group:

[WTS] Task Summary Addon
HP
Jr. Member
**
Offline Offline

Posts: 58


View Profile
« Reply #2 on: January 27, 2012, 08:06:53 AM »

Thank you soo Much..
That works, but ads are arranging according to time when their are created Cry

Edited:
Is it possible to arrange the ads according to its timer?
I mean first 30 Seconds ads and then 3 Seconds and soo on..
« Last Edit: January 27, 2012, 08:09:22 AM by HP » Logged
bprasetio
Global Moderator
Hero Member
*****
Offline Offline

Posts: 835


View Profile
« Reply #3 on: January 27, 2012, 04:38:15 PM »

in the beginning of the file, look at the
Quote
if($orderby == "")    $orderby="pamount";

and change to
Quote
if($orderby == "")    $orderby="timed";

Note: this is the default config, if you have modified your view ads page (the way its work), it might not work

« Last Edit: January 27, 2012, 04:40:11 PM by bprasetio » Logged

Presenting MyGPT Group:

[WTS] Task Summary Addon
HP
Jr. Member
**
Offline Offline

Posts: 58


View Profile
« Reply #4 on: January 28, 2012, 11:16:37 AM »

in the beginning of the file, look at the
Quote
if($orderby == "")    $orderby="pamount";

and change to
Quote
if($orderby == "")    $orderby="timed";

Note: this is the default config, if you have modified your view ads page (the way its work), it might not work



Thank You AGAIN!
IT WORKS!
Logged
Get a SDR 3 NOW at http://ptcfactory.info

The best and most up to date Aurora script in the market!!
Pages: [1]   Go Up
  Print  
 
Jump to: