Talk is cheap, show me the code
Hey, what is Sunday without any hacking? ^^. I stumbled upon FashionSnap few days ago. Got the link from pingmag.jp when they are interviewing some street photgrapher. I really think the site is nice. It feels somewhat realistic to see fashion from real street instead of catwalk. What thing missing from fashionsnap is interactivity. There’s already an acution section which seem to interactive but that’s not my focus. I was astonished by the snap_page section where photos gathered every week. I think it’ll be fun to add a rating system into the page.
After a few second, I came up with an un-obstrusive AJAX rating system found via google. The script looks simple and compact, really fits my need which only concern with rating_subject_id and nothing more. I adjusted the script a bit, md5-ing the id and replace the default XHR with one suggested (AdvAjax) by a visitor in the ajax-rating site.
What’s a rating without any comment? Oh fcuk, here we go. for comment feature I had to make another table. And then adding some SQL query within the original script to implement the comment feature.
Uh oh, I use greasemonkey instead of creating a brand new mashup. Creating a mashup would be nice, but I can prefectly calculate taht it’ll take some more time. It’ll definitely render me bored during the way. So that’s it. Greasemonkey was the perfect solution for my rapid prototyping.
Final result can be seen within the screenshot. Greasemonkey script can be installed from this page. There’s still an issue with iframe auto-resize. I don’t have any iframe auto-resize algorithm, yet. So, any help will be appreciated ^^. Comments are encouraged.
PS:
Since this rating script use id only, basically it can be used to rate anything that has an id.
This section gives me most headache. But experience told me that this blog mostly contains personal ramblings related to daily life, open source, and web 2.0. Recently, it turns out to be an idea-box where you can found ideas you can execute in your new startup ;). My ideas and opinions are not bullet proof and never intended to be one way stream. Kindly participate to improve your and my perspective regarding any particular post. Welcome aboard and enjoy your stay
Leave a reply