All Good Things Must Come To An End

As you all know, I have been doing WordPress plugins and supporting it for the past 6 years. These 6 years of my life, I have been through my polytechnic education, my national service as well as my university education.

I just graduated from university in December 2009 and have been looking for full-time jobs. I am offered a full-time job and will be starting work on 1st February 2010.

I regret to say that I am NOT ABLE to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

However, I WILL still update my plugins whenever I can and you still can report bugs to me via email and I will try to fix it.


Author Topic: Highest rated from multiple categories  (Read 5205 times)

0 Members and 1 Guest are viewing this topic.

Offline dirs

  • Newbie
  • *
  • Posts: 5
    • View Profile
Highest rated from multiple categories
« on: 21 August 2007, 05:48 »
Hi, today I've needed select an Array of highest rated categories and for this I've make some improvements on the function get_highest_rated_category.

I put this:

Code: [Select]
if(is_array($category_id)) {
  $cat_filter = "IN (".join(",", $category_id).")";
  } else {
  $cat_filter = "= $category_id";
}

Before the
Code: [Select]
$highest_rated = $wpdb->get_results
and change
Code: [Select]
$wpdb->post2cat.category_id = $category_idto
Code: [Select]
$wpdb->post2cat.category_id $cat_filter
Then for call the function for select from multiples categories i use (template):

Code: [Select]
<?php get_highest_rated_category(array(29,30,31,32), 'both'100?>
Thanks for read it, i hope this information be helpful.

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,536
    • View Profile
  • WordPress Version: WordPress 2.9.x
  • Theme Name: lesterchan.net v3.4
Re: Highest rated from multiple categories
« Reply #1 on: 21 August 2007, 05:57 »
THANK YOU for your contribution, I will add it in. Can I have your name and url to add in the source code?

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

Offline dirs

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Highest rated from multiple categories
« Reply #2 on: 21 August 2007, 16:09 »
THANK YOU for your contribution, I will add it in. Can I have your name and url to add in the source code?


Yeah :)
Dirceu P. Júnior
http://pomoti.com (pt-br)

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,536
    • View Profile
  • WordPress Version: WordPress 2.9.x
  • Theme Name: lesterchan.net v3.4
Re: Highest rated from multiple categories
« Reply #3 on: 21 August 2007, 18:02 »
noted =)

Thank you

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

Offline Ttech

  • Official Support
  • Global Moderator
  • *****
  • Posts: 4,294
    • View Profile
Re: Highest rated from multiple categories
« Reply #4 on: 21 August 2007, 23:50 »
Cool... :)
Learning and Helping one day at a time.




DevNode.org Operator - The IRC network for Programers