Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#73 2013-07-12 17:19:41

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

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

I looked at it again and got it to work.
Here is what I did (there might be someone else who needs it):

1. Simply put the content of the form `rah_eo_cbe_helpful_js` in a .js file
2. Change the url inside `rah_eo_cbe_helpful_js` and upload it to your domain / subdomain.
3. Put the following in your page: <script type=“text/javascript” src=“http://yourdomain.com/js/name_of_js_file.js”></script>

Do the same for your other domains / subdomains.

Thank you Claire for your help.

Offline

#74 2013-07-12 19:06:28

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

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

Glad you made it work, and thanks for the tip!

To finish the work: in the plugin source code, remove (or comment) the following

line 403

   static $ajax_module = false ;

lines 405-409

    if( ! $ajax_module )
    {
        ob_start( array( &$this, '_cbe_helpful_foot' ) ) ;
        $ajax_module = true ;
    }

line 482

        ob_start( array( &$this, '_cbe_helpful_foot' ) ) ;

Offline

#75 2013-07-12 21:55:22

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

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

Super – thanks again

Offline

#76 2015-06-23 13:28:06

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

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

Hi Claire,
I’m not using cbe_helpful already, but I wondered why did you put labels in the plugin prefs? Why not a default label with an overriding attribute label="". I would like to be able to include it in a theme and display an icon for the label to fit any language (or use a txp:text tag which would allow translations via textpacks).

Last edited by NicolasGraph (2015-06-23 13:28:26)


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#77 2015-06-23 15:06: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)

Hi, Nicolas,

NicolasGraph wrote #291876:

why did you put labels in the plugin prefs?

Rrrmmhh… why not ? :D

Why not a default label with an overriding attribute label="".

Let’s say that prefs labels become default labels, and can be overridden (in txp:cbe_helpful and txp:cbe_helpful_list).

display an icon for the label to fit any language

Maybe display the icon first, then label="" ?

(or use a txp:text tag which would allow translations via textpacks).

Maybe label='<txp:text item="..." />' ?

Offline

#78 2015-06-23 15:30:14

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

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

CeBe wrote #291886:

Hi, Nicolas,

Rrrmmhh… why not ? :D

It is just unusual for me and I think that in another way you could avoid a dedicate prefs page but I’m not a dev.

Let’s say that prefs labels become default labels, and can be overridden (in txp:cbe_helpful and txp:cbe_helpful_list).

Thanks for your reply; I know the label attribute for txp:cbe_helpful and txp:cbe_helpful_list but I don’t figure how to easily use an icon instead of the <txp:cbe_helpful_yes /> label.

Edited for clarity

Edit#2: I also have this error with the plugin in use Tag error: <txp:cbe_helpful label=""> -> Warning: ob_start(): first array member is not a valid class name or object while parsing form default Should I use the fix above?

Last edited by NicolasGraph (2015-06-23 15:46:41)


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#79 2015-06-23 19:06:34

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

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

NicolasGraph wrote #291888:

I don’t figure how to easily use an icon instead of the <txp:cbe_helpful_yes /> label.

Probably a good starting point here

Should I use the fix above?

Yes!

Offline

#80 2015-06-23 19:23:15

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

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

CeBe wrote #291898:

Probably a good starting point here.

Ok, I’ll use css to hide the the labels if needed… I thought there could be a better way.


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#81 2015-09-25 18:48:08

alivato
Member
Registered: 2011-03-31
Posts: 151

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

Questions about plug cbe_helpful

<txp:cbe_helpful label="">
  <txp:cbe_helpful_yes class="green" /> / 
  <txp:cbe_helpful_no class="red" />
</txp:cbe_helpful>

Is it possible to do so:
Have a total sum in the middle and the two buttons around it.

Last edited by alivato (2015-09-25 18:48:47)

Offline

#82 2015-09-25 19:34:20

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

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

From memory, it requires some css hiding. Try adding the <txp:cbe_helpful_score /> (where necessary with class and wraptag) to the middle of your code, then examine the code output and hide the bits you don’t need from the other tags with css.

EDIT: See below: Claire explains it more lucidly…


TXP Builders – finely-crafted code, design and txp

Offline

#83 2015-09-25 19:54:55

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

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

Yes, it is!

Hah… maybe you’d like to know how :)
Here it is:

Preferences: Go to Extensions > Article ratings Set
  • “Rate label” to blank
  • “Positive vote label” to +
  • “Negative vote label” to -

Tags :

 <txp:cbe_helpful>
  <txp:cbe_helpful_yes />
  <txp:cbe_helpful_score />
  <txp:cbe_helpful_no />
 </txp:cbe_helpful>

css:

.helpfulrater .thecount {
  display: none;
}

Offline

#84 2015-09-26 08:31:04

alivato
Member
Registered: 2011-03-31
Posts: 151

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

1. After I voted. Instead of + – again displaying numbers

Before vote

After vote

CSS
.helpfulrater .thecount {
  display: none;
}

——————————

2. How to make after the vote + – were not removed, but simply become inactive css cursor: default; ?

——————————-

3. How to make to be able to vote either + or -. Now I can vote, + and – too. ?

Last edited by alivato (2015-09-26 09:08:41)

Offline

Board footer

Powered by FluxBB