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.

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - phlux0r

Pages: [1]
1
Actually, I made a post here about WP-Postratings and WP3.0. I had to make mods so the widget works correctly with custom post types since the default widget restricts the display to post_type = 'post' or 'page' depending on the widget setting. I extended it to work with custom post types. My post is here: http://forums.lesterchan.net/index.php/topic,4725.0.html

2
Ok, to answer my own question, I have made a quick mod to allow custom post types to be selected in the Ratings widget:

1. In wp-postratings.php line: 1157 changed default mode to 'all'"
Code: [Select]
$instance = wp_parse_args((array) $instance, array('title' => __('Ratings', 'wp-postratings'), 'type' => 'highest_rated', 'mode' => 'all', 'limit' => 10, 'min_votes' => 0, 'chars' => 200, 'cat_ids' => '0', 'time_range' => '1 day'));

2. Further down:
Code: [Select]
$time_range = esc_attr($instance['time_range']);
// MOD include custom post types in $mode options
$cpt = get_post_types(); // exclude 'attachment','revision','nav_menu_item';
$cpt = array_diff($cpt, array('attachment','revision','nav_menu_item'));
$cpt = array_merge(array('all'), $cpt);
// END MOD
3. Then changed the mode select drop-down like so:
Code: [Select]
<select name="<?php echo $this->get_field_name('mode'); ?>" id="<?php echo $this->get_field_id('mode'); ?>" class="widefat">
<?php // MOD: changed to use custom post type array
foreach ($cpt as $key => $value):
?>

<option value="<?php echo $value ?>"<?php selected($value$mode); ?>><?php echo ucfirst($value); ?></option>
<?php
endforeach;
//END MOD
?>


Finally in postratings-stats.php replaced all instances of 'both' with 'all' to reflect the change in the mode default.

Good luck.

3
WP-PostRatings / Re: FIX for settings redirect issue
« on: 09 April 2010, 00:09 »
@UKMagento

I don't think you'd want to use Magento as an ecommerce "add-on" for a WordPress site. It's more the other way around, you want to use WordPress as an "add-on" for a Magento ecommerce site (like we've done on http://return2health.net -> Articles).

4
WP-PostRatings / wp-postratings 1.50 and custom post types
« on: 09 April 2010, 00:05 »
I realize that Lester won't be having much time to work on these plugins and that's fine.

I just wanted to point out that this plugin won't work correctly on a WP site that uses custom post types. The rating part seems fine, however, the ratings widget doesn't take into account the additional post types since it only offers the selection of posts & pages to display the higest/lowest rated etc...

I was wondering if anyone will be adding custom post type compatibility in the near future?

Cheers

Pages: [1]