[TW5] storing e.g ★★★★★

126 views
Skip to first unread message

Mat

unread,
Jan 6, 2016, 11:18:04 AM1/6/16
to TiddlyWiki
Apropo Tobias' New Plugin: tobibeer/rate ★★★★★ I'm wondering if anybody has any way to store a visitors rating without needing your own server?

And specifically;  could e.g Tobias' plugin be used on a TiddlySpot site and let visitors rate things (and after have an average calculated)? Or possibly a Github hosted TW instead of TiddlySpot.

Just maybe there's some way to actually store the rating externally and also retrieve if rom there - e.g in my Google Drive or Dropbox?

Of course, if that would work it would probably not be limited to storing ratings, but I'm thinking that ratings is a very small amount of info so jus tmaybe there's some free service that offers this... somehow.... or is it just not possible...?

(...and if more than a measly star rate could be stored we could really open up for cool stuff with votings and comments and... But I'll settle for a measly star right now ;-)

<:-)


Tobias Beer

unread,
Jan 6, 2016, 2:54:20 PM1/6/16
to TiddlyWiki
Hi Mat,

Before I dive into the response, consider tobibeer/rate for you to rate things like movies or recipes in your own collections or to set flags, e.g. some progress.

Apropo Tobias' New Plugin: tobibeer/rate ★★★★★ I'm wondering if anybody has any way to store a visitors rating without needing your own server?

I'm afraid not. It would require at least some new action-widget capable to post some content to some server... which can later be talked to to retrieve votes.
Perhaps you know of such a service that can be plugged.

And specifically;  could e.g Tobias' plugin be used on a TiddlySpot site and let visitors rate things (and after have an average calculated)? Or possibly a Github hosted TW instead of TiddlySpot.

The hosting barely matters, unless github or tiddlyspot had some rating API to hook into... which neither have.

Just maybe there's some way to actually store the rating externally and also retrieve if rom there - e.g in my Google Drive or Dropbox?

Same problem: you'd need some sophisticated form to push the rating to google forms. I wouldn't know if you can simply display spreadsheet data on any site. I imagine you cannot.

Of course, if that would work it would probably not be limited to storing ratings, but I'm thinking that ratings is a very small amount of info so jus tmaybe there's some free service that offers this... somehow.... or is it just not possible...?

There is quite probably also that huge cross-domain issue where we can't talk to some other server in the context of TiddlySpot or GitHub just like that.
 
(...and if more than a measly star rate could be stored we could really open up for cool stuff with votings and comments and... But I'll settle for a measly star right now ;-)
 
I remember similar questions remaining unanswered when I created rating macros for TW2. In any case, the architecture of that will be quite something else than what tobibeer/rate does atm.

Best wishes,

Tobias.

Mat

unread,
Jan 7, 2016, 12:47:13 PM1/7/16
to tiddl...@googlegroups.com

Tobias Beer

unread,
Jan 8, 2016, 12:52:54 AM1/8/16
to tiddl...@googlegroups.com
Hi Mat,
 
I made some search attempts but realize I don't quite know what to search for. I stumbled over the term "middleware"... is that relevant? Other terms?

Perhaps you can devise some IFTTT where you have a form (e.g. via http://formspree.io) to send emails to your inbox and then have your emails be gobbled up or forwarded to some service in turn ...eventually fetching some aggregated results from who know where who knows how. Never fiddled with any of that.

Best wishes,

Tobias.

Mat

unread,
Jan 8, 2016, 4:41:09 AM1/8/16
to TiddlyWiki
Haha! At first I thought you were being ironic, ("what the heck does email have to do with this!?") - but, wow, using ones email to handle communication with a website is a brilliant and funny idea, at least in theory! It's a familiar service and everyone knows how to autoforward or autoreply.

But I realized something; The rating and starts would themselves not necessarily be linked to anything - they should just show up in a tiddler. So an alternative to get user ratings and show averages would be to embed a simple google form in a small iframe. This would mean it is not using your neat star rating solution :-(  and it would also mean it's not with pretty stars for voting, the closest I find is a row of radio button circles, but I think displaying the result should be fairly simple to get as stars ("if avg between x and y, then show image 1" etc). And the "processing", i.e calculating the average is trivial using google forms (since it is connected to a spreadsheet).
I'll look into the matter when I have a proper moment to set aside for it.

<:-)

Tobias Beer

unread,
Jan 8, 2016, 5:54:33 AM1/8/16
to TiddlyWiki
Hi Mat,
 
But I realized something; The rating and starts would themselves not necessarily be linked to anything - they should just show up in a tiddler. So an alternative to get user ratings and show averages would be to embed a simple google form in a small iframe. This would mean it is not using your neat star rating solution :-(

Indeed, that would be quite a different rating solution! ...where the ratings are actually not part of the wiki, unless you were to import them from some external service regularly... or be able to load them like you'd load twitter posts or disqus.

I guess what's required is some service (or chain of services):
  1. to which we can forward (structured) emails
  2. which can be taught to read data from those emails
  3. store the corresponding ratings (or other stuff like comments) to an adequate data store
    • should be one store per online wiki, each tiddler being an index
  4. retrieve ratings from the service
    • either retrieved as the entire list (possibly best for something as simple as ratings, on startup)
    • each rating individually (when displaying a tiddler ...more requests to the server)
  5. displayed in the view-template
If we could get something like this going then it would provide a great reference solution / scaffold for other solutions of this nature, e.g. polls. comments, etc...

and it would also mean it's not with pretty stars for voting, the closest I find is a row of radio button circles, but I think displaying the result should be fairly simple to get as stars ("if avg between x and y, then show image 1" etc).

Actually, we are free to design the form template used to send those emails any way we like! You can actually use tobibeer/rate to set the rating, and then read it in the form used to send via email. Of course, this rating would not be persisted (per user) unless we also saved it as a cookie.

Anyway, displaying server ratings (on top) would be quite a different task. Look at imdb... if you're logged in, you see your own rating of a movie. If not, you see the ratings of others. Well, you can see the overall rating in a star, e.g. {8.1}.

In any case, I don't think we should (or can) take it as far as displaying to a visitor who rated our tiddler from a given IP ...the rating they assigned (except for the lifetime of a cookie, bah). What's more, an IP address is not a reliable indicator of an actual user... and with TiddlyWiki we do not have authenticated visitors, e.g. via oAuth or the likes... not that it's not possible... but the whole process would have to be thoroughly designed.

Personally, I would never allow anyone to interact with my site / wiki unless they did some basic authentication first, e.g. log in via google / facebook ...or any other authentication provider. But, these things turn out to be not exactly "Hello World" type projects. Something as basic as authentication may actually need quite a bit of code before you can be sure you know who's talking to you (in the context of your wiki) and who wants to participate via... email, ratings, polls, comments... and to make all that terrifically difficult, it would all rely on relaying emails to a service or services that...
  • know what to do with those emails
  • can be talked to so as to respond with whatever we instructed the service(s) to do with those data
And the "processing", i.e calculating the average is trivial using google forms (since it is connected to a spreadsheet).
I'll look into the matter when I have a proper moment to set aside for it.

Well, in any case, good luck!

Best wishes,

Tobias.
Reply all
Reply to author
Forward
0 new messages