class mw_data_thumbs extends mw_data{
- function mw_thumbs_activated(){
+ public function mw_thumbs_activated(){
return true;
}
- function img_thumb($src, $max_width, $max_height, $thumbs_dir = "", $background_color = array(255, 255, 255), $CROP = false){
+ public function img_thumb($src, $max_width, $max_height, $thumbs_dir = "", $background_color = array(255, 255, 255), $CROP = false){
if(strlen($thumbs_dir) > 0){
if(!@is_dir($thumbs_dir)) @mkdir($thumbs_dir);
if(!@is_dir($thumbs_dir)) return false;
return $thumb;
}
- function make_thumb(
+ public function make_thumb(
$src,
$max_width,
$max_height,
return false;
}
- function new_thumb_file_name($dest, $file_name, $prefix = "img_"){
+ public function new_thumb_file_name($dest, $file_name, $prefix = "img_"){
$dest .= strlen($dest) > 0 && substr($dest, -1) != "/" ? "/" : "";
if(is_dir($dest)){
$ext = "";
}
}
-
-?>
\ No newline at end of file
class mw_thumbs extends mw_plugin{
- function title(){
+ public function title(){
return "Thumbs";
}
- function description(){
+ public function description(){
return "Un générateur de miniatures";
}
- function install($env){
+ public function install($env){
if(
$env->bdd("sgbd") == "mysql"
|| $env->bdd("sgbd") == "pdo_mysql"
return true;
}
- function install_mysql($env){
+ public function install_mysql($env){
$data = $env->data();
$sgbd = $data->sgbd();
try{
return true;
}
- function install_sqlite($env){
+ public function install_sqlite($env){
$data = $env->data();
$sgbd = $data->sgbd();
try{
return true;
}
- function install_xml($env){
+ public function install_xml($env){
$data = $env->data();
$sgbd = $data->sgbd();
$EXISTS = $sgbd->data_exists("thumbs");
else return $this->uninstall_sql($env);
}
- function uninstall_xml($env){
+ public function uninstall_xml($env){
$data = $env->data();
$sgbd = $data->sgbd();
if(!$this->disable($env)) return "impossible de desactiver le plugin";
return true;
}
- function uninstall_sql($env){
+ public function uninstall_sql($env){
$data = $env->data();
$sgbd = $data->sgbd();
if(!$this->disable($env)) return "impossible de desactiver le plugin";