• Signature image v2.3 5 0 5 1
Currently:  

Author Topic: Signature image v2.3  (Read 618830 times)

0 Members and 1 Guest are viewing this topic.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Signature image v2.3
« on: March 15, 2005, 02:54:39 AM »
This code will alow u show your gallery statistics anywhere on the web as a dynamicaly generated image

Before you start, please note, that this script is required GD v2.x and it doesnt support any other graphic modules such as ImageMagic or NetPBM!



Step 1
Create signature.php with this code inside:
Code: [Select]
<?php
##################################
#   signature.php version 2.3    #
# - - - - - - - - - - - - - - - -#
# Copyright © V@no 2004-ETERNiTY #
##################################
#                                #
#         TERMS OF USE           #
#                                #
#    NO PORNOGRAPHY OR ANY       #
#    OTHER PICTURES THAT COULD   #
#    BE TREATED AS OFFENSIVE     #
#    MAY BE SHOWED ON 4IMAGES    #
#    FORUM OR ANYWHERE ELSE      #
#    WHERE ITS NOT ACCEPTIBLE.   #
#                                #
#     PLEASE RESPECT OTHERS!     #
#                                #
##################################

// ------- Config -----------
$random_image 1//show random image
$random_fast 1//if your mysql account doesn't have permission to create/delete temporary tables, set this to 0
$debug 0//turning this on, will ignore expiration time, meaning every request will create a new image. change this to 0 before u publish your signature!
$expire 20//seconds before image will be expired and recompilled with new random image and information (lower this will encrease server load!)
$type "png"//image type: png or jpeg
$quality "50"//image quality when used jpeg
define('ROOT_PATH''./'); //path to your 4images root dir with trailing slash! must be ralative ( ./ or ../ or combination of these) and NOT full internet or local (http://example/4images/ or /www/blah/4images/)
$signature_template_dir "./signatures/"//directory with signature template images WITH TRAILING SLASH!!!
$signature_template "signature.png"//default signature template image filename
$signature_template_random 1//use random template image? (0 = no | 1 = yes)
$path "/tmp/"// WRITEBLE dir (chmod 777), where compilled image will be stored (does not requere access from web)
$tmpfname $path."signature.tmp"// filename for the compilled image (extension does not metter)
$tmptname $path."signature.id"// filename for the file where some extra info will be stored in (image id)
$template "default"//name of the template which icons will be used, if thumbnail not found
$sitename "Statistics for my site"//signature header
$fonts_dir ""//directory with custom fonts WITH TRAILING SLASH! (leave blank if no fonts)
$fonts = array(); // an array with font names the first number is the number that u can use in $fsize variable, it must be sequenced! and first item must have number 6 or larger!
/*
//an example array:
$fonts = array(
               6  => "micross8px.gdf",
               7  => "micross9px.gdf",
               8  => "micross10px.gdf",
               9  => "micross12px.gdf"
);
*/
$fsize 2//font type (1 to 5 for build-in fonts and 6 to XX for your custom fonts (see $font array above)
$offset 7//offset from the left, right and bottom, uses for random image and the text (not used if random image disabled)
$offset2 99//extra offset from the left (place where random image will be embeded if its enabled. Not used if random image disabled)
$spacing 11//height of each line of text
$start 21//offset from top (space where header shows)
$tiny 9//an extra space at the begining of each line (needed for offset from the random image space)
$not_in_cat "0"//list of categories which should not be included for random image, separated by coma (i.e. "1,2,3,7") "0" - means disabled
$auth 0//permission level for auth_viewimage (0 = All, 2 = Members, 3 = Private or 9 = Admin) Refer in /includes/constants.php
$peruser 1//alow per user random image (images uploaded by XX user. Usage: signature.php?user=XX)
$noimage "jpeg.gif"//icon name if no random image was found
$new_cutoff 7//Days when images treated as new
$lang_images "Images: ";
$lang_users "Members: ";
$lang_cat "Categories: ";
$lang_new_user "Newest member: ";
$lang_online "Online: ";
$lang_comments "Comments: ";
// --------- End Config ----------

$peruser = ($peruser && isset($_GET['user']) && intval($_GET['user'])) ? intval($_GET['user']) : "";
$tmpfname .= $peruser;
$tmptname .= $peruser;
if (isset(
$_GET['go']) && $_GET['go'])
{
  if (
$handle = @fopen($tmptname"rb"))
  {
    while (!
feof($handle))
    {
      
$buffer fgets($handle4096);
      
$imgid intval($buffer);
    }
    
fclose($handle);
  }
  
$nozip 1;
  
define('GET_CACHES'1);
  include(
ROOT_PATH.'global.php');
  require(
ROOT_PATH.'includes/sessions.php');
  
$user_access get_permission();
  
$url $site_sess->url(ROOT_PATH."index.php""&");
  if (
$imgid && $random_image)
  {
    
$sql "SELECT cat_id
            FROM "
.IMAGES_TABLE."
            WHERE image_id = 
$imgid";
    if (
$row $site_db->query_firstrow($sql))
    {
      if (
check_permission("auth_viewcat"$row['cat_id']) || check_permission("auth_viewimage"$row['cat_id']))
      {
        
$url = (check_permission("auth_viewimage"$row['cat_id']) && check_permission("auth_viewcat"$row['cat_id'])) ? $site_sess->url(ROOT_PATH."details.php?image_id=".$imgid) : ((check_permission("auth_viewcat"$row['cat_id'])) ? $site_sess->url(ROOT_PATH."categories.php?cat_id=".$row['cat_id']) : $url);
      }
    }
  }
  if (!
function_exists("redirect"))
  {
    function 
redirect($url) {
      global 
$script_url$site_sess;
      if (
strpos($url'://') === false) {
        
$url $script_url.'/'.$url;
      }
      
$location = @preg_match('/Microsoft|WebSTAR|Xitami/'getenv('SERVER_SOFTWARE')) ? 'Refresh: 0; URL=' 'Location: ';
      if (
is_object($site_sess)) {
        
$url $site_sess->url($url"&");
      }
      
header($location.$url);
      exit;
    }
  }
  
redirect($url);
}
$imageid 0;
$time = @filemtime($tmpfname);
if (
$handle = @fopen($tmptname"r"))
{
  if (!
feof($handle))
  {
    
$buffer fgets($handle4096);
    
$imageid intval($buffer);
  }
  
fclose($handle);
}
$current_time time();
if (!
$time || (($current_time $time) > $expire || ($current_time $time) < 0) || $debug)
{
  
$show = array();
  include(
ROOT_PATH.'config.php');
  include(
ROOT_PATH.'includes/constants.php');
  include(
ROOT_PATH.'includes/db_mysql.php');
  
define('MEDIA_PATH'ROOT_PATH.MEDIA_DIR);
  
define('THUMB_PATH'ROOT_PATH.THUMB_DIR);
  
define('MEDIA_TEMP_PATH'ROOT_PATH.MEDIA_TEMP_DIR);
  
define('THUMB_TEMP_PATH'ROOT_PATH.THUMB_TEMP_DIR);
  
define('TEMPLATE_PATH'ROOT_PATH.TEMPLATE_DIR."/".$template);
  
define('ICON_PATH'ROOT_PATH.TEMPLATE_DIR."/".$template."/icons");
  include(
ROOT_PATH.'includes/functions.php');
  
$site_db = new Db($db_host$db_user$db_password$db_name);

// --- Random image -----
  
if ($random_image)
  {
    if (
$random_fast)
    {
      
mt_srand((double)microtime() * intval(session_id()));
      
$temptab "tab_".mt_rand(0,1000000);
      
$sql "CREATE TEMPORARY TABLE ".$temptab." TYPE  =  HEAP
              SELECT i.image_id, i.cat_id
              FROM "
.IMAGES_TABLE." i
              LEFT JOIN "
.CATEGORIES_TABLE." c ON c.cat_id = i.cat_id
              WHERE i.image_active = 1 AND c.auth_viewcat = 
$auth AND i.cat_id NOT IN ($not_in_cat)".(($peruser) ? " AND i.user_id = ".$peruser "").(($imageid) ? " AND i.image_id <> ".$imageid "")."
              ORDER  BY RAND()
              LIMIT 1"
;
      
$result $site_db->query($sql);
      
$sql "SELECT t.image_id, t.cat_id, i.user_id, i.image_name, i.image_media_file, i.image_thumb_file
              FROM "
.$temptab." AS t
              LEFT JOIN "
.IMAGES_TABLE." AS i ON i.image_id=t.image_id";
      
$imagedata $site_db->query_firstrow($sql);
      
$sql "DROP TABLE ".$temptab;
      
$result $site_db->query($sql);
    }
    else
    {
      
$sql "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_media_file, i.image_thumb_file
              FROM "
.IMAGES_TABLE." i
              LEFT JOIN "
.CATEGORIES_TABLE." c ON c.cat_id = i.cat_id
              WHERE i.image_active = 1 AND c.auth_viewcat = 
$auth AND i.cat_id NOT IN ($not_in_cat)".(($peruser) ? " AND i.user_id = ".$peruser "").(($imageid) ? " AND i.image_id <> ".$imageid "")."
              ORDER  BY RAND()
              LIMIT 1"
;
      
$imagedata $site_db->query_firstrow($sql);
    }
    if (empty(
$imagedata))
    {
      
$thumb ICON_PATH."/".$noimage;
    }
    elseif (!
get_file_path($imagedata['image_thumb_file'], "thumb"$imagedata['cat_id'], 00))
    {
      
$thumb ICON_PATH."/".get_file_extension($imagedata['image_media_file']).".gif";
    }
    else
    {
      
$thumb get_file_path($imagedata['image_thumb_file'], "thumb"$imagedata['cat_id'], 01);
    }
  }
  else
  {
    
$offset $offset2 0//no need any offset if random image disabled
  
}
// --- Total users -----
  
$sql "SELECT COUNT(*) AS total_users
          FROM "
.USERS_TABLE."
          WHERE user_level > "
.USER_AWAITING;
  
$row $site_db->query_firstrow($sql);
  
$show['total_users'] = $row['total_users'];

// --- Total not activated users -----
  
$sql "SELECT COUNT(*) AS total_users
          FROM "
.USERS_TABLE."
          WHERE user_level = "
.USER_AWAITING;
  
$row $site_db->query_firstrow($sql);
  
$show['total_users_awaiting'] = $row['total_users'];

// --- Lattest username -----
  
$sql "SELECT user_name
          FROM "
.USERS_TABLE."
          WHERE user_level > "
.USER_AWAITING."
          ORDER BY user_id DESC"
;
  
$row $site_db->query_firstrow($sql);
  
$show['new_user'] = stripslashes($row['user_name']);

// --- Total images -----
  
$sql "SELECT COUNT(*) AS total_images
          FROM "
.IMAGES_TABLE."
          WHERE image_active = 1"
;
  
$row $site_db->query_firstrow($sql);
  
$show['total_images'] = $row['total_images'];

// --- Total new images -----
  
$new_cutoff time() - 60 60 24 $new_cutoff;
  
$sql "SELECT COUNT(*) AS total_new_images
          FROM "
.IMAGES_TABLE."
          WHERE image_active = 1 AND image_date > "
.$new_cutoff;
  
$row $site_db->query_firstrow($sql);
  
$show['total_new_images'] = $row['total_new_images'];

// --- Total categories -----
  
$sql "SELECT COUNT(*) AS total_categories
          FROM "
.CATEGORIES_TABLE;
  
$row $site_db->query_firstrow($sql);
  
$show['total_categories'] = $row['total_categories'];

// --- Total comments -----
  
$sql "SELECT SUM(image_comments) AS sum
          FROM "
.IMAGES_TABLE;
  
$row $site_db->query_firstrow($sql);
  
$show['comments'] = $row['sum'];

// --- Online users -----
  
$time_out time() - 300;
  
$sql "SELECT session_user_id, session_ip
          FROM "
.SESSIONS_TABLE."
          WHERE session_lastaction >= 
$time_out";
  
$result $site_db->query($sql);
  
$show['guests_online'] = $show['reg_online'] = 0;
  while (
$row $site_db->fetch_array($result))
  {
    if (
$row['session_user_id'] != GUEST)
    {
      if (!isset(
$prev_user_ids[$row['session_user_id']]))
      {
        
$show['reg_online']++;
      }
      
$prev_user_ids[$row['session_user_id']] = 1;
    }
    else
    {
      if (!isset(
$prev_session_ips[$row['session_ip']]))
      {
        
$show['guests_online']++;
      }
    }
    
$prev_session_ips[$row['session_ip']] = 1;
  }
//-----------------------

  
if (!empty($fonts_dir) && count($fonts))
  {
    foreach (
$fonts as $key => $val)
    {
      
imageloadfont($fonts_dir.$val);
    }
  }
  
$total_online $show['reg_online'] + $show['guests_online'];
  
$online " (".$show['reg_online']." member".(($show['reg_online'] > || !$show['reg_online'])? "s" "")." and ".$show['guests_online']." guest".(($show['guests_online'] > || !$show['guests_online'])? "s" "").")";
  
$far $offset2+$tiny+(strlen($lang_new_user))*($fsize+4);
  
//array with data:
  //[0] - font type
  //[1] - offset
  //[2] - text
  //[3] - color (i.e. "text_color" will use $text_color variable)
  
$stats = array(
                  array(array(
$fsize$offset2+$tiny$lang_images"text_color"), array($fsize$far$show['total_images']." (".$show['total_new_images']." new)""text_color")),
                  array(array(
$fsize$offset2+$tiny$lang_cat"text_color"), array($fsize$far$show['total_categories'], "text_color")),
                  array(array(
$fsize$offset2+$tiny$lang_comments"text_color"), array($fsize$far$show['comments'], "text_color")),
                  array(array(
$fsize$offset2+$tiny$lang_users"text_color"), array($fsize$far$show['total_users'], "text_color"), array($fsize$far+strlen($show['total_users'])*($fsize+4), " and ".$show['total_users_awaiting']." not activated""text_color")),
                  array(array(
$fsize$offset2+$tiny$lang_online"text_color"), array($fsize$far$total_online"red"), array($fsize$far+strlen($total_online)*($fsize+4), $online"text_color")),
                  array(array(
$fsize$offset2+$tiny$lang_new_user"text_color"), array($fsize$far$show['new_user'], "text_color"))
  );
  if (
$signature_template_random)
  {
    if (
$dir = @opendir($signature_template_dir))
    {
      
$list = array();
      while (
$file = @readdir($dir))
      {
        if (!
is_dir($signature_template_dir.$file) && is_file($signature_template_dir.$file) && strtolower(substr(strrchr($file,"."), 1)) == "png")
        {
          
$list[] = $file;
        }
      }
      @
closedir($dir);
      
$signature_template $list[array_rand($list)];
    }
  }
  
$im ImageCreateFromPNG($signature_template_dir.$signature_template);
  
$width imagesx($im);
  
$height imagesy($im);
  
$text_color ImageColorAllocate ($im000);
  
$red ImageColorAllocate ($im25500);
//  ImageString($im, 3, $offset2+(($width-$offset2)/2)-(strlen($sitename)*7/2), 4, $sitename, $text_color);
  
ImageString($im3$offset2+$tiny4$sitename$text_color);
  
$i $start;
  foreach (
$stats as $key)
  {
    if (
$key[0][2] == $lang_online && !$total_online)
    {
      continue;
    }
    foreach (
$key as $val)
    {
      
ImageString($im$val[0], $val[1], $i$val[2], $$val[3]);
    }
    
$i $i $spacing;
  }
  if (
$random_image)
  {
    
$image_info getimagesize($thumb);
    
$types = array(=> "gif"=> "jpeg"=> "png");
    
$th "imagecreatefrom".$types[$image_info[2]];
    
$width_start $image_info[0];
    
$height_start $image_info[1];
    
$dimension $offset2-$offset*2;
    if (
$height $image_info[1] < $offset && $height $offset2 $offset)
    {
      
$dimension $height $offset*2;
    }
    
$width_end $dimension;
    
$height_end $dimension;
    if ((
$width_start $width_end || $height_start $height_end) && $width_start && $height_start && $width_end && $height_end)
    {
       
$ratio $width_start $height_start;
      if (
$ratio 1)
      {
        
$width_end $dimension;
        
$height_end round(($dimension/$width_start) * $height_start);
      }
      else
      {
        
$width_end round(($dimension/$height_start) * $width_start);
        
$height_end $dimension;
       }
    }
    elseif (
$width_start || $height_start)
    {
       
$width_end $width_start;
       
$height_end $height_start;
    }
    
$temp imagecreateTrueColor($width_end$height_end);
    if (
$image $th($thumb))
    {
      
imagecopyresampled($temp$image0000$width_end$height_endImageSX($image), ImageSY($image));
    }
    
$posx round(($offset2-$width_end)/2);
    
$posy round(($height-$height_end)/2);
    
imagecopymerge($im,$temp$posx$posy00$width_end$height_end100);
    
ImageRectangle($im$posx-1$posy-1$posx+$width_end-1$posy+$height_end-1$text_color);
  }
  
$function "Image".$type;
  
$function($im,$tmpfname,(($type == "png") ? $quality)); 
  
ImageDestroy($im);
  
$handle = @fopen($tmptname"wb");
  
$contents = @fwrite($handle, (($random_image) ? $imagedata['image_id'] : 0));
  @
fclose($handle);
//end compilling new image
header('Last-Modified: '.gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate'); // HTTP/1.1
header('Cache-Control: pre-check=0, post-check=0, max-age=0'); // HTTP/1.1
header("Content-disposition: filename=signature".MD5(time()).".".$type);
header("Content-Type: image/".$type);
header("Content-Length: ".filesize($tmpfname));
readfile($tmpfname);
?>

Place it into your 4images root directory (actualy u can place it somewhere else, on the same sever with your 4images, but then u'll need change ROOT_PATH inside the script.)



Step 2
Create signature.png image which will be used as default template (background) for your signature image. Make sure the color depth is 24bit, otherwise your thumbnail might get distorted.  Place it in signatures/ folder
You can create as many template images as u wish, just place them into signatures/ directory and make sure in the settings u have $signature_template_random = 1;
I've attached 3 sample templates (please dont be too harsh about their design, I know I suck with graphics :oops:)
[EDIT]
more image templates: http://www.4homepages.de/forum/index.php?topic=6755.msg142768#msg142768
[/EDIT]



Step 3
Place jpeg.gif image in the same directory as your signature.php (u can copy it from templates/<yourtemplate>/icons/ folder) This image will be used if a random image does not have a thumbnail.



Step 4
Look in the configuration of the script, change it to your own needs, every setting is explained inside the code.



If everything is done correctly, by executing the script (type in your browser: http://yoursiteurl/path_to_the_script/signature.php) u should see something like this:




In case a forum where u are trying show your signature image does not support images with .php extension or u simply would like have signature.png instead of signature.php then chose one of the following methods:

1) this method require Apache webserver with mod_rewrite enabled
create .htaccess file with this code:
Code: [Select]
RewriteEngine On
#RewriteBase /
RewriteRule ^signature\.png$ signature.php?%{QUERY_STRING}
RewriteRule ^go$ signature.php?go=1&%{QUERY_STRING}
upload it to the same directory where your signature.php file is.

to test it type in your browser: http://<youraddress>/signature.png
it should show u your signature. Then type: http://<youraddress>/go
it should redirect u to the image/category of the last random image showed in the signature (asuming its enabled)

2) this method require Apache webserver

create .htaccess file with this code:
Code: [Select]
<Files signature.png>
AddType application/x-httpd-php .png
</Files>
upload it to the same directory where your signature.php file is.
Rename your signature.php to signature.png
to test it type in your browser: http://<youraddress>/signature.png
To redirect to the last random image showed in the signature use: http://<youraddress>/signature.png?go=1

3) I'm not quet sure what kind of server/confguration this method required, so try it and see if it works for u

user url like this: http://<youraddress>/signature.php/sig.png

sig.png could be any name u want.

To redirect to the last random image showed in the signature use: http://<youraddress>/signature.png?go=1



If you get a "red x" (broken image), the first thing u should do is comment out (remove) every line that has header():
Code: [Select]
header('Last-Modified: '.gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate'); // HTTP/1.1
header('Cache-Control: pre-check=0, post-check=0, max-age=0'); // HTTP/1.1
header("Content-disposition: filename=signature".MD5(time()).".".$type);
header("Content-Type: image/".$type);
and check again for any error messages.
Without error messages u should see a bunch of "random" characters (bunch of crap if u wish)



Since v2.21 you can load your own fonts.
As of now, no TTF (TrueTypeFont) can be used, but special "GD Font" fonts.
On this site you can create your own fonts
or download this program to convert windows fonts into "GD" format
or you can download already converted fonts from this site.
« Last Edit: February 16, 2010, 07:11:05 AM by V@no »
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Jan-Lukas

  • Addicted member
  • ******
  • Posts: 1.288
    • View Profile
    • Discover the New World of Kindersurprise
Re: Signature image v2.20
« Reply #1 on: March 22, 2005, 12:41:17 AM »
Hi,
ist es möglich dort auch die Suchmaske einzufügen ?
mit einem Textfeld und OK Taste, und das danach die Trefferseite aufgeht


gruss Harald
Danke Harald




b.o.fan

  • Guest
Re: Signature image v2.20
« Reply #2 on: March 22, 2005, 08:49:15 AM »
i have create all what you say.

but this i get:


Warning: imagepng() [function.imagepng]: open_basedir restriction in effect. File(/tmp/signature.tmp) is not within the allowed path(s): (/home/www/htdocs/wartenaufden15.de/.) in /home/www/htdocs/wartenaufden15.de/signature.png on line 330

Warning: imagepng() [function.imagepng]: Invalid filename '/tmp/signature.tmp' in /home/www/htdocs/wartenaufden15.de/signature.png on line 330

Warning: Cannot modify header information - headers already sent by (output started at /home/www/htdocs/wartenaufden15.de/signature.png:330) in /home/www/htdocs/wartenaufden15.de/signature.png on line 336

Warning: Cannot modify header information - headers already sent by (output started at /home/www/htdocs/wartenaufden15.de/signature.png:330) in /home/www/htdocs/wartenaufden15.de/signature.png on line 337

Warning: Cannot modify header information - headers already sent by (output started at /home/www/htdocs/wartenaufden15.de/signature.png:330) in /home/www/htdocs/wartenaufden15.de/signature.png on line 338

Warning: Cannot modify header information - headers already sent by (output started at /home/www/htdocs/wartenaufden15.de/signature.png:330) in /home/www/htdocs/wartenaufden15.de/signature.png on line 339

Warning: Cannot modify header information - headers already sent by (output started at /home/www/htdocs/wartenaufden15.de/signature.png:330) in /home/www/htdocs/wartenaufden15.de/signature.png on line 340

Warning: readfile() [function.readfile]: open_basedir restriction in effect. File(/tmp/signature.tmp) is not within the allowed path(s): (/home/www/htdocs/wartenaufden15.de/.) in /home/www/htdocs/wartenaufden15.de/signature.png on line 341

Warning: readfile(/tmp/signature.tmp) [function.readfile]: failed to create stream: Operation not permitted in /home/www/htdocs/wartenaufden15.de/signature.png on line 341


why??

http://www.wartenaufden15.de/signature.png

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Signature image v2.20
« Reply #3 on: March 22, 2005, 09:16:29 AM »
change
Quote
$path = "/tmp/"; // WRITEBLE dir (chmod 777), where compilled image will be stored (dont not requere access from web)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

b.o.fan

  • Guest
Re: Signature image v2.20
« Reply #4 on: March 22, 2005, 11:57:54 AM »
what i have to change????

hmm?
thats my server:



my line nr.32 in signature.png
Code: [Select]
$path = "/tmp/";
my tmp is CHMD 777....
more infos?

ask me!

Offline martrix

  • Hero Member
  • *****
  • Posts: 755
    • View Profile
    • overlord.cz
Re: Signature image v2.20
« Reply #5 on: March 22, 2005, 01:35:32 PM »
well, try to change

Code: [Select]
$path = "/tmp/";
to

Code: [Select]
$path = "./tmp/";

or to

Code: [Select]
$path = "/home/www/htdocs/wartenaufden15.de/tmp/";
MAяTRIX


b.o.fan

  • Guest
Re: Signature image v2.20
« Reply #6 on: March 22, 2005, 01:43:11 PM »
@ matrix.

thanx!!

Offline Bilal

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
Re: Signature image v2.20.1
« Reply #7 on: March 26, 2005, 07:17:49 AM »
That's a very nice one V@no....but m8...how I can show the MSN..yahoo and other stuff...which I am seeing in your stats?  8O
Regards,
Bilal

Offline martrix

  • Hero Member
  • *****
  • Posts: 755
    • View Profile
    • overlord.cz
Re: Signature image v2.20.1
« Reply #8 on: March 27, 2005, 06:30:14 PM »
@ Bilal:

I asked that before the "hack".
It seems like that it's quite complicated - you need some additional software installed on your server...
MAяTRIX


Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Signature image v2.20.1
« Reply #9 on: March 27, 2005, 06:55:04 PM »
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Flo2005

  • Full Member
  • ***
  • Posts: 237
  • Copy & Paste Profi :)
    • View Profile
    • snuup.de! - Bilder - Sounds - Videos - fun4FREE!
Re: Signature image v2.20.1
« Reply #10 on: April 05, 2005, 11:09:29 AM »
Hi! I have changed my Database and now the signature doesn´t work  :cry:

In signature.php I have changed the name of the database, but it still doesn´t work!

It shows me this

Have anybody an idea, what I did wrong? The CHMOD of tmp is 777

Project offline

Offline Vincent

  • 4images Moderator
  • Addicted member
  • *****
  • Posts: 1.195
    • View Profile
    • www.foto-kocher.com
Re: Signature image v2.20.1
« Reply #11 on: April 05, 2005, 11:21:57 AM »
Hi! I have changed my Database and now the signature doesn´t work  :cry:

In signature.php I have changed the name of the database, but it still doesn´t work!

It shows me this

Have anybody an idea, what I did wrong? The CHMOD of tmp is 777

In my case it is because i use another Grafik konverter then GD!
 :roll: vincent
Beati pauperi spiritus

4images 1.7 // My Installed Mods


Offline Flo2005

  • Full Member
  • ***
  • Posts: 237
  • Copy & Paste Profi :)
    • View Profile
    • snuup.de! - Bilder - Sounds - Videos - fun4FREE!
Re: Signature image v2.20.1
« Reply #12 on: April 05, 2005, 11:41:36 AM »
Before I replaced the Database I there was no problem with GD and the signature-mod  :?

Project offline

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Signature image v2.20.1
« Reply #13 on: April 06, 2005, 01:41:48 AM »
Have anybody an idea, what I did wrong? The CHMOD of tmp is 777
well, if u say so...
Quote
Warning: imagepng() [function.imagepng]: Unable to open '/www/htdocs/v116307/portal/4images/tmp/signature.tmp' for writing in /www/htdocs/v116307/portal/4images/signature.php on line 245
check your /tmp directory, make sure there is no signature.tmp file present, if it is, then remove it. if there is no such file, then your /tmp/ directory is not writible by the webserver.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Flo2005

  • Full Member
  • ***
  • Posts: 237
  • Copy & Paste Profi :)
    • View Profile
    • snuup.de! - Bilder - Sounds - Videos - fun4FREE!
Re: Signature image v2.20.1
« Reply #14 on: April 06, 2005, 09:35:07 AM »
Shit happens...

...in my tmp folder I found signature.time and signature.tmp! I have delete this and now it works like before!

THX

Project offline