mercredi 21 janvier 2009

Preview image plugin avec l'action hover

/**
* Ce plugin permet d'afficher l'image passer en rel
*/


this.screenshotPreview = function(){
/* CONFIG */

xOffset = 10;
yOffset = 30;

// these 2 variable determine popup's distance from the cursor
// you might want to adjust to get the right result

/* END CONFIG */
$("a.screenshot").hover(function(e){
this.t = this.title;
this.title = "";
var c = (this.t != "") ? "
" + this.t : "";
$("body").append("

"+ c +"

");
$("#screenshot")
.css("top",(e.pageY - xOffset) + "px")
.css("left",(e.pageX + yOffset) + "px")
.fadeIn("fast");
},
function(){
this.title = this.t;
$("#screenshot").remove();
});
$("a.screenshot").mousemove(function(e){
$("#screenshot")
.css("top",(e.pageY - xOffset) + "px")
.css("left",(e.pageX + yOffset) + "px");
});
};


// starting the script on page load
$(document).ready(function(){
screenshotPreview();
});

vous trouverez d'autre fonction javascript util sur le forum shoops.fr

mercredi 14 janvier 2009

PHP strtolower - Plugin smarty

Ce plugin smarty transformer la chaine de caractère encodé UTF-8 en minuscule


function smarty_modifier_lower_utf8($inputString)
{
$outputString = utf8_decode($inputString);
$outputString = strtolower($outputString);
$outputString = utf8_encode($outputString);
return $outputString;
}

Si vous avez des difficulté ou d'autre question au sujet de smarty, vous pouvez poster vos question sur le Forum Shoops.fr dans la rubrique informatique / smarty