I have recently talked about using Drag-and-Drop functionality with MySource Matrix. The idea behind this method was to use the "Array of specific asset IDs" option in the "Dynamic Parameters" of an asset listing. The coma separated list of IDs can be stored in a text metadata field.
With the addition of Asset Finder in Easy Edit Suite 2, one of my colleagues Suren has implemented a plugin which uses Asset Finder to populate a text field with a coma separated list of related asset IDs.
I have now had a chance to develop this plugin further and here is what it looks like now:
Twitter is the Napster, Kazaaa or Bittorrent for news. You still network with other people but the purpose of it is not networking in itself but sharing news. So, I decided to add a Tweet button on my blog powered by MySource Matrix (Squiz Matrix) to make it easier for myself and my visitors to share on Twitter. About time...
To generate a tweet button, you will need to go to Twitter Goodies page.
I will take you through the steps I took on the Goodies page and at the end of the article you will have a good idea of how to create your W3C compliant "tweet" button:
1. On the "Button" tab select "Horizontal Count".
2. On the "Tweet text" tab select second option and type "Custom Text"
3. On the "URL" tab select second option and type "http://www.domain.com"
2. In the "Recommend people to follow (optional)" section type in your Twitter username. I used "palitsyn" obviously.
You should now see an example of your button and the code for it at the bottom of the page. The code should be:
I have highlighted 4 tags "data-url", "data-text", "data-count" and "data-via" that will fail to validate on W3C HTML Validation Service. I personally hate to see the results page in red.
Fortunately, there is a workaround. We can pass all the parameters via a query string. Please note, that URL of the link you are sharing needs to be URL encoded and "http://www.domain.com" therefore becomes "http%3A%2F%2Fwww.domain.com". Once you do that our example should look like this:
You may have noticed that I added rel="nofollow" into the link. This is for SEO reasons only as Google might not like this kind of link. I would recommend you to add this too.
OK, Great! We now have a Tweet Button that will validate on W3C HTML Validation Service.
Obviously we want the button to be dynamic in our CMS and in this example I will show you what needs to be done to make it work on Matrix. If you are using a different CMS refer to a manual and make sure that the dynamic URL in the query string is URL encoded.
There are only 2 things that we need to make dynamic and they are url and text. For the text we can use %asset_name% and for url we can use %asset_url%. To make the URL URL encoded, we need to use a keyword modifier - %asset_url^urlencode%. This is what you should get:
That's it! We have a working and W3C compliant Tweet Button. Replace "palitsyn" in the last piece of code with your username, paste it into your paint layout, asset listing or just content and you are ready to go.
With so many WYSIWYGs around, well, maybe not so many, but I am yet to find one that could match the superior true inline click-to-edit WYSIWYG editor Viper from Squiz (developers of MySource Matrix). This revolutionary Viper editing interface was introduced with MySource Mini and it is amazing. John Underkoffler can demo his Minority Report like interfaces all he wants... It will be awhile before we can get our hands onto one of those, but the future of Content Management and editing is already here. Have a look and explore the MySource Mini website to learn more about all the product's exciting features.