Textpattern CMS support forum

You are not logged in. Register | Login | Help

#71 2013-07-11 23:16:27

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

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

Hi Claire.

Yes it works, but is it possible to have it working on several subdomains?

Offline

#72 2013-07-12 15:28: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)

To be honest, I have not developed it for this purpose and I did not even thought of it.
So I guess in this context and from what you say, no, it does not work.
But: I have not yet tried ied_if_domain :)

Offline

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

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

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: 344
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: 31

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: 344
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: 344
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

Board footer

Powered by FluxBB