Webmastersite.net
Register Log In

custom rating fields
but wrong stars

Comments on custom rating fields

corbin
Experienced

Usergroup: Customer
Joined: Oct 21, 2003

Total Topics: 21
Total Comments: 53
corbin
Posted Mar 21, 2006 - 5:37 PM:

Note : this post has been corrected to bring informations to the reader

Hello,

If you want a cleaner presentation on displaylinks when you have two or more votes criteria, you can write :

<IF {SWITCH_RATINGS} and {LINKVOTES}>
<table><tr><td>{PALL_LANG_GENERAL_RATING}:
</td><td>{LINKSTARS} ({LINKRATING}/{MAXVOTE}, {L_LANG_GENERAL_VOTES} {LINKVOTES})
</td></tr>
<tr><td>
{PALL_LANG_GENERAL_RATING}:</td><td>{LINKSTYLERATINGSTARS} ({LINKSTYLERATINGRATING}/{MAXVOTE}, {L_LANG_GENERAL_VOTES} {LINKSTYLERATINGVOTES})
</td></tr></table>
</IF>

but surely NOT :

<table><tr><td>
<IF {SWITCH_RATINGS} and {LINKSTYLERATINGVOTES}>{PALL_LANG_GENERAL_RATING2}:
</IF></td><td><IF {SWITCH_RATINGS} and {LINKSTYLERATINGVOTES}>{LINKSTYLERATINGSTARS} ({LINKSTYLERATINGRATING}/{MAXVOTE}, {L_LANG_GENERAL_VOTES} {LINKSTYLERATINGVOTES})
</IF></td></tr>
<tr><td><IF {SWITCH_RATINGS} ...
</IF></table></tr></td> ... have been included for a better presentation)

thank you

CC
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Mar 21, 2006 - 10:17 PM:

What is the problem? You've said a lot of things you did, but I can't tell which ones you're saying you don't like (nor do I really understand #3 at all).

Anyhow custom ratings appear to be working, did a test giving a main rating of 5 and a style rating of 4 and everything shows correctly.
corbin
Experienced

Usergroup: Customer
Joined: Oct 21, 2003

Total Topics: 21
Total Comments: 53
corbin
Posted Mar 22, 2006 - 4:47 AM:

can be suppressed
corbin
Experienced

Usergroup: Customer
Joined: Oct 21, 2003

Total Topics: 21
Total Comments: 53
corbin
Posted Mar 23, 2006 - 5:56 AM:

i tried to be a little bit more clever by seing what modifications were done by "add fields" and "custom rating fields";
some questions araised in these descriptions (which could be detailed in their respective articles wink )

1 in admin/add fields
- item 1 : choose "link fields"
- item 2 : what kind for custom rating fields "text" ou "integer" ?
- item 3 : label to use in template (field name by default) :as it is (not a fieldname but) a label, no space and other exotics characters.
- item 4 : level1,level2,level3,level4,level5

2 modifications

- templates
. in templates/multilingual/suggestlink.tpl :
<tr>>td class="labels column"><span class="labels">stylerating :</span></td>
<td class="options column"><selectname="stylerating">
<option value=""></option>
<option value=""></option>
<option value=""></option>
<option value=""></option>
<option value=""></option>
</select></td></tr>
- in templates/multilingual/edit.tpl : same

the question is here : is it normal that <option value=""></option> is always empty though i have precised level1, level2,... or do we have to change values ourselves ?

- tables :
. links : addition of stylerating (text)
. ratings : nothing before the first vote
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Mar 25, 2006 - 9:18 AM:

1:2 - text. Leave everything text unless you have reason to think otherwise.
1:3 - it is not a field name, it's a label.

2: blank values? confused If they're blank you need to fill them. It would make more sense for it to not insert anything in those templates though, it's just defaulting to that because it doesn't have any special case for rating fields and thinks you're adding a selector.

Edit: Actually I can't duplicate that, I'm not getting anything inserted in my templates when I add a custom rating field.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.