Closed ChilliByte closed 8 years ago
@isaacrg
I'm going to lean towards shelving this one. We really need a server side implementation for this to work, and it will either be abused or look weird when not used
I agree with the whole "Server side, fuck off"
But I feel a way of allowing users to interact with posts in some form is necessary
@benjimarshall Server-side doesn't mean immediate shelving, plus I have an idea. I'll post here in a moment...
So - stars are a nice idea, but we need to run servers of some kind or shamelessly exploit formspree somehow. I'm interested in both out of curiosity, but this might be little used — we can always trial it.
To measure social media impact, listnr is an experiment - I am currently testing it on the site, to see what results come of it.
Measure mentions at: https://vrypan-webmentions.appspot.com/api/mentions?domain=backchat.kefw.org
Also, we ought to keep an eye on Google analytics - an undeniably useful tool for understanding our audience.
how does it work, @isaacrg
Look at the bottom of https://blog.vrypan.net/2016/03/31/simple-encrypted-chat-with-keybase-fs/
it just goes completely over my head, i'll leave you to it
i was thinking more along the lines of redis
Hmm, that might make sense. We could just leave stars by the wayside until we have an idea of our viewership.
On Sat, 30 Apr 2016, 09:33 Deep Sohelia, notifications@github.com wrote:
it just goes completely over my head, i'll leave you to it
i was thinking more along the lines of redis
— You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub https://github.com/Kefwmag/kefwmag.github.io/issues/59#issuecomment-215946708
I have a method that will work.
I have set up an always on PHP server using 000webhost.
I have a "Stars.php" script running:
<?php
$filename = $_GET['filename']; // incoming message
if(file_exists($filename)) {
$filedata = intval(file_get_contents($filename));
} else {
$filedata = 0;
}
$starcount = $filedata + 1;
file_put_contents($filename,$starcount+"")
?>
<h1>Close Me.</h1>
`
All you do to increment the stars is open:
http://backchatserver.netai.net/star.php?filename=ARTICLE NAME HERE
All you need to do to read the number of starts is go to http://backchatserver.netai.net/ARTICLE NAME HERE
then all you need is cookies storing which articles have had their stars clicked from that pc
ok theres a little issue with the Same-Origin Policy but I've got a workaround.
re-written to avoid opening windows - though now you need adblock off
okay while this is very cool i feel this solution will either look shit or be too bodged to be scalable. Unless @isaacrg has a nice, non dodgy solution I'm going to delete my demos and close this issue on monday at some point.
I love the ease of use and appearance of this, but safe code & a trusted host would be needed for the longer term. I can happily help improve things, though we will need to look at feature usage...
On Sat, 30 Apr 2016 17:29 Deep Sohelia, notifications@github.com wrote:
okay while this is very cool i feel this solution will either look shit or be too bodged to be scalable. Unless @isaacrg https://github.com/isaacrg has a nice, non dodgy solution I'm going to delete my demos and close this issue on monday at some point.
— You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub https://github.com/Kefwmag/kefwmag.github.io/issues/59#issuecomment-215977048
files will be moved to /temp/stars in case @isaacrg needs them
The posts are much more popular on facebook than I thought they would be, and it feels like some form of "starring" system is necessary
Obviously given this is a static site this is a "could" rather than a "should" do hippo
If implemented, all it would need to do is count how many times that button has been clicked (one per pc) (yes this can be abused, no it probably wont, yes thats a bad way of thinking when it comes to security), and display it.
This does not need to be filterable or sortable.
As for how this could be implemented - a simple drop in javascript api doohickey would be the way to go, it might be easily do-able, it might be hell involving databases. This is why this issue is here.
How I'd implement it: Client side cookies storing which posts have been starred from that pc Backend JS storing number of stars per post