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: Okay, so it is a problem with my theme, but can you help me?  (Read 3599 times)

0 Members and 1 Guest are viewing this topic.

Offline Zoomdweebie

  • Newbie
  • *
  • Posts: 6
    • View Profile
  • WordPress Version: WordPress 2.8.x
  • Theme Name: Artisteer generated custom theme
   1.  WordPress Version:  2.8.6
   2. Theme Name:  Artisteer generated custom theme
   3. Blog URL:  52teas.com
   4. Problem Plugin Name And Version:  WP-PostRatings 1.50
   5. PHP And MYSQL Version:  5.2.11 / 5.1.30
   6. Possible Conflicting Plugins (Optional):  My theme?

Okay, so I've been looking through your forum and tried everything I can think of.  I DID activate the default WP Theme, and your plugin did seem to work when I did that, so I imagine that it is a problem with my theme. 

I'm a tea blender, not a programmer, and I could really use your help.

Also, I have another issue I would like to ask you about.  I opted for your plugin because of the simple, straightforward shortcode [ratings id="1"].  If you look at my "In Stock" page, you will see that I am using the NextGen Gallery plugin along with some shortcodes from my YAK shopping cart that get put in the caption area of the gallery and allow me to add buy buttons to the images.  I was hoping that your plugin would allow me to add the star ratings there as well, but when I put the [ratings id="1"] shortcode into the caption field (changing the 1 to the relevant post id), I just get an echo of "[ratings id="1"]".  Is there something I can do to make this work properly?

Thanks for your help, I really appreciate it.

--Frank
52teas.com

I guess I should be more clear as to the issue I am having.  The stars appear, the text hovers above each star (and stays there).  Clicking on the stars does nothing.  Clicking a second time yields an error about only one rating at a time.

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,691
    • View Profile
  • WordPress Version: WordPress 3.0.x
  • Theme Name: lesterchan.net v3.4
Re: Okay, so it is a problem with my theme, but can you help me?
« Reply #1 on: 02 December 2009, 17:46 »
1. I am guessing it is some JS conflicts that prevent the icons from being clicked. I don't know the exact cause of it.

2. I don't think my plugin will work outside of what it is being coded to do which is to rate post or pages.

++ 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 Zoomdweebie

  • Newbie
  • *
  • Posts: 6
    • View Profile
  • WordPress Version: WordPress 2.8.x
  • Theme Name: Artisteer generated custom theme
Re: Okay, so it is a problem with my theme, but can you help me?
« Reply #2 on: 02 December 2009, 17:53 »
1.  Okay.  The only thing I can think of that uses js, would be the Hover plugin.  Do you think that could be it?

2.  That's all I want it to do is to display the ratings from each post.  (The way we are set up, each post is (generally) a product.)  I just want to know if there is some file I should look at modifying (like the theme's index.php file) to include the <?php if(function_exists('the_ratings')) { the_ratings(); } ?>   so that when I use [ratings id="1"] within the caption field for the NextGen Gallery, it will pull the appropriate star rating?

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,691
    • View Profile
  • WordPress Version: WordPress 3.0.x
  • Theme Name: lesterchan.net v3.4
Re: Okay, so it is a problem with my theme, but can you help me?
« Reply #3 on: 02 December 2009, 17:55 »
1. You can try deactivate and try one by one.
2. [ratings id="1"] should be put in the post content and not anywhere because I don't think the shortcode will be parsed. Is either you use the php code which is
Code: [Select]
<?php if(function_exists('the_ratings')) { the_ratings(); } ?> or [ratings id="1"], try not to use both.

Having said that, I don't think the plugin is capable of doing what you doing which is to rate products using NextGen

If you want just to pull the ratings result, use <?php echo the_ratings_results(1); ?> where 1 is the post id. Note that you may need to modify NextGen to do this

++ 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 Zoomdweebie

  • Newbie
  • *
  • Posts: 6
    • View Profile
  • WordPress Version: WordPress 2.8.x
  • Theme Name: Artisteer generated custom theme
Re: Okay, so it is a problem with my theme, but can you help me?
« Reply #4 on: 02 December 2009, 18:09 »
1.  Deactivated Hover and everything works fine now.  Might make a note that Hover and WP-StarRatings do not mix.  I didn't really need Hover anymore anyway.

2.  This makes me sad.  Okay, I did some more experimenting, and including the line <?php if(function_exists('the_ratings')) { the_ratings(); } ?>  in the Gallery theme's .php file DOES cause it to display the stars.  I have stars all over the place, and even clickable stars, but I think I am putting the line of code in the wrong place.  Here's the text of the php file, including the <?php if(function_exists('the_ratings')) { the_ratings(); } ?>   line where I have it now.  Could you look at my current In-stock page and tell me where I should move that line to, to make it work?  I think I'm close.  Maybe not, but I think I am.

<?php
/**
Template Page for the gallery overview

Follow variables are useable :

   $gallery     : Contain all about the gallery
   $images      : Contain all images, path, title
   $pagination  : Contain the pagination content

 You can check the content when you insert the tag <?php var_dump($variable) ?>
 If you would like to show the timestamp of the image ,you can use <?php echo $exif['created_timestamp'] ?>
**/
?>
<?php if (!defined ('ABSPATH')) die ('No direct access allowed'); ?><?php if (!empty ($gallery)) : ?>

<div class="ngg-galleryoverview" id="ngg-gallery-<?php echo $gallery->ID ?>">

<?php if ($gallery->show_slideshow) { ?>
   <!-- Slideshow link -->
   <div class="slideshowlink">
      <a class="slideshowlink" href="<?php echo $gallery->slideshow_link ?>">
         <?php echo $gallery->slideshow_link_text ?>
      </a>
   </div>
<?php } ?>

<?php if ($gallery->show_piclens) { ?>
   <!-- Piclense link -->
   <div class="piclenselink">
      <a class="piclenselink" href="<?php echo $gallery->piclens_link ?>">
         <?php _e('[View with PicLens]','nggallery'); ?>
      </a>
   </div>
<?php } ?>
   
   <!-- Thumbnails -->
   <?php foreach ($images as $image) : ?>
      <div id="ngg-image-<?php echo $image->pid ?>" class="ngg-gallery-thumbnail-box" <?php echo $gallery->imagewidth ?> >
      <div class="ngg-gallery-thumbnail" style="width: 80px;" >
         <a href="<?php echo $image->imageURL ?>" title="" <?php echo $image->thumbcode ?> >
            <img title="<?php echo $image->alttext ?>" alt="<?php echo $image->alttext ?>" src="<?php echo $image->thumbnailURL ?>" <?php echo $image->size ?> />
         </a>
         <span><?php if(function_exists('the_ratings')) { the_ratings(); } ?> <?php echo $image->caption ?></span>
      </div>
   </div>
   <?php if ( $gallery->columns > 0 && ++$i % $gallery->columns == 0 ) { ?>
   <br style="clear: both" />
   <?php } ?>
    <?php endforeach; ?>
    
   <!-- Pagination -->
    <?php echo $pagination ?>
    
</div>

<?php endif; ?>

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,691
    • View Profile
  • WordPress Version: WordPress 3.0.x
  • Theme Name: lesterchan.net v3.4
Re: Okay, so it is a problem with my theme, but can you help me?
« Reply #5 on: 02 December 2009, 18:13 »
You should not use <?php if(function_exists('the_ratings')) { the_ratings(); } ?> at all because it will NOT WORK outside the WordPress Loop - http://codex.wordpress.org/The_Loop

You should be using
Code: [Select]
<?php echo the_ratings_results(1); ?> where 1 is the post ID if you want to get the ratings only (it will not be ratable). The thing is that there is no way to get the post ID in other plugins automatically.


I don't think plugin is what you want. It is mean to rate post or pages only. You may want to try GD Star Ratings as I know it works differently, it may allow you to rate other things beside the posts and pages.

++ 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 Zoomdweebie

  • Newbie
  • *
  • Posts: 6
    • View Profile
  • WordPress Version: WordPress 2.8.x
  • Theme Name: Artisteer generated custom theme
Re: Okay, so it is a problem with my theme, but can you help me?
« Reply #6 on: 02 December 2009, 18:22 »
Okay.  :(

Just trying to figure out how they got my shopping cart plugin to work within the gallery plugin.  All I do is add a piece of shortcode to the caption area ([yak_quantity ####] or [yak_buy ####] where ####=post id and presto!  It displays the quantity on hand or the buy button.  That's what I was hoping for with your [ratings id="1"]. 

Is this something you think you COULD make work?  I could pay you in tea.  :)

--Frank

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,691
    • View Profile
  • WordPress Version: WordPress 3.0.x
  • Theme Name: lesterchan.net v3.4
Re: Okay, so it is a problem with my theme, but can you help me?
« Reply #7 on: 02 December 2009, 18:31 »
From the looks of it, it is not the "official" WordPress short code, WP shortcode uses [a id="1"] rather than just [a 1]. So perhaps nextgen gallery is calling some function to execute the YAK plugin? You may want to ask the NextGen Gallery author, Alex Rabe, is a friendly person =)

If the caption does executes WP shortcode it will work fine http://codex.wordpress.org/Shortcode_API

++ 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 Zoomdweebie

  • Newbie
  • *
  • Posts: 6
    • View Profile
  • WordPress Version: WordPress 2.8.x
  • Theme Name: Artisteer generated custom theme
Re: Okay, so it is a problem with my theme, but can you help me?
« Reply #8 on: 02 December 2009, 18:51 »
Yeah.  The thing is, I don't think Rabe designed NextGen to work like this.  It appears this other guy adapted it to work this way with HIS cart plugin (http://www.wordpress-ecommerce.com/wordpress-shop-using-nextgen-gallery-and-wp-shopping-cart-7) and tho he was no help in getting it to work for the cart plugin I am using, I did manage to convince my cart plugin developer to help me get it to work with his plugin (http://wordpress.org/support/topic/288177?replies=4) and he DID have a solution which I don't really understand.  Does it make sense to  you, and would it help make this work for WP-StarRatings?

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,691
    • View Profile
  • WordPress Version: WordPress 3.0.x
  • Theme Name: lesterchan.net v3.4
Re: Okay, so it is a problem with my theme, but can you help me?
« Reply #9 on: 02 December 2009, 18:58 »
You may want to try asking him to add parsing for WordPress Short code
Code: [Select]
add_filter('HIS_FILTER', 'do_shortcode', 11); http://codex.wordpress.org/Function_Reference/do_shortcode

++ 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 Zoomdweebie

  • Newbie
  • *
  • Posts: 6
    • View Profile
  • WordPress Version: WordPress 2.8.x
  • Theme Name: Artisteer generated custom theme
Re: Okay, so it is a problem with my theme, but can you help me?
« Reply #10 on: 02 December 2009, 19:13 »
So, is there a way I could add a line to the gallery theme to tell it to do the shortcode in the description field?  Or is it more complicated than that?

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,691
    • View Profile
  • WordPress Version: WordPress 3.0.x
  • Theme Name: lesterchan.net v3.4
Re: Okay, so it is a problem with my theme, but can you help me?
« Reply #11 on: 03 December 2009, 04:05 »
It is better for you to ask the plugin author instead. So if you want the shortcode to be executed in the shopping cart plugin, you have to ask the author for that or if you want it to be executed in NextGen Gallery, you will have to ask Alex. You can point them to http://codex.wordpress.org/Function_Reference/do_shortcode

++ 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.