1 (edited by 2012-04-10 23:07:05)

Topic: Please help! Starrating system!

Hi!
Today I've downloaded this!
http://masugadesign.com/software/unobtrusi...tar-rating-bar/

I have completed everything, but I don't know how I'm gonna display it on everynews.

I'm gonna need to say this after every news:
"<?php echo rating_bar('1','5'); ?>"

So I though of this. I went to shows.inc.php and made this line under "active news"
echo rating_bar($news_arr[0],'5');

And it works! But the problem is that it's either ifront of everything in my template or behind everything in my template. I doesnt get into the template, it gets either before or after... So than I though of this:

$rate = "echo rating_bar($news_arr[0],'5');";

$output = str_replace("{test}", $rate, $output);

And then in my template writing {test}
and I get the right info displayed, but only in text. I've tried to add <?php and that before but ofcourse in the template and news there can be php?

So how can I do this?
I'm not very good a php, so maybe there is a really easy solution?

EDIT: I want to be able to control where my rating is from my templates...

Re: Please help! Starrating system!

$output = str_replace("{test}", rating_bar('1','5'), $output);

Would that work?

Re: Please help! Starrating system!

$output = str_replace("{test}", rating_bar('1','5'), $output);

Would that work?

Haha finally it works! Thank you!!