Commits

derschreckliche  committed bac2061

BUGFIX: <li> didn't has an <ul> around them. EXAMPLE.html updated

  • Participants
  • Parent commits 9e55ed8

Comments (0)

Files changed (2)

File EXAMPLE.html

 		<script src="http://u0d.de/8c6bec/mootools_1.2.4.4_more.js" type="text/javascript"> </script>
 
 			<!-- We need the IdenticaWidget class -->
-		<script src="http://u0d.de/262fcb/identicawidget.js" type="text/javascript"> </script>
+		<script src="http://u0d.de/e59e92/identicawidget.js" type="text/javascript"> </script>
 
 			<!-- Here we create 2 instances of IdenticaWidget. -->
 		<script type="text/javascript">
 			    new IdenticaWidget({
 					user_name: "derschreckliche",
 					container: $("twitter_widget"),
-					service: "twitter"
+					service: "twitter.com"
+				});
+
+			    new IdenticaWidget({
+					follow_text: "The people i follow on identi.ca talking:",
+					user_name: "derschreckliche",
+					timeline: "friends_timeline",
+					msg_count: "5",
+					avatar: "1",	//With set to "1", every status will have an avatar
+									//Set to "top" for your avatar only on top of the tweets(default)
+					container: $("friends_widget")
 				});
 			});
 		</script>
 				<li>no Updates</li>
 			</ul>
 		</div>
+
+		<div id="friends_widget">
+			<ul style="clear: both;" >
+				<li>no Updates</li>
+			</ul>
+		</div>
 	</body>
 </html>

File IdenticaWidget.js

 	    service: "identi.ca"	//supported services: "identi.ca", "twitter.com", "status.net"(options.server required)
 	},
 	initialize: function(options){
-		if(options.service == "twitter") {
+		if(options.service == "twitter.com") {
 			options.follow_text = (options.follow_text == null) ? "Follow me on twitter.com" : options.follow_text ;
 			options.server = (options.server == null) ? "http://twitter.com" : options.server ;
 			options.api_path = (options.api_path == null) ? "" : options.api_path ;
 	                 av_image.inject(link, 'top');
 	            }
 	            link.inject(this.options.container, 'top');
+				
+				ul = new Element('ul', {
+					'style': 'clear:left'
+				});
+				ul.inject(this.options.container, 'bottom');
 	            data.each(function(status){
-	                if(this.options.service == "twitter"){
+	                if(this.options.service == "twitter.com"){
 	                    html_to_inject = status.text.tweetify();
 	                } else {
 	                    html_to_inject = status.text.dentify(this.options.server);
 	                var li_elem = new Element('li', {
 	                    'html': html_to_inject
 	                });
-	                li_elem.inject(this.options.container);
+	                li_elem.inject(ul);
 	      	 	}.bind(this));
 	    	}.bind(this)
 		});