الاثنين، 13 سبتمبر 2010

نسخة جديدة اصدارة بى اتش بى New PHP Versions

اصدرت امس نسخة اصدارة جديدة من php
واضاف عليها المزيد من الخدمات والدعم لدوال جديدة بخلاف زيادة نسبة الامان
والموضوع بالتفصيل
The PHP development team would like to announce the immediate availability of PHP 5.3.3. This release focuses on improving the stability and security of the PHP 5.3.x branch with over 100 bug fixes, some of which are security related. All users are encouraged to upgrade to this release.




Backwards incompatible change:



■Methods with the same name as the last element of a namespaced class name will no longer be treated as constructor. This change doesn't affect non-namespaced classes.

<?php

namespace Foo;

class Bar {

public function Bar() {

// treated as constructor in PHP 5.3.0-5.3.2

// treated as regular method in PHP 5.3.3

}

}

?>



There is no impact on migration from 5.2.x because namespaces were only introduced in PHP 5.3.



Security Enhancements and Fixes in PHP 5.3.3:



■Rewrote var_export() to use smart_str rather than output buffering, prevents data disclosure if a fatal error occurs (CVE-2010-2531).

■Fixed a possible resource destruction issues in shm_put_var().

■Fixed a possible information leak because of interruption of XOR operator.

■Fixed a possible memory corruption because of unexpected call-time pass by refernce and following memory clobbering through callbacks.

■Fixed a possible memory corruption in ArrayObject::uasort().

■Fixed a possible memory corruption in parse_str().

■Fixed a possible memory corruption in pack().

■Fixed a possible memory corruption in substr_replace().

■Fixed a possible memory corruption in addcslashes().

■Fixed a possible stack exhaustion inside fnmatch().

■Fixed a possible dechunking filter buffer overflow.

■Fixed a possible arbitrary memory access inside sqlite extension.

■Fixed string format validation inside phar extension.

■Fixed handling of session variable serialization on certain prefix characters.

■Fixed a NULL pointer dereference when processing invalid XML-RPC requests (Fixes CVE-2010-0397, bug #51288).

■Fixed SplObjectStorage unserialization problems (CVE-2010-2225).

■Fixed possible buffer overflows in mysqlnd_list_fields, mysqlnd_change_user.

■Fixed possible buffer overflows when handling error packets in mysqlnd.

Key enhancements in PHP 5.3.3 include:



■Upgraded bundled sqlite to version 3.6.23.1.

■Upgraded bundled PCRE to version 8.02.

■Added FastCGI Process Manager (FPM) SAPI.

■Added stream filter support to mcrypt extension.

■Added full_special_chars filter to ext/filter.

■Fixed a possible crash because of recursive GC invocation.

■Fixed bug #52238 (Crash when an Exception occured in iterator_to_array).

■Fixed bug #52041 (Memory leak when writing on uninitialized variable returned from function).

■Fixed bug #52060 (Memory leak when passing a closure to method_exists()).

■Fixed bug #52001 (Memory allocation problems after using variable variables).

■Fixed bug #51723 (Content-length header is limited to 32bit integer with Apache2 on Windows).

■Fixed bug #48930 (__COMPILER_HALT_OFFSET__ incorrect in PHP >= 5.3).

For users upgrading from PHP 5.2 there is a migration guide available on http://php.net/migration53, detailing the changes between those releases and PHP 5.3.

 
رابط لمعرفة التغييرات
http://www.php.net/ChangeLog-5.php#5.3.3
 
رابط التحميل
http://www.php.net/downloads.php#v5
 
قم ب ترقية سيرفرك الان

الأحد، 12 سبتمبر 2010

Making a Mosaic Slideshow With jQuery & CSS

When designing a product page, it is often necessary to present a number of images in a succession, also known as a slideshow. With the raise of the jQuery library and its numerous plugins, there is an abundance of ready-made solutions which address this problem. However, to make a lasting impression to your visitors, you need to present them with something they have not seen before.



Today we are making a jQuery & CSS mosaic gallery. Mosaic, because it will feature an interesting tile transition effect when moving from one slide to another.



Step 1 – XHTML

The mosaic effect of the slideshow is achieved by dividing the original image into smaller parts. These tiles, which contain parts of the image, are sequentially hidden from view, which causes the effect. The markup of the slideshow is pretty straightforward. It consists of the main slideshow container element (#mosaic-slideshow), a left and right arrow for previous and next transition and the mosaic-slide div, which is inserted by jQuery at run-time.



demo.html

view sourceprint?

01 <div id="mosaic-slideshow">



02 <div class="arrow left"></div>



03 <div class="arrow right"></div>



04



05 <div class="mosaic-slide" style="z-index: 10;">



06



07 <!-- The mosaic-slide div and the tiles are generated by jQuery -->



08 <div class="tile" style="..."></div>



09 <div class="tile" style="..."></div>



10 <div class="tile" style="..."></div>



11 <div class="tile" style="..."></div>



12



13 </div>



14 </div>

The div with the mosaic-slide class name is added to the page by jQuery after the transition() JavaScript function is executed (we will come back to this in the third step). Inside it you can see the tile divs. There are a total of 56 such divs, each of which has a 60px by 60px portion of the slide image set as its background.





Mosaic Slideshow

Step 2 – CSS

To make this effect work (and most importantly look good), we have to add a few lines of CSS. Only the code directly used by the gallery is shown here. You can see the code that styles the rest of the demonstration page in styles.css.



styles.css – Part 1

view sourceprint?

01 #mosaic-slideshow{



02 /* The slideshow container div */



03 height:500px;



04 margin:0 auto;



05 position:relative;



06 width:670px;



07 }



08



09 .mosaic-slide{



10 /* This class is shared between all the slides */



11 left:80px;



12 position:absolute;



13 top:25px;



14



15 border:10px solid #555;



16



17 /* CSS3 rounded corners */



18 -moz-border-radius:20px;



19 -webkit-border-radius:20px;



20 border-radius:20px;



21 }



22



23 .tile{



24 /* The individual tiles */



25 height:60px;



26 width:60px;



27 float:left;



28 border:1px solid #555;



29 border-width:0 1px 1px 0;



30 background-color:#555;



31 }

The slideshow is contained inside the div with an ID of mosaic-slideshow (or #mosaic-slideshow, if we refer to it in a form of a CSS / jQuery selector). There can be only one such div in the page, hence the use of an ID attribute.



However there can be more than one mosaic-slide divs in the page. The effect itself is achieved by stacking two slides on top of each other and hiding the tiles of the first one to reveal the ones of the second. This is why we are using a class name instead of an ID.



Some of the more interesting rules presented here are the three CSS3 rules for rounded corners. As the CSS3 standard is still a work in progress, browsers don’t support the regular border-radius property yet (except for the new 10.50 version of Opera), and need vendor-specific prefixes to recognize it. The -moz- prefix is used by Firefox, and -webkit- is used by Safari and Chrome.



styles.css – Part 2

view sourceprint?

01 .arrow{



02 /* The prev/next arrows */



03 width:35px;



04 height:70px;



05 background:url("img/arrows.png") no-repeat;



06 position:absolute;



07 cursor:pointer;



08 top:50%;



09 margin-top:-35px;



10 }



11



12 .arrow.left{



13 left:15px;



14 background-position:center top;



15 }



16



17 .arrow.left:hover{



18 background-position:center -70px;



19 }



20



21 .arrow.right{



22 right:15px;



23 background-position:center -140px;



24 }



25



26 .arrow.right:hover{



27 background-position:center -210px;



28 }



29



30 .clear{



31 /* This class clears the floats */



32 clear:both;



33 }

The arrow class is shared by the previous and next arrows. They do need individual styling in addition to this common rule, so we add it after this. We are also using a CSS sprite as the background for the arrow divs. It contains a regular and hover state for both arrows, which spares us from having to use four individual images.



“CSS spriting” is a widespread technique used by web designers. It allows the designer to join multiple smaller images into a single larger one, called a sprite, which is downloaded faster and saves the web server from multiple download requests. After this, the designer can use the CSS background property in conjunction with setting the elements to a fixed size, to show only the part of the sprite image that they need.





Mosaic Slideshow

Step 3 – jQuery

After including the jQuery library to the page, we can move on to creating the script that will make the slideshow tick. To achieve the mosaic effect, the script defines 4 functions:



•transition() – this function makes an animated transition between the currently shown slide, and a new one specified by the id parameter. It works by positioning the new slide we want to show, below the current one, and then hiding the current one one tile at a time;

•generateGrid() – this function is used by transition() to generate a grid of tiles. Each tile contains a part of the slide image as its background;

•next() – detects which the next slide is and runs the transition() function with its index;

•prev() – analogous to next().

script.js – Part 1

view sourceprint?

01 /* The slide images are contained in the slides array. */



02 var slides = new Array('img/slide_1.jpg',



03 'img/slide_2.jpg',



04 'img/slide_3.jpg',



05 'img/slide_4.jpg',



06 'img/slide_5.jpg');



07



08 $(document).ready(function(){



09 /* This code is executed after the DOM has been completely loaded */



10



11 $('.arrow.left').click(function(){



12 prev();



13



14 /* Clearing the autoadvance if we click one of the arrows */



15 clearInterval(auto);



16 });



17



18 $('.arrow.right').click(function(){



19 next();



20 clearInterval(auto);



21 });



22



23 /* Preloading all the slide images: */



24



25 for(var i=0;i<slides.length;i++)



26 {



27 (new Image()).src=slides[i];



28 }



29



30 /* Showing the first one on page load: */



31 transition(1);



32



33 /* Setting auto-advance every 10 seconds */



34



35 var auto;



36



37 auto=setInterval(function(){



38 next();



39 },10*1000);



40 });

The $(document).ready() method is executed once the page has finished loading. This will ensure that all the divs and other elements are accessible to the script. Inside it we bind a function for the click event on the previous and next arrows, preload all the images, show the first slide (otherwise the slideshow would be empty) and set up the auto-advance interval.



script.js – Part 2

view sourceprint?

01 var current = {};



02 function transition(id)



03 {



04 /* This function shows the slide specified by the id. */



05



06 if(!slides[id-1]) return false;



07



08 if(current.id)



09 {



10 /* If the slide we want to show is currently shown: */



11 if(current.id == id) return false;



12



13 /* Moving the current slide layer to the top: */



14 current.layer.css('z-index',10);



15



16 /* Removing all other slide layers that are positioned below */



17 $('.mosaic-slide').not(current.layer).remove();



18 }



19



20 /* Creating a new slide and filling it with generateGrid: */



21 var newLayer = $('<div class="mosaic-slide">').html(generateGrid({rows:7,cols:8,image:slides[id-1]}));



22



23 /* Moving it behind the current slide: */



24 newLayer.css('z-index',1);



25



26 $('#mosaic-slideshow').append(newLayer);



27



28 if(current.layer)



29 {



30 /* Hiding each tile of the current slide, exposing the new slide: */



31 $('.tile',current.layer).each(function(i){



32 var tile = $(this);



33 setTimeout(function(){



34 tile.css('visibility','hidden');



35 },i*10);



36 })



37 }



38



39 /* Adding the current id and newLayer element to the current object: */



40 current.id = id;



41 current.layer = newLayer;



42 }

The transition function uses the global current object to store the id of the currently shown slide, and a reference to the current slide div. This is later used to remove leftover slides and prevent a transition from occurring if the same slide as the currently active one is to be shown.



Notice how we use the each method on line 31 to loop through the tiles of the current slide and schedule them to be hidden in i*10 milliseconds in the future. As i is incremented for every tile, this mean that they are hidden 10 milliseconds apart from one another.





Slide Transition

script.js – Part 3

view sourceprint?

01 function next()



02 {



03 if(current.id)



04 {



05 transition(current.id%slides.length+1);



06 }



07 }



08



09 function prev()



10 {



11 if(current.id)



12 {



13 transition((current.id+(slides.length-2))%slides.length+1);



14 }



15



16 }



17



18 /* Width and height of the tiles in pixels: */



19 var tabwidth=60, tabheight=60;



20



21 function generateGrid(param)



22 {



23 /* This function generates the tile grid, with each tile containing a part of the slide image */



24



25 /* Creating an empty jQuery object: */



26 var elem = $([]),tmp;



27



28 for(var i=0;i<param.rows;i++)



29 {



30 for(var j=0;j<param.cols;j++)



31 {



32 tmp = $('<div>', {



33 "class":"tile",



34 "css":{



35 "background":'#555 url('+param.image+') no-repeat '+(-j*tabwidth)+'px '+(-i*tabheight)+'px'



36 }



37 });



38



39 /* Adding the tile to the jQuery object: */



40 elem = elem.add(tmp);



41 }



42



43 /* Adding a clearing element at the end of each line. This will clearly divide the divs into rows: */



44 elem = elem.add('<div class="clear"></div>');



45 }



46



47 return elem;



48 }

The parameter passed to generateGrid() is an object containing the rows and the columns we want to be generated, as well as the image to be set as the background of the tiles. While generating the tiles, the background image is offset according to the current position of the tile in the row and in the column. Finally the tile is added to an empty jQuery object which is returned at the end.



With this the mosaic slideshow is complete!

السبت، 11 سبتمبر 2010

SWFUpload jQuery Plugin

When I first stumbled across SWFUpload about two years ago I was impressed by how easy it was to implement. However, their example code has always bugged me as being rather crap, having to assign a separate global event handler for each event, and the lack of multiple handlers for a single event.




Using jQuery (the solution to all things painful), I've written a plugin to create a real event dispatcher for SWFUpload without modifying the SWFUpload core!





The SWFUpload jQuery Plugin

This plugin makes working with SWFUpload easier!



Get straight to the source code at my SWFUpload jQuery Plugin repository on GitHub.



And the benefits are...

■Native jQuery event handling using .bind()

■Ability to assign multiple callbacks per event

■Makes multiple SWFUpload instances on a single page easier to manage

■Ability to completely separate SWFUpload object from UI code (callbacks)

■Assign event handlers before SWFUpload instance is even created!

■No global functions or variables needed!

■A nice, chainable solution!

Live Examples

Here are some live examples you can pull apart. Although the UI is not pretty, it demonstrates how you listen to events, and from there you can create whatever UI you want.



Although these examples upload to a PHP script on my server, the uploaded files are not saved.



■Single Uploader

■Multiple Uploaders

How do I use it?

If you know how to use SWFUpload already, the following should be fairly easy to consume.





$(function(){



$('.swfupload-control').swfupload({

// Backend Settings

upload_url: "../upload.php", // Relative to the SWF file (or you can use absolute paths)



// File Upload Settings

file_size_limit : "102400", // 100MB

file_types : "*.*",

file_types_description : "All Files",

file_upload_limit : "10",

file_queue_limit : "0",



// Button Settings

button_image_url : "../multiinstancedemo/XPButtonUploadText_61x22.png", // Relative to the SWF file

button_placeholder_id : "spanButtonPlaceholder",

button_width: 61,

button_height: 22,



// Flash Settings

flash_url : "../swfupload/swfupload.swf"



});





// assign our event handlers

$('.swfupload-control')

.bind('fileQueued', function(event, file){

// start the upload once a file is queued

$(this).swfupload('startUpload');

})

.bind('uploadComplete', function(event, file){

alert('Upload completed - '+file.name+'!');

// start the upload (if more queued) once an upload is complete

$(this).swfupload('startUpload');

});



});



<div class="swfupload-control">

<span id="spanButtonPlaceholder"></span>

</div>

How does it work?

Rather than creating a SWFUpload instance and assigning handlers directly, it associates the SWFUpload instance with an element in the DOM, and all events handlers are bound to that DOM element.



Calling methods on the SWFUpload instance

The following code will execute the startUpload method on all SWFUpload instances that exist within the selector .your-swfupload-control.





$('.your-swfupload-control').swfupload('startUpload');

Getting properties on the SWFUpload instance

Sometimes you just need to get at the SWFUpload instance... easy!





var swfu = $.swfupload.getInstance('.some-selector-for-your-control');

alert(swfu.settings.custom_settings.your_custom_setting);

Additional event handlers

Due to the way SWFUpload works, all event names must be defined before the SWFUpload instance is created. This means if you are using any plugins that define additional events, you'll need to add them to the handler list before the SWFUpload instance is created.





$.swfupload.additionalHandlers('some_plugin_handler');



The source code

If you missed it the first time, you can download all the source code including all support files and example files from my SWFUpload jQuery Plugin repository on GitHub.



Enjoy!

link to orginal post
http://blogs.bigfish.tv/adam/2009/06/14/swfupload-jquery-plugin/
 
thank you

الجمعة، 10 سبتمبر 2010

Sync iPhone on Two Computers

Tip o’ the Week: Sync iPhone on Two Computers






I don’t know if you have tried this (I have), but if you attempt to sync your iPhone with any computer other than the one you originally synced with your iPhone, you will receive a warning that your iPhone is “synced with another iTunes library.” Your only choice at this point is to “Cancel” the operation or “Erase and Sync” because your iPhone can only be synced to one iTunes library at a time. Or CAN it?



Thanks to a set of most excellent instructions from the Shiny Things blog of Andrew Grant located here, you can sync your iPhone with one or more additional computers. Read on to learn more!



As I said before, Andrew Grant has posted excellent instructions to sync your iPhone with computers other than your original. Rather than go into repeating all the details of this method, I will instead provide an overview of the steps that Andrew has put together and refer you to his blog for the detailed, play-by-play so you can do this yourself!







In order to sync to more than one computer, there are some needed modifications to iTunes that will then let you sync different data on your iPhone with more than one computer. For example, you may want to sync contacts and calendar items on your work machine, but sync all your media (songs, podcasts, movies, etc.) on your home computer.



According to Andrew Grant (thanks for your hard work on this, Andrew!), the first thing you want to do is backup “iTunes Music Library.xml” and “iTunes Music Library” (Tunes Music Library.itl on a PC) to a safe location on the computer you want to sync with. You will modify these files so you can safely sync with this computer.



On the computer you currently sync your iPhone with, find your iTunes Library ID. Andrew has posted instructions on how this is done. The idea here is that you want your second machine to have the same iTunes Library ID that the original has so your iPhone won’t know the difference. Again, this process is explained in detail by Andrew.



Once you have followed all of Andrew’s instructions, you should be able to plug your iPhone into the second machine, select “Manually manage music and videos”, you will NOT be prompted to erase any data, and you are ready to roll! Again, special thanks to Andrew Grant for posting this handy tip on his blog. Make sure you go to his blog and follow the steps precisely.



That’s it for this week’s Tip. If you have a tip of your own that you would like to share with the rest of us, please leave a Comment or you can email me at: brian.hart@tipb.com.

Disclaimer: Tip o’ the Week makes no guarantee, express or implied, that any tip found herein will be new or particularly useful to the reader (and please remember that any time you are being sneaky with your iPhone and syncing, you do so at your OWN risk!)

الأربعاء، 8 سبتمبر 2010

50 jquery plugins

Menu


1) LavaLamp









--------------------------------------------------------------------------------



2) jQuery Collapse -A plugin for jQuery to collapse content of div container.





--------------------------------------------------------------------------------



3) A Navigation Menu- Unordered List with anchors and nested lists, also demonstrates how to add a second level list.









--------------------------------------------------------------------------------



4) SuckerFish Style









--------------------------------------------------------------------------------



Tabs

5) jQuery UI Tabs / Tabs 3 – Simple jQuery based tab-navigation









--------------------------------------------------------------------------------



6) TabContainer Theme – JQuery style fade animation that runs as the user navigates between selected tabs.









--------------------------------------------------------------------------------



Accordion

7 ) jQuery Accordion



Demo







--------------------------------------------------------------------------------



8) Simple JQuery Accordion menu









--------------------------------------------------------------------------------



SlideShows

9) jQZoom- allows you to realize a small magnifier window close to the image or images on your web page easily.









--------------------------------------------------------------------------------



10) Image/Photo Gallery Viewer- allows you to take a grouping of images and turn it into an flash-like image/photo gallery. It allows you to style it how ever you want and add as many images at you want.









--------------------------------------------------------------------------------



Transition Effects

11) InnerFade – It’s designed to fade you any element inside a container in and out.









--------------------------------------------------------------------------------



12) Easing Plugin- A jQuery plugin from GSGD to give advanced easing options. Uses Robert Penners easing equations for the transitions





--------------------------------------------------------------------------------



13) Highlight Fade





--------------------------------------------------------------------------------



14) jQuery Cycle Plugin- have very intersting transition effects like image cross-fading and cycling.









--------------------------------------------------------------------------------



jQuery Carousel

15) Riding carousels with jQuery – is a jQuery plugin for controlling a list of items in horizontal or vertical order.



Demo :







--------------------------------------------------------------------------------



Color Picker

16) Farbtastic – is a jQuery plug-in that can add one or more color picker widgets into a page through JavaScript.



Demo :







--------------------------------------------------------------------------------



17) jQuery Color Picker





--------------------------------------------------------------------------------



LightBox

18) jQuery ThickBox – is a webpage user interface dialog widget written in JavaScript.



Demo :







--------------------------------------------------------------------------------



19) SimpleModal Demos – its goal is providing developers with a cross-browser overlay and container that will be populated with content provided to SimpleModal.



Demo :







--------------------------------------------------------------------------------



20) jQuery lightBox Plugin – simple, elegant, unobtrusive, no need extra markup and is used to overlay images on the current page through the power and flexibility of jQuery´s selector.



Demo :







--------------------------------------------------------------------------------



iframe

21) JQuery iFrame Plugin – If javascript is turned off, it will just show a link to the content. Here is the code in action…









--------------------------------------------------------------------------------



Form Validation

22) Validation – A fairly comprehensive set of form validation rules. The plugin also dynamically creates IDs and ties them to labels when they are missing.



Demo :







--------------------------------------------------------------------------------



23) Ajax Form Validation – Client side validation in a form using jQuery. The username will check with the server whether the chosen name is a) valid and b) available.



Demo :







--------------------------------------------------------------------------------



24) jQuery AlphaNumeric – Allows you to prevent your users from entering certain characters inside the form fields.









--------------------------------------------------------------------------------



Form Elements







--------------------------------------------------------------------------------



25) jquery.Combobox – is an unobtrusive way of creating a HTML type combobox from a existing HTML Select element(s), a Demo is here.





--------------------------------------------------------------------------------



26) jQuery Checkbox – Provides for the styling of checkboxes that degrades nicely when javascript is dsiabled.





--------------------------------------------------------------------------------



27) File Style Plugin for jQuery -File Style plugin enables you to use image as browse button. You can also style filename field as normal textfield using css.





--------------------------------------------------------------------------------



Star Rating







--------------------------------------------------------------------------------



28) Simple Star Rating System



29)Half-Star Rating Plugin





--------------------------------------------------------------------------------



ToolTips

30) Tooltip Plugin Examples – A fancy tooltip with some custom positioning, a tooltip with an extra class for nice shadows, and some extra content. You can find a demo here.





--------------------------------------------------------------------------------



31) The jQuery Tooltip







Tables Plugins

32) Zebra Tables Demo -using jQuery to do zebra striping and row hovering, very NICE!!



Demo :







--------------------------------------------------------------------------------



33) Table Sorter Plugin - for turning a standard HTML table with THEAD and TBODY tags into a sortable table without page refreshes. It can successfully parse and sort many types of data including linked data in a cell.









--------------------------------------------------------------------------------



34) AutoScroll for jQuery -allows for hotspot scrolling of web pages









--------------------------------------------------------------------------------



35) Scrollable HTML table plugin- used to convert tables in ordinary HTML into scrollable ones. No additional coding is necessary.



Demo :





Draggable Droppables And Selectables

36) Sortables - You won’t believe how easy this code to make it easy to sort several lists, mix and match the lists, and send the information to a database.









--------------------------------------------------------------------------------



37) Draggables and droppables- A good example of using jQuery plugin iDrop to drag and drop tree view nodes.









--------------------------------------------------------------------------------



Style Switcher

38) Switch stylesheets with jQuery- allows your visitors to choose which stylesheet they would like to view your site with. It uses cookies so that when they return to the site or visit a different page they still get their chosen stylesheet. A Demo is here.





--------------------------------------------------------------------------------



Rounded Corners

39) jQuery Corner Demo









--------------------------------------------------------------------------------



40) JQuery Curvy Corners- A plugin for rounded corners with smooth, anti-aliased corners.









--------------------------------------------------------------------------------



Must See jQuery Examples

41) jQuery Air – A passenger management interface for charter flights. A great Tutorial that you will enjoy.



Demo :







--------------------------------------------------------------------------------



42) HeatColor -allows you to assign colors to elements, based on a value derived from that element. The derived value is compared to a range of values, it can find the min and max values of the desired elements, or you can pass them in manually.



Demo :







--------------------------------------------------------------------------------



43) Simple jQuery Examples -This page contains a growing set of Query powered script examples in "pagemod" format. The code that is displayed when clicking "Source" is exactly the same Javascript code that powers each example. Feel free to save a copy of this page and use the example.





--------------------------------------------------------------------------------



44) Date Picker -A flexible unobtrusive calendar component for jQuery.



Demo :







--------------------------------------------------------------------------------



45) ScrollTo -A plugin for jQuery to scroll to a certain object in the page





--------------------------------------------------------------------------------



46) 3-Column Splitter Layout -this is a 3-column layout using nested splitters. The left and right columns are a semi-fixed width; the center column grows or shrinks. Page scroll bars have been removed since all the content is inside the splitter, and the splitter is anchored to the bottom of the window using an onresize event handler.









--------------------------------------------------------------------------------



47) Pager jQuery -Neat little jQuery plugin for a a paginated effect.









--------------------------------------------------------------------------------



48) Select box manipulation





--------------------------------------------------------------------------------



49) Cookie Plugin for jQuery



50) JQuery BlockUI Plugin -lets you simulate synchronous behavior when using AJAX, without locking the browser. When activated, it will prevent user activity with the page (or part of the page) until it is deactivated. BlockUI adds elements to the DOM to give it both the appearance and behavior of blocking user interaction.





الثلاثاء، 7 سبتمبر 2010

Learn The Secret Trick To Get All Your Pages Indexed Into Yahoo - Blog And Ping

As a new webmaster, you might have waited and waited for your website to be indexed by the search engines. Maybe Google or Yahoo's spider came by your website once or twice, indexed your main page but never did a "deep crawl", which means visiting and indexing the rest of your website's pages. Believe it or not, this is what usually happens to websites within the first month of being online.


What if you had hundreds of fresh content pages just lying around on your website, all linked properly through your top-down menu structure, and had a picture perfect site map, but you still had to wait for the search engine spiders to find your website important enough to fully index your entire website.







What if I told you that there is a new technique that could literally force the Yahoo spider to index your new pages, and even your whole website, almost immediately? Folks, we're talking in less than 2 hours!



This is something that many people in the Internet Marketing and Search Engine crowd have been talking about as of late, and it's called the "blog and ping technique"



Blogging, like I told you in an earlier issue, has become an important tool for new businesses looking to get their websites indexed quickly in search engines. You can easily use your blog as a content management tool and benefit from the added importance that search engines give to blogs.



But now, you can flip that around and use your blog to drive search engine spiders to your website at will!





What is the Blog and Ping technique?



Here's how the whole “blog and ping” routine works:



First, let's say you've just added some new content to your website (created a new web page) OR you've created an entirely new website that hasn't been indexed by the search engines yet.



Now, in order for the search engines to rank your new web page or website, you need them to visit your new page. How do you do this? Well, you could go out and get other websites to link directly to this page. Depending on the Page Rank of your website, you could wait a few days and hope that the search engines would eventually crawl your site and end up at your new page... OR you could use the blog and ping technique to get your new page crawled in a few hours!



Ok, in order to use the blog and ping technique, you need to create a blog, as I taught you in an earlier lesson . It's free and only takes a few minutes to do.



Search engine spiders love blog content – it's fresh, regularly updated and is the best online community tool around.



Since the “blog and ping” technique involves the Yahoo search engine spider, let's look at how you can alert the Yahoo spider to come visit your blog.



The easiest way to attract the Yahoo spider to your blog is to:



Create a My Yahoo account

Add your blog as content on your personalized Yahoo page (don't worry, I'll explain all this later on). In simple terms, this means that there is a link within the My Yahoo website (on your personalized page) which you will point to your blog.

Once you've done this, Yahoo gives you the option to notify them that you've added new content to your blog. This is called "pinging". When you "ping" Yahoo, they will quickly visit your blog and follow all links from your blog page. Thus indexing whatever pages you have a link pointing to!



Now that you can bring the Yahoo search engine spider to your blog at will, it's time to take this technique a bit further and use your blog as a launching pad for the Yahoo spider to index your website or any pages that you want.



All you need to do is to post new entries in your blogs containing links to the pages that you want indexed into your blog. That way, when the Yahoo spider reaches your blog and sees the new post, it will automatically follow the links in that post, and index any page that you want it to index!



Steps to daily indexing



Start a blog

Create a Yahoo account

Add your blog's RSS feed into your My Yahoo account

Make a few posts in your blog

Ping Yahoo

Repeat



Let's look at each step, one by one.





Step 1: Start a blog



This is really easy to do, and I've covered this in a previous lesson. The idea is to use a free blog service such as Blogger (owned by Google) to quickly set up your new blog – it takes under 10 minutes.



If you already have your own blog (either through Blogger or any other blogging service), then you're all set.



Either way, on to step 2.





Step 2: Create a Yahoo account



You most likely will have a Yahoo account. If you don't, then use the following link:



Sign up with Yahoo!







This is the same ‘regulation' sign up form/procedure that you see on most online services. Once you've signed up, you will have a Yahoo username and password. Note that down somewhere (e.g. in a text file on your PC) because you'll need that information in the next step.





Step 3: Configure My Yahoo



Yahoo's personalized portal is called My Yahoo and is ridiculously easy to use. You access it by going to the My Yahoo page, and then signing in to your Yahoo account from the box on the left (see screenshot below). Use the username and password you got from the previous step.







Signed in? Great. Now let's go back to your blog. If you remember from the start of this lesson, the idea is to use your blog's RSS feed and add it to your My Yahoo page. My Yahoo works as an advanced RSS reader by aggregating different content feeds (of your choice) on the same page. If you want to add more content to your My Yahoo page, you do it by either selecting content from the Yahoo directory or by adding an RSS feed directly through a URL.



Anyway, how it works is not important if you didn't understand that. The important thing to know is you need to add your blog's RSS feed to your Yahoo page. This is basically just a "special link" to let Yahoo know where your blog is located, so they know where to go. To do this, follow these steps:





Sign in to your Blogger account.







You'll notice my username is "bradstestblog"



Select your blog from the Blogger Dashboard.







My blog is called "Brad's Test Blog"



Go to Settings (2nd tab from the left).







Select Site Feed from the sub-menu tabs (6th tab from the left).







Find the Site Feed URL on the page and either copy it or write it down somewhere.







Go back to your My Yahoo page. Login to your account and...







Select ‘Add Content' (It's located on the left middle portion of the page).









Select ‘Add RSS by URL' – right next to the ‘Find Content' search box.









Paste the copied RSS URL into the box and press Add









Click the “Add to My Yahoo” button on the next page.







Once this is done, you can return to your My Yahoo page and if you scroll down, you'll see that your blog's feed is now added to the page.



Post on your Blog



After you've added your blog's feed to your Yahoo page, it's time to get to the real meat of the action.



Remember, this is supposed to get your website indexed by the Yahoo spider as quickly as possible .



So in your blog, when you are making your first post, include a link to your website . If your website is already indexed and you're looking to get new pages indexed , you can include them in the post as well.



As a rule of thumb, don't stuff 10 or 20 links into one post. That could trigger spam filters and make life a lot worse for your website. Instead, stick to 4 or 5 links per post. Keep relevant anchor text (these are links, after all), and use some descriptive content around your links (one more reason to keep the number of links limited).



While this strategy will guarantee quick indexing of your website through Yahoo, it does not require that you ignore good SEO practices or do something that will possibly mark your website / blog out as spam.





Ping Yahoo



Ok, so now that you've made your post and put up links to your website, all that's left to do is to “Ping Yahoo”, which will basically tell Yahoo that there's a new blog post on your blog, and that the Yahoo spider should come check it out.



Like I told you in the beginning, once the spider comes to your blog, it will see the new blog post, follow the links to your website and start indexing your pages!



So how do you ping Yahoo? You can use the following web address:



http://api.my.yahoo.com/rss/ping?u=[your blog address]



where the text after “ping?u” is in fact your blog's web address. So if your blog was at http://bradstestblog.blogspot.com , the ping URL will then read:



http://api.my.yahoo.com/rss/ping?u=[http://bradstestblog.blogspot.com]



Just copy and paste the URL (complete with your blog's web address at the end) into your browser and click Go (or press Enter). This will automatically ping the My Yahoo page containing your blog's RSS Feed, and this essentially tells the Yahoo spider that it needs to visit the blog to update the content in its index.





Repeat



That's it! You can use this “blog and ping” tactic to literally transform your website from an ignored mess of thousands and thousands of pages into a hub that search engines visit every single day.



In closing...



It's good to know how the basics of the "blog and ping" technique work, but if you're lazy like you me you might want to check out the software product I use to do this, because it automates all of this for you. You basically just plug a link to your blog into the software. Click "go" and the software takes care of "blogging and pinging" all of your website's pages so there's no need to manually do all the steps above. And usually within 1-2 days all of my webpages have been indexed by Yahoo. It's a pretty slick little idea really, and quite frankly, I wish I would have came up with the idea myself because I know an aweful lot of people find it very useful.



The tool I'm talking about is called "Blogging Equalizer". It's a simple little program, but automates things very well.



That wraps up this lesson. Hope you've found it enlightening and start to use this technique to get your new websites indexed quickly. It works really well if done correctly.

الاثنين، 6 سبتمبر 2010

SWFUpload jQuery Plugin رفع الملفات بواسطة الجى قيورى

SWFUpload jQuery Plugin
When I first stumbled across SWFUpload about two years ago I was impressed by how easy it was to implement. However, their example code has always bugged me as being rather crap, having to assign a separate global event handler for each event, and the lack of multiple handlers for a single event.

Using jQuery (the solution to all things painful), I've written a plugin to create a real event dispatcher for SWFUpload without modifying the SWFUpload core!


The SWFUpload jQuery Plugin
This plugin makes working with SWFUpload easier!

Get straight to the source code at my SWFUpload jQuery Plugin repository on GitHub.

And the benefits are...
■Native jQuery event handling using .bind()
■Ability to assign multiple callbacks per event
■Makes multiple SWFUpload instances on a single page easier to manage
■Ability to completely separate SWFUpload object from UI code (callbacks)
■Assign event handlers before SWFUpload instance is even created!
■No global functions or variables needed!
■A nice, chainable solution!
Live Examples
Here are some live examples you can pull apart. Although the UI is not pretty, it demonstrates how you listen to events, and from there you can create whatever UI you want.

Although these examples upload to a PHP script on my server, the uploaded files are not saved.

■Single Uploader
■Multiple Uploaders
How do I use it?
If you know how to use SWFUpload already, the following should be fairly easy to consume.


$(function(){

$('.swfupload-control').swfupload({
// Backend Settings
upload_url: "../upload.php", // Relative to the SWF file (or you can use absolute paths)

// File Upload Settings
file_size_limit : "102400", // 100MB
file_types : "*.*",
file_types_description : "All Files",
file_upload_limit : "10",
file_queue_limit : "0",

// Button Settings
button_image_url : "../multiinstancedemo/XPButtonUploadText_61x22.png", // Relative to the SWF file
button_placeholder_id : "spanButtonPlaceholder",
button_width: 61,
button_height: 22,

// Flash Settings
flash_url : "../swfupload/swfupload.swf"

});


// assign our event handlers
$('.swfupload-control')
.bind('fileQueued', function(event, file){
// start the upload once a file is queued
$(this).swfupload('startUpload');
})
.bind('uploadComplete', function(event, file){
alert('Upload completed - '+file.name+'!');
// start the upload (if more queued) once an upload is complete
$(this).swfupload('startUpload');
});

});


How does it work?
Rather than creating a SWFUpload instance and assigning handlers directly, it associates the SWFUpload instance with an element in the DOM, and all events handlers are bound to that DOM element.

Calling methods on the SWFUpload instance
The following code will execute the startUpload method on all SWFUpload instances that exist within the selector .your-swfupload-control.


$('.your-swfupload-control').swfupload('startUpload');
Getting properties on the SWFUpload instance
Sometimes you just need to get at the SWFUpload instance... easy!


var swfu = $.swfupload.getInstance('.some-selector-for-your-control');
alert(swfu.settings.custom_settings.your_custom_setting);
Additional event handlers
Due to the way SWFUpload works, all event names must be defined before the SWFUpload instance is created. This means if you are using any plugins that define additional events, you'll need to add them to the handler list before the SWFUpload instance is created.


$.swfupload.additionalHandlers('some_plugin_handler');

The source code
If you missed it the first time, you can download all the source code including all support files and example files from my SWFUpload jQuery Plugin repository on GitHub.

Enjoy!


رابط الموضوع : http://github.com/ifunk/swfupload-jquery-plugin/tree/master