10/08/2015 by Dux / not rated
There are many solutions and scripts for drag and drop upload. Here is a very simple solution using the native drag and drop of the modern browsers type file input.
It is also compatible with browsers that do not support drag and drop as smartphone because it uses conventional HTML forms input.
Tested with Safari, Chrome, Firefox last...
10/02/2014 by Dux / not rated
Images are displayed only when they are in the visible area of the window (lazy loading). The code work with the page scrolling. You dont need to modify your HTML code. You can replace the favicon.gif by a blank gif/png.
09/17/2014 by Dux / not rated
Little function to display past dates with a natural human language as on iphone based messages.
It can write dates :
now, 5mn ago, today at 12:18, yesterday at 08:20, monday at 21:12, 3 november at 12:18 (modify function for english users), 24 december 2013 at 23:59
05/25/2011 by Dux / 4.6/5 (132 ratings)
CSS3 allows the function of "scaling"(or zoom) on an HTML element. In the example below, the scale is assigned to the pseudo class : hover.
transition: (transition-property) (transition-duration in secondes) (transition-timing-function)
• transition-property : all, css property
• transition-duration : timing...
02/02/2012 by Dux / 5/5 (1 ratings)
This PHP GD class offers several useful features. It resizes images, apply a rounded mask with various options :
• output size
• crop mode : crop to fill, fill to fit
• rounded corners or square
• color of the rounded mask
It is complete and usable in all cases.
This class use the PNG mask round_440.png
01/27/2012 by Dux / 5/5 (1 ratings)
Here is a simple method using htaccess to turn an URL www.yoursite.com/keyword to a search results page. Htaccess code obviously not include the search engine. It only transmits the variable q to be treated by your internal search engine.
Elegant and efficient solution to capture a indexing bot a on keyword page.
If your data is in MySQL...
01/13/2012 by Dux / 5/5 (3 ratings)
This script applies a watermark on a JPG, GIF or PNG image. The watermark comes from a 24-bit PNG that preserve empty areas around the logo. I recommend Photoshop to make it.
This is the only script that changes the opacity of an image before pasting to another. For indeed, PHP5 and GD2 library does not own filter opacity.
Operation is simple....
09/15/2011 by Dux / 4/5 (1 ratings)
Here are two methods to center CSS DIV blocks inside the page or parent element.
The first method uses absolute positioning wich does not consider the position of other page elements. It is recommended for a rapid implementation of a correctly set graphical template.
The second method uses a div to wedge the second DIV in height. The horizontal...
09/12/2011 by Dux / 4.2/5 (37 ratings)
• The container div has overflow:hidden and a fixed height and width.
• Its ID has to be recalled in the scrolldiv() function calls. This allows the multiple use of this function on the same page.
09/09/2011 by Dux / 4.9/5 (8 ratings)
In the example below the onmouseout is used to refresh the source of the audio file.
In addition to the preload attribute, you can use in the same...