Skip to content
FREE & OPEN SOURCE Million Dollar Script is a free WordPress plugin for sponsor walls, campaign grids, fundraiser boards, and premium add-on workflows.

General

Ad List only shows one grid

Started January 20, 2013 by scubareb

Hi Everyone,The advertiser list only shows one grid. How can I make it show all grids or at least choose which ones I want on this list?Also,how can I make it so a certain grid is displayed first and/or highlighted?Thanks!

5 replies

Hey, you would have to modify the SQL queries that display the list to pull from other grids as well I believe. That should be located in the list.php file.

Hi Ryan,Thanks for the reply as always. I think I found the code that chooses which grids? I am not familiar with PHP, any ideas how to modifiy this?[code]$sql = "SELECT *, MAX(order_date) as max_date, sum(quantity) AS pixels FROM orders where status='completed' AND banner_id='$BID' GROUP BY user_id, banner_id order by pixels desc ";$result = mysql_query($sql) or die(mysql_error());[/code]

You might just have to remove the part AND banner_id='$BID'

Hi,Deleting that did in fact show both grids on the list now!Now, how can I make one grid be displayed first in list and highlighted in a color? :)

You would have to order the query by the banner_id and then on output check the banner_id column to see what it is and maybe wrap it in a div and put a class attribute on the div.So at the end where it has "order by pixels desc", change it to "order by pixels desc, banner_id".