Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2012-01-06 11:31:08

milosevic
Member
From: Madrid, Spain
Registered: 2005-09-19
Posts: 390

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

Great! I’ll vive It a try as son as possible. Thank You very much.

Last edited by milosevic (2012-01-06 11:31:40)


<txp:rocks/>

Offline

#14 2012-01-12 05:36:31

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

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

Form
<div class="teksts"> <div class="nav-vh"><h3><txp:permlink><txp:title /></txp:permlink></h3></div> <txp:rah_external_output name="vote"/> <p><txp:body /></p> </div>

ListForm
<txp:cbe_helpful_list limit="10"> <txp:permlink><txp:title /></txp:permlink> [<txp:cbe_helpful_score />] </txp:cbe_helpful_list>

Vote(rah_external_output):
<txp:cbe_helpful labeltag="h5"> <txp:cbe_helpful_yes /> <txp:cbe_helpful_no /> </txp:cbe_helpful>

Now it Just dont work! When I press button Vote then adds +1, from 0 article gets 1 point, after page refresh again there is 0 points, they Just dont add! :(

Last edited by elwins (2012-01-12 05:40:29)

Offline

#15 2012-01-12 07:46:48

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, sorry, I can’t see what’s wrong. I’ve just tried, it works.

What version of jquery do you use ? Mine is 1.6.1
Could also be a database issue: can you access your database and see tables named cbe_helpful_* ?

Offline

#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

Board footer

Powered by FluxBB