|
Involver Developer Network : 11-2011 Introducing Template Sharing, leaderboards, rating, sml.web
This page last changed on Jun 14, 2012 by jed.wheeler@involver.com.
Documentation Changes
Platform Changes Our development time in October-November was spent primarily on bugfixes, under-the-hood improvements to the SML platform, and our ongoing rebuild of AMP. In November, however, we've been able to add several exciting new pieces of functionality. - The ?sml.web function that will allow you to integrate your SML tabs more cleanly with a remote API and bring in code from anywhere on the open web to your SML tab. This method enables a wide range of functionality that was previously impossible. As an example, you can use it to set a ?signup_form feature block (for instance) to post submissions to a third party server. - We've replaced the editor in our SML editor window. The new one provides contextual highlighting for Javascript, HTML, and CSS, in addition to SML. - SML Template Sharing is a new system that allows you to build a template once and then push it to multiple other pages. Admins of those pages will not have access to the code but will be able to customize the assets and configuration for the various feature blocks. Changes to the code of the master page will be automatically pushed to the child pages so they all stay in synch. This tool is ideal for large brands that are managing multiple related pages and tabs. A use case example is a brand that has 50 tabs in 50 languages and wants them all to look the same but with localized content or a franchise that wants to allow individual store owners to customize their pages but maintain a consistent style. - rate allows for the user to rate a content item on a 5-star scale. A user's rating is only recorded once and any changes to his or her rating will overwrite the old rating. Because of the relatively large amount of data we need to push to create the rating system functionality (it requires over-writable values that allows us to track who has rated each item, what value each user gave each item, and also generate and update an average rating with each entry) this functionality cannot be used with more then 300 items at any given time. This restriction means we cannot enable rating as a sorting criteria on the ?paginate helper block since there's no way to restrict the total number of items paginate sorts. Instead, we've introduced a new attribute on the ?for loop called "leaderboard," described below. - friends_who_rated allows you to output a list of faces of a users friends who have rated something. - sort_by attribute for the for loop used to sort the most recent 300 or fewer items in the array according to some arbitrary attribute (such as rating). This can be used to easily create Leaderboards and powers our standalone app of that name. |
| Document generated by Confluence on Feb 12, 2013 09:09 |