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)
MrPS a écrit:
But people could vote, since i used css sprites, instead of text. I found a solution to the “problem”.
This is interesting. What’s the technique, if you don’t mind sharing it ?
Offline
#26 2012-01-14 13:01:13
- MrPS
- Member
- Registered: 2011-11-09
- Posts: 34
Re: cbe_helpful: Visitors can rate articles (based on wlk_helpful)
CeBe wrote:
MrPS a écrit:
But people could vote, since i used css sprites, instead of text. I found a solution to the “problem”.
This is interesting. What’s the technique, if you don’t mind sharing it ?
Hmm well okay, but it is NOT fully testet, and it is NOT perfect and pretty, and it probably only works, if the rater is set to “simpel”.
under “Extensions > Article ratings” i put the following, in the “Positive vote label” box: <b class=“vote_label”>Plus</b> and the “Negative vote label” box: <b class=“vote_label”>Minus</b>
I left the “Widget label” blank.
Here is the code for the article:
<txp:cbe_helpful>
<p><strong>Vote for this page</strong> (The users have given this page <strong><txp:cbe_helpful_score /></strong> points.)</p>
<p class="rating">Positive points:</p><txp:cbe_helpful_yes wraptag="span" class="number" />
<p class="rating">Negative points:</p><txp:cbe_helpful_no wraptag="span" class="number" />
</txp:cbe_helpful>
And here is the css:
a.helpfulplus span.distext, a.helpfulminus span.distext {background-position:0px 0px;margin-top:3px;margin-left:10px;}
a:hover.helpfulplus span.distext, a:hover.helpfulminus span.distext {background-position:0px -12px;}
a.helpfulplus span.distext, a.helpfulminus span.distext {float:left;display:block;width:12px;height:12px;background:url(images/picture.gif) 0 0;cursor:pointer;}
p.rating, span.distext, span.thecount, span.number{float:left;margin: 0;}
p.rating{padding-right:3px;} span.number{font-weight:bold;padding-right:30px;} span.distext, .vote_label{display: none;}
Offline
Re: cbe_helpful: Visitors can rate articles (based on wlk_helpful)
So good ! Thank you very very much.
This is an example which probably will give ideas or answers :)
Offline
#28 2012-01-14 13:47:23
- MrPS
- Member
- Registered: 2011-11-09
- Posts: 34
Re: cbe_helpful: Visitors can rate articles (based on wlk_helpful)
CeBe wrote:
You`re welcome :). Yes hopefully it will.So good ! Thank you very very much.
This is an example which probably will give ideas or answers :)
Offline
#29 2012-01-14 15:26:22
- elwins
- Member
- From: Latvia
- Registered: 2011-08-29
- Posts: 80
Re: cbe_helpful: Visitors can rate articles (based on wlk_helpful)
daam, now dont work again, now Points adds to database, but Users can vote how much they want and vote points dont shows in TOP and on Vote button. After form edit all refreshes…’://
Offline
Re: cbe_helpful: Visitors can rate articles (based on wlk_helpful)
Hi Claire, ça va?
I am using this plugin on one site – and its working great – thanks
I am thinking of using it on another project which would list articles based on time – eg:
All Time Most Helpful
<txp:cbe_helpful_list limit="10" time="*" />
Most Helpful This week
<txp:cbe_helpful_list limit="10" time="-7" />
Most helpful this month
<txp:cbe_helpful_list limit="10" time="-30" />
Would that be beyond the scope of this plugin?
Offline
#31 2012-02-09 23:18:33
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: cbe_helpful: Visitors can rate articles (based on wlk_helpful)
tye, try putting csb_if_newer_than in a cbe_helpful form.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: cbe_helpful: Visitors can rate articles (based on wlk_helpful)
Thanks uli – another one I’ve missed :)
this looks promising, I’ll test it out :)
Offline
Re: cbe_helpful: Visitors can rate articles (based on wlk_helpful)
Hi folks :)
tye a écrit:
I am thinking of using it on another project which would list articles based on time
Sounds like a good idea, which can be done quite easily. The point is that I have to deal with the children who are on holidays for the next two weeks (sorry to tell you about my life).
Offline
Re: cbe_helpful: Visitors can rate articles (based on wlk_helpful)
Thats great to hear Claire…. Kids, mine have just gone back after 6 weeks – hard work :)
Offline
Re: cbe_helpful: Visitors can rate articles (based on wlk_helpful)
Hi,
why all votes are stored twice?
Edit: Solved
Last edited by wornout (2012-02-14 16:04:41)
Offline
Re: cbe_helpful: Visitors can rate articles (based on wlk_helpful)
I’ve had the problems others have described above with the the vote being cast within the page but not showing up when you revisit the page. When I check the db, the vote is recorded but the textpattern_id is not recorded with it, hence the next time you call up the page, it shows 0 again.
Not sure if this helps in tracking down the errors: I found this problem occurs when you use cbe_helpful inside an li
list. The code added by the plugin gets inserted after the li that contains the cbe_helpful tag rather than inside it. My guess is the javascript then can’t find the thisid
class. Wrapping the cbe_helpful tag inside an additional div
inside the li
doesn’t help either, but removing the cbe_helpful tag from the li
list altogether and relocating it to a div container of its own restores functionality.
TXP Builders – finely-crafted code, design and txp
Offline