Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

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

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: 5,202
Website GitHub

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

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

#85 2018-10-30 07:02:45

Hidalgo82
New Member
Registered: 2018-10-30
Posts: 1

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

Hi!
where i can change the function that does the INSERT into the table `cbe_helpful_votes`?
I have installed Nginx + Apache, and I would like to change the variable $_SERVER[‘REMOTE_ADDR’] to $_SERVER[‘HTTP_X_FORWARDED_FOR’].
I can not find it…

Offline

#86 2018-10-30 14:50:27

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,316

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

Welcome to the forum, Hidalgo82. I see it on line 349.

In case you’re new to Textpattern: Go to Administration > Plugins > Click cbe_helpful and search for $_SERVER[‘REMOTE_ADDR’] .

After you’ve done your edit, click save.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#87 2021-01-21 05:07:48

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

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

Is it possible to make the `+` and `-` not change to numbers? those (+ 5 -)
Just after clicking on `+` or `-` only the total score changed …

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

Last edited by alivato (2021-01-21 05:09:44)

Offline

Board footer

Powered by FluxBB