Where to modify review?

Posted in: Newsmag
Post count: 42

Hi, we need to modify the review module to suit our site.

Where is the file that I need to edit? I looked in directories but couldn’t find review.php (I see it called in the loop-single).

We have custom fields that specify venue, actor names, etc. that will go with the review. So we plan to pull them into the existing box. Hopefully this will work as we have about 6 years of reviews!

Post count: 7909

Hi,

You can modify the review code(file): http://screencast.com/t/zFmTszRZsyf

Thanks!

Post count: 42

Thanks! We may instead use the Newsmag system as it is very good.

I’d like to copy over our custom field “Rating” (0-5 with 0.5 stars) to the DB field used by the theme.

Any suggestions if this would be fairly straightforward? SQL query?

Cheers,
Clint

Post count: 6600

Hi,

Theme’s reviews are stored under td_review in the database: http://screencast.com/t/ZwevkAKWhttp://screencast.com/t/ZwevkAKW
This is the theme’s review settings: http://screencast.com/t/N4jgbQMghX6F
Not sure how you could easily do this. A SQL query update could work, anyways you need custom work for this so I suggest you get someone to help you with that if you can manage it by yourself as we cannot provide custom work right not because we work hard on development, fixes and support so you might look for a freelancer on site’s like http://studio.envato.com/

Thanks

Post count: 42

Thanks. I think we will use the TD review system instead to avoid complication. It looks great.

One change I want to make is instead of showing ‘OVERALL SCORE’ to a word related to the score.

E.G. 5 stars = ‘AWESOME’
4.5 stars = ‘ VERY GOOD’
etc

We are familiar with if/else and I see where to modify line in td_review.php.

What would syntax be, something like:

if the_field (‘rate’) = 5 stars, $rateword=’AWESOME’;
$buffy .= ‘<span>’ . __td($rateword, TD_THEME_NAME) . ‘</span>’;

Just not sure of correct syntax. I hope you can advise on this 1 change, the theme is awesome and love the modular structure!

Clint

Post count: 6600
Post count: 42

Brilliant thanks, works a charm. Final code:

if (self::calculate_total($td_review) == 5) {
$buffy .= ‘<span>’ . __td(‘OUTSTANDING – STARKIE!’, TD_THEME_NAME) . ‘</span>’;
} elseif(self::calculate_total($td_review) == 4.5) {
$buffy .= ‘<span>’ . __td(‘RIGHT ON THE MONEY’, TD_THEME_NAME) . ‘</span>’;
} elseif(self::calculate_total($td_review) == 4) {
$buffy .= ‘<span>’ . __td(‘SMASHING’, TD_THEME_NAME) . ‘</span>’;
} elseif(self::calculate_total($td_review) == 3.5) {
$buffy .= ‘<span>’ . __td(‘SWEET STUFF’, TD_THEME_NAME) . ‘</span>’;
} elseif(self::calculate_total($td_review) == 3) {
$buffy .= ‘<span>’ . __td(‘WORTH A LOOK’, TD_THEME_NAME) . ‘</span>’;
} elseif(self::calculate_total($td_review) == 2.5) {
$buffy .= ‘<span>’ . __td(‘COMME CI, COMME ÇA’, TD_THEME_NAME) . ‘</span>’;
} elseif(self::calculate_total($td_review) == 2) {
$buffy .= ‘<span>’ . __td(‘BOOHOO’, TD_THEME_NAME) . ‘</span>’;
} else {
$buffy .= ‘<span>’ . __td(‘OVERALL SCORE’, TD_THEME_NAME) . ‘</span>’;
}

Post count: 42

Oh, one more thing. We have about 5 custom fields we add to every review that includes venue, directors, actors, etc.

One example custom field is called ‘review-where’.

How do I push that field to the review module, right below ‘SUMMARY’ section?

My current code is:

<?php if((get_post_meta(get_the_ID(),”review-where”,true))) { ?>
<?php echo get_post_meta(get_the_ID(), “review-where”, true); ?><?php } ?>

Thanks again, I’m absolutely blown away by you guys!

Post count: 6600

Hi,

Add your code to the render table function here: http://screencast.com/t/dlZyhfbK
I suggest you get someone to help you with this if you don’t know how to do it yourself as you need custom work for this which we cannot provide as we work hard on development fixes and support. You can always get a freelancer from site like: http://studio.envato.com/

Thanks

Post count: 42

Thanks Lucian! I am so close (I can’t afford to hire freelancer). I added this line and the if works, but won’t output:

if((get_post_meta(get_the_ID(),”review-where”,true))) {$buffy.=’.get_post_meta(get_the_ID(), “review-where”, true).’;}

I know syntax is incorrect on 2nd part. How to I make it execute .get_post_meta command instead of echo?

If I know this I can do rest no problem! So close!

Clint

Post count: 42

I think I got it! Here’s code I used, hopefully ok 🙂

$buffy .= ‘<div class=”td-review-summary-content”>’;
$venue = get_post_meta( get_the_ID(), ‘review-where’, true);if (!empty($venue)) {$buffy.=”.$venue.”;}
$buffy .= ‘</div>’;

Post count: 42

Ah, all for not. I’ve decided to use your core review code as is!

Post count: 42

Hi, last question on this one.

I see this in each loop:

<?php echo $td_mod_single->get_review();?>

But where is if statement located to check if “Is product review” (and thus execute td_review.php)?

Thanks!

Post count: 7909

Hi,

You can find that function here: http://screencast.com/t/YkerhwpXUR

Thanks!

Post count: 42

Got it, we’re good! Thanks

Viewing 15 posts - 1 through 15 (of 15 total)
The forum ‘Newsmag’ is closed to new topics and replies.