Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: cbe_helpful: Visitors can rate articles (based on wlk_helpful)
That was fast! Happy to report that it’s working fine now! Thanks for the great plug-in!
Offline
Re: cbe_helpful: Visitors can rate articles (based on wlk_helpful)
Claire, any chance you could add a way to display the separate yes and no numbers in an article-list context? These don’t need to be clickable to vote, just displaying the values?
It would be nice to be able to display the number of “Thumbs Up” and Thumbs Down” next to an article summary rather than just the score.
Thanks,Doug.
Offline
Re: cbe_helpful: Visitors can rate articles (based on wlk_helpful)
douglgm a écrit:
[just] display the separate yes and no numbers in an article-list context
Hey, that’s a good idea !
How would you like it:
(a) Single tag: <txp:cbe_helpful link="0" />
(attribute link
or anything else you prefer)
(b) Container tag:
<txp:cbe_helpful>
<txp:cbe_helpful_yes link="0" />
<txp:cbe_helpful_no link="0" />
</txp:cbe_helpful>
(c) Container tag, 2nd version:
<txp:cbe_helpful link="0">
<txp:cbe_helpful_yes />
<txp:cbe_helpful_no />
</txp:cbe_helpful>
Which one between (b) and (c) seems the most usable ?
Offline
Re: cbe_helpful: Visitors can rate articles (based on wlk_helpful)
Option © looks good to me although there is potentially another snag!
What if I need to use different labels in the list than in the individual article context. At the moment the labels are set in the preferences. Would it be possible to override these with a label attribute too?
(sorry!)
Offline
Re: cbe_helpful: Visitors can rate articles (based on wlk_helpful)
douglgm a écrit:
Would it be possible to override these with a label attribute too?
No problem, I can add it too :)
The attributelabel
- would be available in all circumstances, i.e. also when the vote is available
- will affect
cbe_helpful_yes
,cbe_helpful_no
andcbe_helpful_scorecbe_helpful_total_votes
(I think it won’t harm)
Does it sound good ?
Last edited by CeBe (2013-04-29 10:55:38)
Offline
Re: cbe_helpful: Visitors can rate articles (based on wlk_helpful)
I think that’s ok. It just gives us more options if we want to have the different labels set in different forms rather than the preferences.
If the label attribute is unset then I’d expect it to default to the one set in the preferences. If the attribute label=”“ is present then could it suppress the label altogether?
Offline
Re: cbe_helpful: Visitors can rate articles (based on wlk_helpful)
douglgm a écrit:
I think that’s ok. It just gives us more options if we want to have the different labels set in different forms rather than the preferences.
Right. There is no functionality lost, it even adds new ones.
If the label attribute is unset then I’d expect it to default to the one set in the preferences. If the attribute label=”“ is present then could it suppress the label altogether?
As usual, Sir :)
But I will let you explicitly suppress the default label for each tag (_yes, _no, _score) because the combination <txp:cbe_helpful label="" />
already exists and because I can’t decide for you if you want to suppress for _yes and _no and _score, or _yes and _no or _score.
If any new idea comes, it is still time.
Offline
Re: cbe_helpful: Visitors can rate articles (based on wlk_helpful)
CeBe wrote:
But I will let you explicitly suppress the default label for each tag (_yes, _no, _score) because the combination
<txp:cbe_helpful label="" />
already exists and because I can’t decide for you if you want to suppress for _yes and _no and _score, or _yes and _no or _score.
Yep, that makes total sense to me! No other ideas at the moment – these normally come as I try to use plugins in different scenarios.
Many thanks for the help. It’s appreciated.
Offline
Re: cbe_helpful: Visitors can rate articles (based on wlk_helpful)
Sorry, my mistake: label will affect _total_votes too (instead of _score).
But for the sake of consistency I will add a label
attribute to _score.
Offline
Re: cbe_helpful: Visitors can rate articles (based on wlk_helpful)
Consistency is good! Looking forward to testing this!
Offline
Re: cbe_helpful: Visitors can rate articles (based on wlk_helpful)
Hi :-)
I want do show this Plugin only in a special section (cats) – on a single page.
That does not seem to be working. It works on the default section – single page, not in the section cats.
What can I do?!
Offline
Re: cbe_helpful: Visitors can rate articles (based on wlk_helpful)
Hello second question!?
my Code:
<txp:cbe_helpful wraptag="ul">
<p><txp:cbe_helpful_score /> Mensch(en) gefällt der Artikel!Dir auch?<br />
<txp:cbe_helpful_yes class="green" />
<txp:cbe_helpful_no class="red" />
</p>
</txp:cbe_helpful>
It works, but the html output is not valide, missing <li>
<ul class="helpfulrater"><li style="display:none;" class="thisid">2076</li><li style="display:none;" class="unit">simple</li>
<p><span><span title="">2</span></span> Mensch(en) gefällt der Artikel!Dir auch?<br>
<span class=" green">2</span>
<span class=" red">0</span>
</p>
</ul>
Can someone help me?
Offline