xoops forums

Forum Index


Board index » All Posts (urbanspacema)




urbanspacema

Quite a regular
Posted on: 2009/9/7 22:18
urbanspacema
urbanspacema (Show more)
Quite a regular
Posts: 276
Since: 2004/9/19
#11

Re: Is XOOPS a suitable CMS for this application?

in future versions of XOOPS multiple languages will be included by default?


urbanspacema

Quite a regular
Posted on: 2009/9/7 21:39
urbanspacema
urbanspacema (Show more)
Quite a regular
Posts: 276
Since: 2004/9/19
#12

Re: xSSiM - A xoops Super Simple image Manager

looks promising! compliments


urbanspacema

Quite a regular
Posted on: 2009/9/6 22:23
urbanspacema
urbanspacema (Show more)
Quite a regular
Posts: 276
Since: 2004/9/19
#13

Re: debaser 3.01 pre-alpha

Quote:
Unfortunately I am FORCED to release a pre-alpha of debaser 3.01, because a user from here - axel or so was his/her name - wanted to bring me to court and bring me to action for damages.


Really? There was some infringes of copyright?


urbanspacema

Quite a regular
Posted on: 2009/9/4 16:22
urbanspacema
urbanspacema (Show more)
Quite a regular
Posts: 276
Since: 2004/9/19
#14

Re: some doubt during development

in the template this
<{$b.birthday_date|date_format:"%A %e %B %Y"}>

b.birthday_date is in timestamp.


urbanspacema

Quite a regular
Posted on: 2009/9/4 14:37
urbanspacema
urbanspacema (Show more)
Quite a regular
Posts: 276
Since: 2004/9/19
#15

Re: Thumbnail creation after/during upload

ok i solved and sharing the code.

the functions
function timemachine_createthumb($name$path$savepath$new_w=100$new_h=100$quality=80){

    
$savefile $savepath.$name;
    
$savepath $savefile;
    
    if(!
file_exists($savepath)){
        
            
// Get image location
            
$image_path $path ."/".$name;
            
            
// Load image
            
$img null;
            
$ext end(explode('.'$image_path));
            if (
$ext == 'jpg' || $ext == 'jpeg') {
                
$img = @imagecreatefromjpeg($image_path);
            } else if (
$ext == 'png') {
                
$img = @imagecreatefrompng($image_path);
            
// Only if your version of GD includes GIF support
            
} else if ($ext == 'gif') {
                
$img = @imagecreatefrompng($image_path);
            }
            
            
// If an image was successfully loaded, test the image for size
            
if ($img) {
            
                
// Get image size and scale ratio
                
$width imagesx($img);
                
$height imagesy($img);
                
$scale min($new_w/$width$new_h/$height);
            
                
// If the image is larger than the max shrink it
                
if ($scale 1) {
                    
$new_width floor($scale*$width);
                    
$new_height floor($scale*$height);
            
                    
// Create a new temporary image
                    
$tmp_img imagecreatetruecolor($new_width$new_height);
            
                    
// Copy and resize old image into new image
                    
imagecopyresized($tmp_img$img0000,
                                     
$new_width$new_height$width$height);
                    
imagedestroy($img);
                    
$img $tmp_img;
                }
            }
            
            
// Create error image if necessary
            
if (!$img) {
                
$img imagecreate($new_w$new_h);
                
imagecolorallocate($img,0,0,0);
                
$c imagecolorallocate($img,70,70,70);
                
imageline($img,0,0,$new_w,$new_h,$c2);
                
imageline($img,$new_w,0,0,$new_h,$c2);
            }
    
            
            
// output the image as a file to the output stream

            
Imagejpeg($img,$savepath,$quality);

    }
    return 
$savefile;
}


the upload
//Form birthday_img    
        
include_once XOOPS_ROOT_PATH."/class/uploader.php";
        
$uploaddir_birthday_img XOOPS_ROOT_PATH."/uploads/timemachine/birthday/birthday_img/";
        
$uploaddir_birthday_thumbs_img XOOPS_ROOT_PATH."/uploads/timemachine/birthday/birthday_thumbs_img/";
        
$uploader_birthday_img = new XoopsMediaUploader($uploaddir_birthday_img$xoopsModuleConfig["birthday_img_mimetypes"], $xoopsModuleConfig["birthday_img_size"], nullnull);

        if (
$uploader_birthday_img->fetchMedia("birthday_img")) {
            
$uploader_birthday_img->setPrefix(str_replace(" ","_",$_REQUEST["birthday_who"]));
            
$uploader_birthday_img->fetchMedia("birthday_img");
            if (!
$uploader_birthday_img->upload()) {
                
$errors $uploader_birthday_img->getErrors();
                
redirect_header("javascript:history.go(-1)",3$errors);
            } else {
                
$obj->setVar("birthday_img"$uploader_birthday_img->getSavedFileName());
                
                
//genero la thumbnail
                
$name $uploader_birthday_img->getSavedFileName();
                
$path $uploaddir_birthday_img;
                
$savepath =$uploaddir_birthday_thumbs_img;
                
                
$new_w $xoopsModuleConfig["birthday_img_thumb_width"];
                
$new_h $xoopsModuleConfig["birthday_img_thumb_height"];
                
$thumb timemachine_createthumb($name$path$savepath$new_w$new_h$quality=80);
            }


note
$xoopsModuleConfig["birthday_img_thumb_width"] and other, are in my module preferences.


urbanspacema

Quite a regular
Posted on: 2009/9/4 14:35
urbanspacema
urbanspacema (Show more)
Quite a regular
Posts: 276
Since: 2004/9/19
#16

some doubt during development

Hello.
I have 2 qeustion for module development.

1. my XOOPS development installation is set to italian language but my module show date in english (day name and month name.

There is a issue with setlocal?

2. I use jquery in theme.html, I need to use jquery also in the module but the call in theme.html don't work. Now i have added a call in mytemplate.html, it works but stop the jquery in the theme.html

there is a way to make both working?

tnx


urbanspacema

Quite a regular
Posted on: 2009/9/3 9:21
urbanspacema
urbanspacema (Show more)
Quite a regular
Posts: 276
Since: 2004/9/19
#17

Re: 1step registration

tnx Ghia


urbanspacema

Quite a regular
Posted on: 2009/9/2 16:35
urbanspacema
urbanspacema (Show more)
Quite a regular
Posts: 276
Since: 2004/9/19
#18

Thumbnail creation after/during upload

Ciao, there is a function in XOOPS 2.3.3 for making a thumbnail from uploaded image?

if no, this code is always valid?
http://dev.xoops.org/modules/xfsnippe ... type=snippet&snippet_id=1

tnx
Urban


urbanspacema

Quite a regular
Posted on: 2009/9/2 15:02
urbanspacema
urbanspacema (Show more)
Quite a regular
Posts: 276
Since: 2004/9/19
#19

Re: 1step registration

anyone?


urbanspacema

Quite a regular
Posted on: 2009/9/1 20:26
urbanspacema
urbanspacema (Show more)
Quite a regular
Posts: 276
Since: 2004/9/19
#20

Re: how to use xoopstree for creating categories and subcategoires

hello I am just beginning with the development but you can look at my xsitemap module maybe can help you.



TopTop
« 1 (2) 3 4 5 ... 19 »