The vB Geek

The vB Geek (http://www.thevbgeek.com/index.php)
-   Geek Article and Review System (http://www.thevbgeek.com/forumdisplay.php?f=26)
-   -   custom message if no rating (http://www.thevbgeek.com/showthread.php?t=5269)

atasteofchaos 08-13-2009 08:31 PM

custom message if no rating
 
I'm trying to show a single peice of text saying "No ratings yet" if no member has rated a CD that's been reviewed.

I changed the template "GARS_rating_result_bit" to this:

Code:

<if condition="$na">
<tr>
<td align="$stylevar[left]" class="alt1active" style="white-space: nowrap;" colspan="2">
No ratings yet</td></tr>
<else />
<tr><td align="$stylevar[left]" class="alt1active" style="white-space: nowrap;">$question[text]</td><td  class="alt1active" align="$stylevar[right]">$rating_value</td></tr>
</if>

But it just repeats the line "No ratings yet" in place of the different things you can rate. Where can I edit this and also remove the "0 users rated..." part too if no one has rated yet. But show it all when someone has rated.

Here's the page I mean:

http://www.rockonpublishing.co.uk/showthread.php?t=16

Morgan 08-15-2009 05:46 PM

The GARS_rating_result_bit template is for each rating bit so it would show each time. There is a $bits variable in the following templates that you might be able to edit, but as $bits contains all the bits from each rating, you might not be able to do just one "no ratings yet" unless you edit the code:
Code:

GARS_rating_result_bits0
GARS_rating_result_bits1
GARS_rating_result_bits2

The "0 users rated..." text comes from the following phrases. Go to the ACP -> Languages & Phrases -> Search in Phrases and in the Search for Text box do a search for each of these (make sure to mark the Phrase Variable Name Only radio button) and there you can edit the phrases:
Code:

GARS_x_user_rated_y_percent
GARS_x_users_rated_y_percent


atasteofchaos 08-19-2009 07:27 AM

They seem to have managed it on this site:

http://absolutepunk.net/showthread.php?t=1270162

I don't know if there will still be no member rating when you view it but if you view a review with no member rating on there site there's a custom yellow box saying "No one has rated yet, be the first..." kind of thing.

Any ideas?

Morgan 09-10-2009 04:54 PM

It sounds like a code edit to the $bits variable in the code and then maybe a template conditional to display the message.

atasteofchaos 12-18-2009 01:54 PM

Sorry it's been a while... do you know how i can do this? Bit of a novice - would love the feature... :)

Morgan 01-02-2010 02:33 AM

Sorry, haven't done it so the best advice I can give for the modification is in post two.

atasteofchaos 01-20-2010 04:43 PM

Hey. Just checking in to say that I cracked it and this is how it's done:

In the template, GARS_rating_result_bits1:

Code:

<if condition="$numberofusers < 1">
<tr>
<td>

No one has rated yet.

</td>
</tr>
<else />

NORMAL CODE HERE

Easy peasy! :)


All times are GMT. The time now is 05:14 PM.

Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.