Today I release a minefield version of https://github.com/jenstornell/kirby-nja .
All data is stored on your domain, not an external service.
Spam protection using IP numbers.
Undo likes/dislikes possible.
Lightbox and jQuery free.
I see this as a lightweight alternative to Kirby Ratings .
13 Likes
Thanks for all the likes people!
I just released version 0.2: https://github.com/jenstornell/kirby-nja#changelog Most of the changes are under the hood but it looks a little bit different visually as well:
I tested it yesterday on another domain and it worked fine so I’ve removed the minfield stamp and it’s currenty in beta.
Sorry about the bump but version 0.3 is already out. The most visible change is probably the like/dislike ajax callback: https://github.com/jenstornell/kirby-nja#javascript
Looks nice! Whats the basic to install it, so i just put the snippet in my template and add the js and css?
I think it’s quite simple with basic knowledge, but yes; snippet, javascript and css are required.
1 Like
Thank you very much! Seems to work on my project. You can i customize the button or put the function on my own button? I
i Notized that value isn´t really stored, i made the like field in my blueprint.
Something else i have to setup?
So when i refresh the page there is no count
Yes. You can use your own css instead of mine. Just don’t include the plugin css file and copy the css to your css file instead.
About the blueprint. Is your problem only in the panel? You see the like on the frontend? Even after a page refresh?
the value is missed in the frontend and backend
This my snipped in the template:
<?php snippet('nja') ?>
and my blueprint:
likes:
label: Likes
type: text
width: 1/2
to make it more clear. So when i click i see a like, but after refreshing the page its gone
Then it’s something with the ajax or PHP. Can you press F12 and click the console tab and see if there are any errors there?
Sorry was wrong. I get this Error:
GET http://localhost:8888/tca/winners/nja/1/nominees/factom 404 (Not Found)
e.ajax @ script.min.js:1
e.action @ script.min.js:1
Then something is wrong with the route in this page:
http://localhost:8888/tca/winners/nja/1/nominees/factom
nominees/factom
exists in you page structure?
My best guess is that your port 8888 gets you in trouble because I have not tried this plugin with a localhost port. But it’s just a guess.
Let me know if you figure something out and I’ll let you know if I find something that could possibly solve this.
No, the route pattern is nja/(:any)/(:all)
where (:any)
is the vote, 1
in this case and (:all)
is your page id which should be nominees/factom
in your case.
texnixe
February 16, 2017, 10:25am
15
@jenstornell : I just tried to install the plugin via the CLI, but get a Runtime Exception: Invalid Kirby plugin type.
I could never got CLI to work with XAMPP, so I could not test it. I still added a package.json for it. Do you have any idea what is wrong?
{
"name": "kirby-nja",
"version": "0.7",
"description": "Likes and dislikes without an external service for Kirby CMS",
"license": "MIT",
"type": "kirby-plugin"
}
texnixe
February 16, 2017, 10:34am
17
Not sure, but probably the trailing comma?
what does it mean for me? Do i have to change something?
Please keep in mind that iam just a designer
@texnixe I run it through a json validator and yes, the comma is not allowed there. I have removed it now so hopefully it will work now?
@SandroIeva No, it will make no difference for you. You already installed it correctly from what I’ve read in your comments above.
texnixe
February 16, 2017, 10:44am
20
Yes, perfect! (some more chars)
1 Like