Textpattern CMS support forum

You are not logged in. Register | Login | Help

#61 2013-04-29 10:16:41

douglgm
Member
From: Bristol
Registered: 2006-08-23
Posts: 182
Website

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

Hi Claire, just wondered if you’d had a chance to look at implementing the the things we’d discussed?

Offline

#62 2013-04-29 10:36:23

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

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

douglgm a écrit:

Hi Claire, just wondered if you’d had a chance to look at implementing the the things we’d discussed?

Wow…
And:
Ooooops…

Something got lost in the mist of time.
I start right now.

Offline

#63 2013-04-29 11:36:22

douglgm
Member
From: Bristol
Registered: 2006-08-23
Posts: 182
Website

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

haha! And here I was thinking that you must be busy and not wanting to nag!

Offline

#64 2013-04-30 14:09:15

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

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

30 Apr 13 – v0.6

(fingers crossed)

Full help can be read here
Download – uncompressed
Download – gzipped

Last edited by CeBe (2013-04-30 14:10:04)

Offline

#65 2013-05-01 10:05:02

douglgm
Member
From: Bristol
Registered: 2006-08-23
Posts: 182
Website

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

Fantastic. Looking forward to trying this out today! Thanks Claire! Will let you know how I get on!

Offline

#66 2013-05-02 15:41:37

douglgm
Member
From: Bristol
Registered: 2006-08-23
Posts: 182
Website

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

Hi Claire.

I’m bumping into a bit of frustration trying to style the vote link as a button:

In order to get the button to disappear, I have to apply the “distext” class to the <a> anchor tag (otherwise only the button text disappears)

I want my buttons to appear in a different place to the vote number but using cbe_helpful_no renders the number. Could this be suppressed?

I’m wondering if it’s worth having separate tags to display the vote link to the #votes.

Is it possible to have a “Thank you for your vote” message displayed when you click on the vote link?

Liking the ability to show the votes in the article list!

Offline

#67 2013-05-02 19:54:53

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

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

I’m afraid we didn’t understand each other :/
A thing is certain: yes, the number must be in a separate tag in order to be updated after a vote.
Another one: displaying the link and the number in different places is not possible.
This is because of how the plugin is made…

Right now

Here is what I understand :

You want, just after the vote
  • completely suppress the link and its container
  • a “Thank you” message

If I am right, and in your case only (or for others who want exactly the same – please tell), make a backup of rah_eo_cbe_helpful_js and replace its content with

; Content-type: text/javascript
$(document).ready(function(){function a(a,b){var c=a.parents(".helpfulrater");var d=a.parent(".plus").children(".thecount");var e=a.parent(".minus").children(".thecount");var f=c.find(".hlp_votes");unit=c.children(".unit").html();article_id=c.children(".thisid").html();pluses=d.html();minuses=e.html();votes=f.html();$.post("http://txplugs/?rah_external_output=cbe_helpful_ajax",{article_id:article_id,up_down:b,unit:unit},function(g){d.html(parseInt(pluses)+g.plus);e.html(parseInt(minuses)+g.minus);c.find(".value").html(g.score);f.html(parseInt(votes)+1);$(".helpfulrater").find(".helpfulminus").remove();$(".helpfulrater").find(".helpfulplus").remove();$(".helpfulrater").after("<span>Thank you for your vote</span>")},"json")}$(".helpfulplus").click(function(){a($(this),"up");return false});$(".helpfulminus").click(function(){a($(this),"down");return false})})
You can replace $(".helpfulrater").after("<span>Thank you for your vote</span>") (near the end) with
  • $(".helpfulrater").before("<p>Thank you for your vote</p>") if you want your message to appear before the vote widget, and in paragraph instead of a span
  • $(".helpfulrater").append("<div>Thank you for your vote</div>") if you want your message to appear inside (and the end of) the vote widget, and in a div

Looking further

The voting mechanism is exactly as it was in wlk_helpful (there was, in my opinion, other and more important problems to solve). It should probably be redesigned now. This cannot be done in minutes, I don’t know how much time it will take and I have to study the question (ie break, cogitate and rebuild).

It’s not for today, not even tomorrow, but it is probably a good opportunity to explain in details what you (and others, maybe) want, if possible with visual examples and images.
You know, frenchies are not good in foreign languages :)

Last edited by CeBe (2013-05-03 06:39:38)

Offline

#68 2013-05-02 21:50:27

douglgm
Member
From: Bristol
Registered: 2006-08-23
Posts: 182
Website

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

Thanks Claire, really appreciated!

I’ll have a play. (and see if I can put some use-case examples together for you!)

Offline

#69 2013-07-11 13:34:05

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

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

Hi.

I am trying to make a website using ied_if_domain, where I have one database for several subdomains. The cbe_helpful plugin works. The votes are
stored in the database.

Now here is the problem. When I cast the vote on one of the subdomains, it doesn`t show up automatically – I have to refresh the page first, before I can see, that I have voted.

Is there a way to solve this problem?

Offline

#70 2013-07-11 18:01:24

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

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

MrPS a écrit:

When I cast the vote on one of the subdomains, it doesn`t show up automatically

Just a quick idea: the plugin probably doesn’t find its way to AJAX.

In the HTML source code, before </body> you should have a line like this (generated by function _cbe_helpful_foot):

<script type="text/javascript" src="http://yourdomain.tld/?rah_external_output=cbe_helpful_js"></script>

and somewhere inside form rah_eo_cbe_helpful_js:

$.post("http://yourdomain.tld/?rah_external_output=cbe_helpful_ajax", [...]

I suspect – but am not sure, and I don’t know how ied_if_domain works – that http://yourdomain.tld (or http://sub.domain.tld) is not the right way for you.

Does it helps at least a little ?

Offline

Board footer

Powered by FluxBB