XSnippets Widget

<html>
	<!-- Mandatory if not included yet -->
	<!-- Choose the Dojo version or remove if your page uses already Dojo -->
	<script src="http://ajax.googleapis.com/ajax/libs/dojo/1.6.1/dojo/dojo.xd.js" 
		type="text/javascript"></script>
	
	<!-- Mandatory -->
	<!-- Embed this div on your page -->
	<div id="xsnippets"></div>
	
	<!-- Mandatory -->
	<!-- This JS file contains both - the business logic and the layout -->
	<script src="http://openntf.org/XSnippets.nsf/XSnippets.js" 
		type="text/javascript"></script>

	<!-- Optional -->
	<!-- This css file defines the used styles that can be overwritten -->
	<link href="http://openntf.org/XSnippets.nsf/XSnippets.css" 
		type="text/css" rel="stylesheet">
			
	<!-- Optional -->
	<!-- Overwrite defaults here -->
	<script type="text/javascript">
		xSnippetsHeight = 500; // default: 400
		xSnippetsWidth = 300; // default: 200
		xSnippetsCount = 20; // default: 10
		xSnippetsView = "recent"; // default: "recent";
			// options: "recent", "popular", "author"
		xSnippetsAuthor = "Niklas Heidloff"; // default: none
			// only used if xSnippetsView = "author" 			
	</script>
		
	<!-- Optional -->
	<!-- If you want to build your own widget UI you can call the -->
	<!-- REST JSONP API: -->
	<!-- http://openntf.org/XSnippets.nsf/snippetsAsJson.xsp?count=10&... -->
	<!-- ...view=author&author=Niklas Heidloff -->
	<!-- Each entry contains the following properties: -->
	<!-- id, url, creationDate, name, language, developer -->
</html>





This widget can be embedded in blogs and other web sites to display the most recently added and most popular snippets and snippets by a certain author.

The widget is highly customizable. It can be defined what snippets to display, the style can be overwritten and a JSONP API can be used to build your own widget.

XML
Niklas Heidloff
December 7, 2011 12:11 AM
Rating
43

All code submitted to OpenNTF XSnippets, whether submitted as a "Snippet" or in the body of a Comment, is provided under the Apache License Version 2.0. See Terms of Use for full details.



No comments yetLogin first to comment...