jueves 29 de octubre de 2009

JOOMLA: Facebook Fans at your site ..and more

Last wednesday a collegue was trying to integrate his facebook friends within a site built with Joomla. He was having problems with the code, ...and i asked him, why don't you use a module for that??.



Yeah, joomla has modules for everything, absolutely everything. I like to digg into joomlabyte where you can find from free to commercial modules for joomla. ...and here it was, the Facebook Fans Joomla Module.

Very easy to use, you just need a facebook API key as it happens to many services you want to access. To get the API key just get here. At any case and if you are not used to work with facebook API, by the time you create an APP you will get a key so for a shortcut get in here to get it. ...my recommendation is to fully understand what you do so be patient and start at the "get started" page from facebook.

With the key you have all set:

Page Id: 54217729140
Fans Number :40
width:i set 400 pxl
height:i set 700
You Facebook API Key: xxxxxxx

Time to sleep, ..but if you want to dance tonight, and talking about FACEbook, ..I leave you with this poker FACE. diggdelicioustechnorati

lunes 26 de octubre de 2009

ZOHO: Another Google Docs??


Most of you have already tried the Google Docs, those web tools which allow you to use excel, word...and many more on internet, without installing any software at your PC and so being able to access your docs from any Computer or smartphone with internet access. Is google Docs alone??, ..of course not!!. No Software is ever alone...

Of course the other choice is not Microsoft Office Online because we are talking about free use, ..we are talking about ZOHO. ZOHO, as google docs, allows people to work together on same documents, as well of being platform independent. ZOHO comes with many, many apps:

  • Zoho Mail. Web-based Email Service
  • Zoho Writer. Online Word Processor
  • Zoho Sheet. Spreadsheets. Online
  • Zoho Show. Online Presentation Tool.
  • Zoho Docs. Online Document Management
  • Zoho Wiki. Easy to use, full-featured Wiki
  • Zoho Meeting. Web Conferencing, Remote Support
  • Zoho Projects. Project Collaboration Software
  • ......................
  • ......................
  • ......................
Every month seems to appear something new!!. There is also a API to use it at social networks as Facebook or to integrate at your site, or even into Iphone Apps!!.

Remember that is free for personal use, but if wanna use it for comercial or business purposes, then a fee must be paid.

Again, a video is worth a thousand words:



diggdelicioustechnorati

domingo 25 de octubre de 2009

MOOTOOLS: Slideshow 2

Slideshow 2! is a javascript class for Mootools 1.2 to animate a whole bunch of your favourite images into a presentation within your portal. It is already used in many sites so the stability of this solutions is out of question. Place your pics this way:


<div id="show" class="slideshow">
<div class="slideshow-images">
<a rel="lightbox" href="images/1.jpg">
<img id="slide-1" src="images/1.jpg" width="700"
height="400" alt="Comment image 1" /></a>
<a rel="lightbox" href="images/2.jpg">
<img id="slide-2" src="images/2.jpg" width="500"
height="600" alt="Comment image 2" /></a>
<a rel="lightbox" href="images/3.jpg">
<img id="slide-3" src="images/3.jpg" width="500"
height="400" alt="Comment image 3" /></a>
</div>
<div class="slideshow-thumbnails">
<ul>
<li><a href="#slide-1">
<img src="images/1t.jpg" width="50" height="40"
alt="Slide thumbnail" /></a></li>
<li><a href="#slide-2">
<img src="images/2t.jpg" width="50" height="40"
alt="Slide thumbnail" /></a></li>
<li><a href="#slide-3">
<img src="images/3t.jpg" width="50" height="40"
alt="Slide thumbnail" /></a></li>
</ul>
</div>
</div>

And Slideshow will do the rest!!!.



Its features:
  • Dynamic resizing - Slideshow can accommodate any size presentation.
  • Thumbnails - intelligent, auto-scrolling, tracking, etc.
  • Full-featured controller - completely style-able with CSS.
  • Animated captions - plain text or formatted with HTML.
  • Fully accessible - Slideshow can be controlled with access keys.
  • Automagic slideshows - create slideshows from existing HTML images.
  • Varied hyperlinking options - Slideshow allows for mashups with Lightbox, Slimbox, etc.
  • CSS slide transitions - designed in stylesheets, not javascript, allow for an infinite combination of effects (plus support for all Robert Penner transitions).
  • Unobtrusive and degradable - Slideshow even functions with Javascript turned off!


Integrate this nice utility at your sites and adding some music as this one while photos being presented, ..that assures a Victory!!. diggdelicioustechnorati

JQUERY: Alert Dialogs, Context Menu, File trees, from "A Beautifull Site"

There are 3 interesting tools which you may like to integrate in your developments!!. These are in one very good blog, a beautifull site, ..hey why not mentioning blogs other than mine, this is the basis for Open Source, ..sharing info!!

All these tools come with an outstading description as well as examples so I just link to them!!:

  • jQuery File Tree. An AJAX File Browser plugin. And just with a little line of code. Obviously we need a server-side tech to get access to the folder.. It provides conectors for PHP, ASP, ASP.NET, ColdFusion, JSP, Lasso, Perl, Python/Django and Ruby!!!
  • jQuery Context Menu Plugin. Just with a html list you can get this context menu.
  • jQuery Alert Dialogs. Aims to replace the basic functionality provided by the standard JavaScript alert(), confirm(), and prompt() functions.



A beatifull site for a beatifull day!!, Today it's a beautifull day. This is the song for today, enjoy this wednesday!! diggdelicioustechnorati

VIRTUAL DESKTOPS: G.ho.st



Another great Web Virtual Desktop with a very cool design (very funny animated ghosts moving along...). Its name: G.HO.ST. Its futures??

  • File Manager. You can sync you local drive with the drive at G.ho.st. How much Space do u have??. Are 15GB enough??. If it is not enough get a friend to signup and add 5 more GB!!.
  • A chat Client. It can manage Yahoo!!, MSN, AOL messengers as well as Google Talk. Log in also to facebook, twitter, myspace.......
  • Share your PICs with Flickr.
  • Watch your videos at youtube or Youku.
  • Listen to your favourite radio at LastFM, Pandora and Groove Shark
  • It Integrates ZOHO. The most comprehensive suite of web-based Applications which you can use to work with MSoffice for example.
  • RSS Client integrated.
  • Wanna play games??. It also includes Kongregate!!!

..And of course check ur POP and IMAP external email account as well as having a new one "user@G.ho.st".


In my opinion is one of the best Web Virtual DEsktop, or WEB OS as some like to call it, at this moment. With more apps than ICloud, but slower. Soon I will review a faster and very interesting choice called EyeOS

Talking about a ghost, ..do you remember this?? diggdelicioustechnorati

VIRTUAL DESKTOPS: ICLOUD

...I ve been thinking for a while which name I should give to ICloud, a web OS??, a Collaborative tool??, another Goggle Wave??, or yes, a Virtual Desktop!! as I prefer to define it. Actually ICloud is the Desktop on top of XIOS/3, Xcerion XML Internet Operating System.

This is THE FUTURE, to have desktops on the cloud where you can share your info with friends, log for example at messenger, get your email, upload pics and documents, icloud provides you 3GB disk Space, tag your youtube and meta cafe videos, have a video and audio player, have your calendar, even play games with your friends. Iclouds have all these although still misses some features as for example spreadsheets. It comes with a word editor but it doesn't still import word files ok, in the other hand it comes with a handy file explorer!!. At any case, a video is more worthy than a 1000 words:





which JS framework lies underneath Icloud?? JQuery is the answer!!.

Which song for today??. talking about clouds, what about an eye in the sky??, ... diggdelicioustechnorati

viernes 23 de octubre de 2009

SCRIPT.ACULO.US: PopIt, simple JS desktop windows

wooow, ..the weekend is almost here!!. We might have some free time during it to take out the frames of our old Web Apps and be ready to use JS DropDown Menus, Drag&Drops options, and windows managers!!. About this last issue is today's topic. How can you create windows in your desktop??, ..try this simple app called PopIt.



It runs under MIT Lincense, as we all like, and it will automatically generates draggable window which can be minimize, maximize and close, as well as having resizable borders (Horizontal and vertical).

Get your hands on coding this weekend although you also may have 2 more options:


  • Buy this TV where not only you can watch and play 3D movies and 3D Games, but also wath 2 different programs at a time so no more argues with partner...
  • Try to find that woman at the pic and take her for some drinks!! :)
diggdelicioustechnorati

jueves 22 de octubre de 2009

PROTOTYPE: Protofish, Another drowpdown Menu



It is called protofish and yeap it is another MIT License Accesible Multilevel Dropdown Menu which supports most browsers (IE6+, Safari 3+, Opera 9+, Chrome, Firefox 2+). It is accesible because from a list, which all browsers and webspiders can read, it appears magically a dropdown menu, and it also includes ARIA best practices.

The List, which will turn into a Menu, should be this way:

<ul id='menu-1' class='menu'>
<li><a class='sub' href='#'>Item 1</a>
<ul>
<li><a href='#'>Item 1.1</a></li>
<li><a href='#'>Item 1.2</a></li>
<li><a href='#'>Item 1.3</a></li>
<li class='last'><a href='#'>Item 1.4</a></li>
</ul>
</li>
<li class='active'><a class='sub' href='#'>Item 2</a>
<ul>
<li><a href='#'>Item 2.1</a></li>
<li class='active'><a href='#'>Item 2.2</a></li>
<li><a href='#'>Item 2.3</a></li>
<li class='last'><a href='#'>Item 2.4</a></li>
</ul>
</li>
<li><a href='#'>Item 3</a></li>
<li><a class='sub' href='#'>Item 4</a>
<ul>
<li><a href='#'>Item 4.1</a></li>
<li><a href='#'>Item 4.2</a></li>
<li><a href='#'>Item 4.3</a></li>
<li class='last'><a href='#'>Item 4.4</a></li>
</ul>
</li>
<li class='last'><a href='#'>Item 5</a></li>
</ul>
It works fine although there are 2 features, in my opinion, that should be automatically perform by the script. Those are:
  • The need to add class "last" to mean that is the last item in that menu level.
  • The need to add class "sub" to mean that come sublevels
In that sense I prefer PressXine Menu, although it is still in alpha version.

Protofish allows multiple instances at the same page, although it would be great that those instances can use different styles..., ...for sure Peter will include that feature in next versions...

I normally finish my posts with songs, ..today let me switch to techy videos as well. Do you know magic mouse from apple?? diggdelicioustechnorati

lunes 19 de octubre de 2009

CAPTCHA: Don't let noone attack your forms!!

At any on our sites we will have for sure a form, either for requesting info, for suscrbing to newsletters, to buy in our store, or just to sign up, ..and there are some people out there who enjoy behave a little bad either to shutsown your server, to fill your database or just to spam those forms. The solution as you all know is to install a Captcha, "put a nice car in you live and a nice captcha in your forms".

What is a Captcha??, I assume most of you know but at any case it means: "completely automated public Turing test to tell computers and humans apart." What it means is, a program that can tell humans from machines using some type of generated test. A test most people can easily pass but a computer program cannot. Have you see them??



There are many out there but the one I prefer is recaptcha. It has the next functionality as stated in its site:
  • It's Free! Yep, reCAPTCHA is free.
  • It's Useful. Why waste the effort of your users? reCAPTCHA helps to digitize books.
  • It's Accessible. reCAPTCHA has an audio test that allows blind people to freely navigate your site.
  • It's Secure. Most other CAPTCHA implementations can be easily broken.
  • It's Popular. Over 100,000 sites use reCAPTCHA, including household names like Facebook, Ticketmaster, and Craigslist.
  • It's Easy. reCAPTCHA is a Web service. As such, adopting it is as simple as adding a few lines of code on your site. For many applications and programming languages such as Wordpress and PHP we also have easy-to-install plugins available. We generate and check the distorted images, so you don't need to run costly image generation programs.
Another alternative:

SecureImage Captcha: PHP Captcha. t is also a good Accesible as it generates audible CAPTCHA files !!.

Today I leave you with I captcha under my skin!!! diggdelicioustechnorati

viernes 16 de octubre de 2009

SCRIPT.ACOLO.US: Multilevel dropdown menu

During this week i spent a little time to start building a multilevel dropdown menu. It is in version 0.5 so it still has some BUGS, do not kill me for that!!, and of course many garbage code to erase and some commented!!.

It works in firefox, chrome and explorer 8.0, and although I haven't test it on Safari it will work almost for sure (we know how "similar" the hearts from chrome and Safari are ;)). The only issue that will not work with early versions of explorer should be the hover style over the divs, and obviously some other CSS stuff.

I have added comments explaining how everything works, ..although I Still need to add comments about the JS code. At any case, and as the weekend is coming, I posted here so you have time to play around!! :).

Its name PressXine Menu or just PXMenu.

I need to hit the road!!!, Time to travel. Have a nice weekend!!. diggdelicioustechnorati

miércoles 14 de octubre de 2009

SCRIPT.AULO.US: An original Picture Gallery



The world is full of original ideas, and we all need to pay attention to them so we can fill it with some others!!. This is the case of the creative scrape. As simple as getting images from flicker, order them randomly in a cell grid, and being popped up by hoving the mouse over or randomly. The effect is really awesome. Those effects are done by the famous effects library from script.aculo.us (<script src="effects.js?1" type="text/javascript"></script>
).

This is a great idea for having an Image Gallery!!!.

The code is very simple and I will just recommend you to take a look at the morphing function which produces the zoom, ..I am not going to explain it because it is just a question of reading it but you can get an idea of how scale images, how to get the size of the window, set styles... :


function zoomImage(element, event, suspend){
closeAbout();
suspendAutomatic = suspend || false;

var
data = element._data,
zoom = $('zoom'), o = element.cumulativeOffset();
zoom.setStyle({backgroundImage:'url(' data[0] ')'});

zoomStyle = {
left:o[0] 'px',top:o[1] 'px',
width:element.offsetWidth 'px',height:element.offsetHeight 'px'
};
var link = zoom.down('a');
link.hide().writeAttribute('href', data[1]).update(data[1]);
zoom.setStyle(zoomStyle);

var dims = document.viewport.getDimensions(),
w = parseInt(data[2]), h = parseInt(data[3]), l = o[0], t = o[1];

if(l w>dims.width-10) l = dims.width-w-10;
if(t h>dims.height-10) t = dims.height-h-10;
if(l<10) { w=dims.width-20; l=10; }
if(t<10) { h=dims.height-20; t=10; }

zoom.show().morph(
'left:' l 'px;top:' t 'px;'
'width:' w 'px;height:' h 'px', {
duration: .4,
after: function(){ link.show(); }
});

if(event) event.stop();
}



Amy and Thomas, as usual, have come out with a good idea expressed by a clean code!!. My Time: 01:45, so bed time, have sweet dreams if you are able after checking the video from Marilyn Manson..., who says I am freaky after checking Marilyn?? diggdelicioustechnorati

martes 13 de octubre de 2009

PHPBB: The Forum Solution

During all these days, at my blog, you have read about the different JS Frameworks, how to build dropdown menus, how to drag&drop, where to get the updated code of these libreries, about widgets for video players, or for pics and tag clouds, the latest news about joomla, wordpress, how to make your website quick, fast and optimized and good SEO Strategies....But I have said little about forums and how to being able to have one..

I think it is time to meet PHPBB!!!
As it is said in the name of this awesome software, it runs over PHP and you also obviously need a DB and a Web server (I recommend you to install XAMPP which will install all this requirements in several clicks). The requirements for version 3 can be found here.
PHPBB is released under the GNU General Public License and it brings the following features:

  • You can build all the forums you may need.
  • For a quicker access it provides cache for all the contents.
  • User Registrarion and personalization of any field.
  • User Panel to administer all his/her info.
  • Private messages between Registered users, as well as being able to create folders to save them.
  • A Nice search engine by topics and users.
  • Administration and moderation Panel and Options.
  • Session Control. It provides maximum connection time and inactivity control.
  • Users can block messages by "enemies".
  • It enables content Personalization.
  • It enables Groups.
  • Many reports for moderators and administrators, as well as many intersting logs of user activity.
  • "Skins". It comes with 2 different ones but you can download more at many sites for example at phpbbdesign or free at phpbbstyles.com or at PHPBB site


How to install it??. It is perfectly explained at PHPBB site.

I Prefer PHPBB as VBulletin, ....but as any person has different likes, i will talk about VBulletin soon!!. As always stay tuned, ..and talking about tunes, Do u remember Suede?? diggdelicioustechnorati

lunes 12 de octubre de 2009

PROCESSING.JS: Why Using flash or Applets??

This is not new, lately we have crashed into Raphaël, or even the fx frameworks from Scripty2 or mootools, which are implenting very good stuff that will provide RIA apps to your web. Now it's time for processing.js. I haven't had time to test it, so for this time I will just pick words of its creators (Ben Fry and Casey Reas):

"Processing.js is an open programming language for people who want to program images, animation, and interactions for the web without using Flash or Java applets. Processing.js uses Javascript to draw shapes and manipulate images on the HTML5 Canvas element. The code is light-weight, simple to learn and makes an ideal tool for visualizing data, creating user-interfaces and developing web-based games.

Processing.js runs in FireFox, Safari, Opera, Chrome and will also work with Internet Explorer, using Explorer Canvas."




Do not miss the learning Chapter!!. Examples of just everythings..

For how long time will still Flash or Flex conquer the market??, ...still for quite a bit, ...but change is happening!! diggdelicioustechnorati

jueves 8 de octubre de 2009

JQUERY: Links Styles

Yesterday I heard a collegue complaining about some code she hada code at an upload jsp to detect the extension of the file and save that type of extension (pdf, zip, png, doc....) within link field in a DB. I asked, ..what for??, ..and she answered " so when someone comes to my link's section at my Portal, it appears a cool pdf, zip, png, doc.... icon by the link!!..."

What could I say??, I just crayed out loud "JQUERY!!". She looked at me surprisely and I explained her the following:



There is a pretty way, and very simple, to get the extension of a link in Jquery: just like this $("a[@href$=extension]"). So for what you can do is set a function that will execute when the dom is ready $(document).ready(function(){}) that would look for all our extensions links and assign to them a style. The function could be as this one:


<script type="text/javascript">
$(document).ready(function(){

 $("a[@href$=pdf]").addClass("pdf");
 $("a[@href$=zip]").addClass("zip");
 $("a[@href$=zip]").addClass("png");
 $("a[@href$=doc]").addClass("doc");
});
</script>


And now just get the syles ready for those extensions. Something very easy could be:


.pdf {
 padding-left: 20px;
 background: transparent url(pdfIcon.png) left top no-repeat;
}
.zip {
 padding-left: 20px;
 background: transparent url(zipIcon.png) left top no-repeat;
}
...
...
...
...


As simple as that!!. Even if you want to set a style for external links this also could be done adding this to the js function:


 $("a:not([@href*=http://blogandweb.com])").not("[href*=#]").addClass("external")


And adding the "external" style at the css. Last but not least and to prevent external links to open in your site, I recommend to add to all external links this attribute: .attr({ target: "_blank" });.

Enjoy the weekend, and do not miss a good concert!!: Every you, Every me (Placebo) diggdelicioustechnorati

RAPHAEL: Helps you handling IMGs and Charts at your Site

Most of us want to include some charts in our sites and we endup including excel sheets or just IMGs with the Charts that is much easier, ....are you sure that is the easier way??. If your answer is "YES" is because you don't know Raphaël by Dmitry Baranovski.

Write the values in a table and let magic happen.



As dmitry says: "Raphaël uses the SVG W3C Recommendation and VML as a base for creating graphics. This means every graphical object you create is also a DOM object, so you can attach JavaScript event handlers or modify them later". So. That means that Raphaël can apply translations, rotations and scalations to images as this example:


As well as being able to animate them!!. At any case, and thanks to the Image Method, you can Embed an image into the SVG/VML canvas and being at the DOM you can apply any other jquery, scripty2..... object transformation methods!!.

Today, which is today's song??. Time for Moby singing in spanish with Amaral.
diggdelicioustechnorati

martes 6 de octubre de 2009

OPTIMIZATION: Test your portal on Websiteoptimization.com

When building a portal, a site, a blog, a forum.... there are many factors to have in mind:
  • Technology
  • Design, Usability & User experience
  • Good SEO Strategy
  • Market Niche, ..or People interested in your contents
  • .....
  • .....
  • and a good OPTIMIZATION of your site!!!.

How can you optimize your site??. There are many factors, but the most obvious are:
  1. A proper size of the html code. It is recommended less than 50kb, ..normally this would not be the problem!!
  2. Miniziming the number of items in your page (img, flash, css files, js files...). How much are recommended?? from 20 to 30.
  3. Minimizing also the size of this items. Total size should be around 100kb.
  4. Minify your css and js files (this will erase any useless whitespaces, carriage return....).
  5. GZIP your code. This has to be allowed by your hosting provider.
  6. Size of External Elements. You may have external elements in within your page, ..for the hosting server this can better sometimes (youtube videos, flicker images...), but for the guy surfing your web will be like elements in your page, so bare in mind point 2.
  7. No broken links!!. No error 404. This will make the server one disk access to declare the error at the log which will mean slower transfer.
  8. A good hosting provider!!. The speed your page is downloaded depends of all factors above as well as the speed of your provider!!.
Hmmmm, too many factors!!. why doesn't exist a tool which can help me??. There are many, for example a plugin for firefox which I love called YUI but I will speak about it another day..., for starting testing your site I recommend Websiteoptimization. Just enter your URL, and this tool will check most of the factors above about your site, ..and even more interesting it will tell you how optimized are your friend's portal so you will show them your portal is better than theirs!! :)

Try twitter and google starting pages, ..and check the differences....

And today the killers are at Radio freakZion!!!. diggdelicioustechnorati

lunes 5 de octubre de 2009

SCRIPTY2: The FX factory. When the magic comes true




A while ago I announced the PHOENIX REBORN!!, .. the new version of script.aculo.us which is called Scripty2. This weekend I tried out the FX , the effects frameworks, part of the Core...uffff, no words to explain my feelings. Its features:
  • CSS morphing engine: morph from one set of style properties to another, including support for all CSS length types (px, em, %, cm, pt, etc.).
  • Extensive transition system for animation easing and special effects (e.g. bouncing).
  • Auto-adjusts to differences in computing and rendering speed (drops frames as necessary).
  • Limits the number of attempted frame renders to conserve CPU in fast computers.
  • Flexible OOP-based implementation allows for easy extension and hacks.
  • Effect queuing to run an effect after other effects have finished.
  • Chaining and default options: easy-to-use syntax for most use cases.
  • Reusable effect instances can be used with more than one DOM element.
  • User-definable callback functions at any point in the effect lifecycle.
  • Effects are abortable (either as-is or abort-to-end).
But as I always say.., a demo is more worth than 1000032042304304 words, ..so just take a look at the demo page of the transitions.

Soooo, what are you waiting for to change your code from Script.aculo.us to scripty2??, ..and I should ask, ..when is the wedding between Prototype and Scripty2??, hmmmmm, many common things I see lately, ..have you realized how the documentation from Scripty and Prototype seems very similar thanks to pdoc from prototype..

..I leave this post but with the pleasure of leaving the radio on with this version of Personal Jesus by Johny Cash diggdelicioustechnorati

sábado 3 de octubre de 2009

ALL: Drag & Drop

A shiny saturday!!, perfect for some beers at a terrace, ..hmmm. I will be quick with this post then :)


Here is the promised list of Drag & Drop for all technologies:

Scriptaculous:

Dojo:
  • Article at sitepen in which kevin Guillen explains in detail dojo.dnd.

Jquery:

YUI:

ExtJS:
  • Article at the ExtJs site blog (Very good explanation I must say).

Mootools:
..If you like to add one to my list do not doubt to throw me a brick with the URL Links written in a paper attached!!!. Enjoy the weekend!! diggdelicioustechnorati

viernes 2 de octubre de 2009

MOOTOOLS: Drag&Drop


hmmmm, now it's time for mootools, ..and then I should make a list of drag&drop in all javascript libraries, some of them I have already explained in my "awesome" blog, ...because you all think is awesome, don't you??.

Let's think about 10 balls and 2 baskets, so the balls can be dragged to any of the baskets. Let's have an easy html code to represent this:

<div id="balls"></div>
 <div class="ball"></div>
 <div class="ball"></div>
 <div class="ball"></div>
 <div class="ball"></div>
 <div class="ball"></div>
 <div class="ball"></div>
 <div class="ball"></div>
 <div class="ball"></div>
 <div class="ball"></div>
 <div class="ball"></div>
<div id="baskets">
 <div class="basket"></div>
 <div class="basket"></div>
</div>


o not forget to apply style to give them a form. Something like this:

#balls{
 float:left;
}
.ball{
 width:100px;
 height:100px;
 background-image:url(ball.png);
}
#baskets{
 float:left;
}
.basket{
 width:100px;
 height:100px;
 float:left;
 padding:0px;
 margin:5px
 background-image:url(basket.png);
}


Now with javascript let's define the objects draggable (the one to move, that is the ball), and droppable(the one to drop, that is each basket):

$$('#balls div').each(function(drag){
 new Drag.Move(drag, {
  droppables: $$('#baskets div')
 });
});


This means, add the drag capability to the ball elements to being drop into the baskets. Now let's make the basket vibrates when ball on top, empty when ball is not drop in, and basket with ball when ball has been dropped in (All effects will be done with images for simplicity):

$$('#baskets div').each(function(drop){
 drop.addEvents({
  'over': function(el, obj){
   this.setStyle({'background-image','url(BasketVibrating.png)'});
  },
  'leave': function(el, obj){
   this.setStyle({'background-image','url(basket.png)'});
  },
  'drop': function(el, obj){
   this.setStyle({'background-image','url(basketWithBall.png)'});
   });
  }
 });
});


...and that's it!!. It is just a matter to see how to assign drag or drop capabilities to objects, and being able to set over, leave or drop events for droppable objects...

Then of course you can make it complex, for example when moving the ball to the basket you can use Fx.Transitions.Bounce to make it bounce....for example. There are soo many interesting things about Mootools FX

ohhh, yes, I almost forget, ..the list of articles about drag&drop for all libraries..., hmmm, let's leave it for tomorrow :) diggdelicioustechnorati

jueves 1 de octubre de 2009

YUI: 3.0.0 Version

YUI 3’s core infrastructure (YUI, Node and Event) and its utility suite (including Animation, IO, Drag & Drop and more) are all considered production-ready with this release, ..meanwhile you 've been playing around with beta version as well as with v2.8.0.

The topics which have been redisign are:

  1. Selector-driven: YUI 3 is built around one of the lightest, fastest selector engines available, bringing the expressive power of the CSS selector specification into actions that target DOM nodes.
  2. Syntactically terse: Without polluting the global namespace, YUI 3 supports a more terse coding style in which more can be accomplished with less code.
  3. Self-completing: YUI 3’s light (6.2KB gzipped) seed file can serve as the starting point for any implementation. As long as this seed file is present on the page, you can load any module in the library on the fly. And all modules brought into the page via the built-in loader are done so via combo-handled, non-blocking HTTP requests. This makes loading the library safe, easy and fast.
  4. Sandboxed: YUI modules are bound to YUI instances when you use() them; this protects you against changes that might happen later in the page’s lifecycle. (In other words, if someone blows away a module you’re using after you’ve created your YUI instance, your code won’t be affected.)
Wanna see YUI in action??

At Last, Satyen's talk provides a fantastic introduction to the value proposition of YUI 3, explaining the big decisions Yahoo people made moving from the YUI 2 codeline.

diggdelicioustechnorati