Ever since I had it in my mind-even though I could not think of any immediate benefit for my Social Search Site SansJ-I couldn’t make myself to code something that had a more practical value for my site.After about a week of experimenting (I am very average, but, lazy coder) finally managed to create a slider that is kind of Mac OSX’s Summarize feature (definitely not that good).
The reason for creating it goes this way:Due to the very nature of a Social Search, the relevancy of a result for a particular search query is usually proportional to the number of people who have searched for something similar and voted for a result.In other words if more people start using it, the better the results. Unfortunately, SansJ, has not reached a stage where the people power/wisdom is enough to return top quality search results. So, I had to come up with a solution that would not embarrass me. So if I searched for deleting rows in mysql based on date, I know that I can move the Slider to the left to see the most relevant result and ignore the rest. In other words, I see what I want to see (which also happens to be the most relevant).So until SansJ receives the attention it deserves, I will be happy to devise these tools.
Now to how I implemented it. It was a complete hack! I wouldn’t say this is the most elegant solution, but it works (in Firefox, Safari and Opera(mostly) on my MacOSX, I have a feeling it will break in IE ;)) and that is pretty true with all my coding work, I take a problem-to-solution approach with great emphasis on practicality than elegance (why Classes? I ponder!). I used the script.aculo.us library with help from these articles :
For fear of being exposed as a very sloppy programmer (than for any other reason), I am not displaying the source code (‘view source’ is one of the greatest features in any browser).So check out the feature here: http://sansj.com/mysearch3.php and search for say ajax tutorials , php based ip logging and so forth. Happy Sliding.