Textpattern CMS support forum

You are not logged in. Register | Login | Help

#31 2012-02-09 23:18:33

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

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

tye, try putting csb_if_newer_than in a cbe_helpful form.


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

Offline

#32 2012-02-10 06:29:54

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 858
Website

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

Thanks uli – another one I’ve missed :)

this looks promising, I’ll test it out :)

Offline

#33 2012-02-11 09:18:27

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 folks :)

tye a écrit:

I am thinking of using it on another project which would list articles based on time

Sounds like a good idea, which can be done quite easily. The point is that I have to deal with the children who are on holidays for the next two weeks (sorry to tell you about my life).

Offline

#34 2012-02-13 20:46:56

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 858
Website

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

Thats great to hear Claire…. Kids, mine have just gone back after 6 weeks – hard work :)

Offline

#35 2012-02-14 15:46:47

wornout
Member
From: Italy
Registered: 2009-01-20
Posts: 256
Website

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

Hi,
why all votes are stored twice?

Edit: Solved

Last edited by wornout (2012-02-14 16:04:41)

Offline

#36 2012-05-06 14:20:01

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 3,426
Website

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

I’ve had the problems others have described above with the the vote being cast within the page but not showing up when you revisit the page. When I check the db, the vote is recorded but the textpattern_id is not recorded with it, hence the next time you call up the page, it shows 0 again.

Not sure if this helps in tracking down the errors: I found this problem occurs when you use cbe_helpful inside an li list. The code added by the plugin gets inserted after the li that contains the cbe_helpful tag rather than inside it. My guess is the javascript then can’t find the thisid class. Wrapping the cbe_helpful tag inside an additional div inside the li doesn’t help either, but removing the cbe_helpful tag from the li list altogether and relocating it to a div container of its own restores functionality.


TXP Builders – finely-crafted code, design and txp

Offline

#37 2012-05-06 14:35:58

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 3,426
Website

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

A couple of other minor edge-case suggestions:

  • Jukka has a newer version of rah_external_output in the works on his github page that uses forms and does away with the own table and admin pane. That necessitates a small change to your safe_upsert to cbe_helpful_enabled in the creation of two forms.
  • Could your admin restore function also check whether the cbe_helpful_votes and cbe_helpful_count tables exist, and create these too if they do not exist (likewise the rah_eo forms/table entries)? When using the plugin from the /plugins directory, the tables aren’t created. Your restore function is helpful because it create the prefs tables but cbe_helpful_count and vote have to be created by hand or by executing the enabled function manually.
  • The cbe_helpful_deleted function deletes the count and votes tables, but it is conceivable that the site_owner might want to retain these, particularly as if inadvertently deleted these details are irretrievable. Perhaps the function could ask before deleting these, or alternatively be split into two, one part to “reset/delete the votes and counts” and one to delete the remainder.

TXP Builders – finely-crafted code, design and txp

Offline

#38 2012-05-06 15:45:05

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

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

Ok. Today’s atmosphere : rainy sunday afternoon.
Noted down for next week, and further :

  • list articles based on time
  • study above suggestions

Offline

#39 2012-05-06 19:55:04

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

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

Here goes my suggestion then :-D

A new tag for display the TOTAL number of votes for an article (positive and negative summatory).

Why? because it is a data commonly used in hreview agregate microformat, and other semantic markup systems like schema.org for agregating reviews. Very, very interesting for SEO.


<txp:rocks/>

Offline

#40 2012-05-30 06:46:33

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

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

You have been heard !

New tag : <txp:cbe_helpful_total_votes /> to display the total number of votes.

New attribute : <txp:cbe_helpful_list period="{ {this | last} {year | month | week | day } | today | yesterday }" /> to restrict list on a given period of time. Leave period to get overall time list (i.e. no time restriction).

Note : if you use any tag (such as <txp:cbe_helpful_score /> or <txp:cbe_helpful_total_votes />) inside <txp:cbe_helpful_list period="some_period />, restriction time will apply.

Also corrected a miscalculation that nobody seems to have noticed.

And finally, as recently seen on twitter :

https://twitter.com/brionec/status/206331898673373184

Offline

Board footer

Powered by FluxBB