Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2012-01-12 11:23:25

elwins
Member
From: Latvia
Registered: 2011-08-29
Posts: 80

Re: cbe_helpful: Visitors can rate articles (based on wlk_helpful)

1.6.1 On one Web all working fine, but on other dont, I dont work whats wrong too, yes I can.

cbe_helpful_counts I think that there should add votes, but its empty..

I have tables:
cbe_helpful_counts
cbe_helpful_prefs
cbe_helpful_votes
rah_external_output
soo_multidoc
textpattern
txp_category
txp_css
txp_discuss
txp_discuss_ipban
txp_discuss_nonce
txp_file
txp_form
txp_hak_tinymce
txp_image
txp_lang
txp_link
txp_log
txp_page
txp_plugin
txp_prefs
txp_ratings
txp_section
txp_users

Last edited by elwins (2012-01-12 11:24:37)

Offline

#17 2012-01-12 14:32:52

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

Re: cbe_helpful: Visitors can rate articles (based on wlk_helpful)

Tables cbe_helpful_counts and cbe_helpful_votes should be both populated by the snippet called cbe_helpful_ajax. You will find it in rah_external_output. Is it there ?

Offline

#18 2012-01-12 15:35:32

elwins
Member
From: Latvia
Registered: 2011-08-29
Posts: 80

Re: cbe_helpful: Visitors can rate articles (based on wlk_helpful)

Picture1

Picture2

Picture3

Yes, i have them.

Last edited by elwins (2012-01-12 16:02:47)

Offline

#19 2012-01-12 16:08:36

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

Re: cbe_helpful: Visitors can rate articles (based on wlk_helpful)

Scratching my head, wondering if your database has a problem.
What happens if you set production status to ‘debug’ ?

Offline

#20 2012-01-12 16:12:53

elwins
Member
From: Latvia
Registered: 2011-08-29
Posts: 80

Re: cbe_helpful: Visitors can rate articles (based on wlk_helpful)

nothing, all looks okay.

hmm, he adds point, but after refresh it disappears, and dont add to database.

My plugins:

Picture

Last edited by elwins (2012-01-12 16:15:06)

Offline

#21 2012-01-13 09:21:10

elwins
Member
From: Latvia
Registered: 2011-08-29
Posts: 80

Re: cbe_helpful: Visitors can rate articles (based on wlk_helpful)

Now all okey, someting was wrong, but I fixed it. Now I wanted to Ask, how to get YES button to right side.
Example:

Yes 0 No 0

I need to 0 Yes 0 No

Last edited by elwins (2012-01-13 09:21:52)

Offline

#22 2012-01-13 09:55:09

MrPS
Member
Registered: 2011-11-09
Posts: 34

Re: cbe_helpful: Visitors can rate articles (based on wlk_helpful)

Hi CeBe.

Thank you for all your work on this script!

There is a small problem, when i use the following example code:

<txp:cbe_helpful labeltag="h2">
  <p><txp:cbe_helpful_score /> people found this article useful. Do you ?</p>
  <p>
  <txp:cbe_helpful_yes class="green" />
  <txp:cbe_helpful_no class="red" />
  </p>
</txp:cbe_helpful>

I can see, that it generates the following (just a snippet of the code):

<p>
<span class="plus green"><span class="thecount">0</span> <a title="Plus" class="helpfulplus" href="#"><span  class="distext" /></a></span>
<span class="minus red"><span class="thecount">0</span> <a title="Minus" class="helpfulminus" href="#"><span  class="distext" /></a></span>
</p>

The class=“distext” is in the closed part of the span tag, which doesn`t have a starting tag… unless i am missing something?

{Edited to add bc.. for better code display. -Uli}

Last edited by uli (2012-01-13 11:34:08)

Offline

#23 2012-01-13 16:39:16

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

Re: cbe_helpful: Visitors can rate articles (based on wlk_helpful)

elwins a écrit:

Now all okey, someting was wrong, but I fixed it. Now I wanted to Ask, how to get YES button to right side.

Glad it works now.

For your position problem, ask a designer as I’m just a coder :)
Seriously, it’s probably just a matter of CSS. Is there a designer around here to tell us ?

MrPS a écrit:

The class=“distext” is in the closed part of the span tag, which doesn`t have a starting tag… unless i am missing something?

Probably my fault. Thanks for pointing at it, I’ll have a look.

Seems like labels for voting are set to blank, your users won’t be able to vote :)
Go to Extensions > Article ratings and if you see nothing beside “Positive vote label” and “Negative vote label”, fill in the blanks. This should solve the problem(s).

Last edited by CeBe (2012-01-13 16:51:25)

Offline

#24 2012-01-14 07:52:32

MrPS
Member
Registered: 2011-11-09
Posts: 34

Re: cbe_helpful: Visitors can rate articles (based on wlk_helpful)

Your right. The “vote labels” were empty. But people could vote, since i used css sprites, instead of text. I found a solution to the “problem”.

Thank you again, for all your hard work.

Last edited by MrPS (2012-01-14 07:52:59)

Offline

#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: 859
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

Board footer

Powered by FluxBB