Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2012-01-14 08:28:54

CeBe
Plugin Author
From: Caen - Fr
Registered: 2010-06-25
Posts: 345
Website

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

#27 2012-01-14 13:31:05

CeBe
Plugin Author
From: Caen - Fr
Registered: 2010-06-25
Posts: 345
Website

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:

So good ! Thank you very very much.
This is an example which probably will give ideas or answers :)

You`re welcome :). Yes hopefully it will.

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

#30 2012-02-09 22:39:27

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 858
Website

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,238

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

#32 2012-02-10 06:29:54

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 858
Website

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

#33 2012-02-11 09:18:27

CeBe
Plugin Author
From: Caen - Fr
Registered: 2010-06-25
Posts: 345
Website

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

#34 2012-02-13 20:46:56

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 858
Website

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

#35 2012-02-14 15:46:47

wornout
Member
From: Italy
Registered: 2009-01-20
Posts: 256
Website

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

#36 2012-05-06 14:20:01

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,136
Website

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

Board footer

Powered by FluxBB