4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: V@no on March 15, 2005, 02:54:39 AM

Title: Signature image v2.3
Post by: V@no 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:

(http://4images.vano.org/sig.png) (http://4images.vano.org/sig)


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 (http://puremango.co.uk/cm_fontmaker_114.php#) site you can create your own fonts
or download this (http://www.philiplb.de/index.php?showdownload=63&p=Downloads) program to convert windows fonts into "GD" format
or you can download already converted fonts from this (http://www.widgnet.com/gdf_fonts/) site.
Title: Re: Signature image v2.20
Post by: Jan-Lukas 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
Title: Re: Signature image v2.20
Post by: b.o.fan 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
Title: Re: Signature image v2.20
Post by: V@no 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)
Title: Re: Signature image v2.20
Post by: b.o.fan on March 22, 2005, 11:57:54 AM
what i have to change????

hmm?
thats my server:

(http://wartenaufden15.de/4homepages/ftp.jpg)

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

ask me!
Title: Re: Signature image v2.20
Post by: martrix 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/";
Title: Re: Signature image v2.20
Post by: b.o.fan on March 22, 2005, 01:43:11 PM
@ matrix.

thanx!!
Title: Re: Signature image v2.20.1
Post by: Bilal 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
Title: Re: Signature image v2.20.1
Post by: martrix 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...
Title: Re: Signature image v2.20.1
Post by: V@no on March 27, 2005, 06:55:04 PM
indeed.

http://www.onlinestatus.org/
Title: Re: Signature image v2.20.1
Post by: Flo2005 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 (http://www.snuup.de/why.jpg)

Have anybody an idea, what I did wrong? The CHMOD of tmp is 777
Title: Re: Signature image v2.20.1
Post by: Vincent 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 (http://www.snuup.de/why.jpg)

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
Title: Re: Signature image v2.20.1
Post by: Flo2005 on April 05, 2005, 11:41:36 AM
Before I replaced the Database I there was no problem with GD and the signature-mod  :?
Title: Re: Signature image v2.20.1
Post by: V@no 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.
Title: Re: Signature image v2.20.1
Post by: Flo2005 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
Title: Re: Signature image v2.20.1
Post by: Bilal on April 07, 2005, 01:13:43 PM
indeed.

http://www.onlinestatus.org/


hmm....I though it will gonna be something like PHP or perl...but it's a java stuff...I will check it out in detials...thanks for the link though! :)
Title: Re: Signature image v2.20.1
Post by: Chrissie on April 10, 2005, 05:22:34 PM
Quote
Fatal error: Cannot instantiate non-existent class: db in /homepages/5/d23272572/htdocs/erz/4images/signature.php on line 117
Bekomme das mit der Signature einfach nicht hin ! Habe alles nach Anleitung gemacht
Kann mir jemand helfen ?

Danke
Title: Re: Signature image v2.20.1
Post by: V@no on April 10, 2005, 07:49:57 PM
does db_mysql.php exists in your erz/4images/includes/ folder?
Title: Re: Signature image v2.20.1
Post by: Chrissie on April 10, 2005, 07:55:34 PM
Yes
Title: Re: Signature image v2.20.1
Post by: V@no on April 10, 2005, 08:00:36 PM
Please PM me with the code of your signature.php and URL to it, if possible.
Title: Re: Signature image v2.20.1
Post by: Vincent on April 11, 2005, 09:34:56 AM
@Chrissie
hello which grafik konverter you ar using GD or different?

sincerly
vincent
Title: Re: Signature image v2.20.1
Post by: JimmyGee on April 11, 2005, 03:12:37 PM
Hi, great looking mod. I am getting the following error though :/ -

Code: [Select]
DB Error: Bad SQL Query: CREATE TEMPORARY TABLE tab_883866 TYPE = HEAP SELECT i.image_id, i.cat_id FROM 4images_images i LEFT JOIN 4images_categories c ON c.cat_id = i.cat_id WHERE i.image_active = 1 AND c.auth_viewcat = 0 AND i.cat_id NOT IN () ORDER BY RAND() LIMIT 1
You have an error in your SQL syntax near ') ORDER BY RAND() LIMIT 1' at line 5

DB Error: Bad SQL Query: SELECT t.image_id, t.cat_id, i.user_id, i.image_name, i.image_media_file, i.image_thumb_file FROM tab_883866 AS t LEFT JOIN 4images_images AS i ON i.image_id=t.image_id
Table 'gallery_-_forums.tab_883866' doesn't exist

DB Error: Bad SQL Query: DROP TABLE tab_883866
Unknown table 'tab_883866'

DB Error: Bad SQL Query: SELECT user_name FROM phpbb_users WHERE user_level > -1 ORDER BY user_id DESC
Unknown column 'user_name' in 'field list'

DB Error: Bad SQL Query: SELECT session_user_id, session_ip FROM phpbb_sessions WHERE session_lastaction >= 1113278392
Unknown column 'session_lastaction' in 'where clause'

any ideas?
Title: Re: Signature image v2.20.1
Post by: martrix on April 11, 2005, 03:34:53 PM
DB Error: Bad SQL Query: CREATE TEMPORARY TABLE tab_883866 TYPE = HEAP SELECT i.image_id, i.cat_id FROM 4images_images i LEFT JOIN 4images_categories c ON c.cat_id = i.cat_id WHERE i.image_active = 1 AND c.auth_viewcat = 0 AND i.cat_id NOT IN () ORDER BY RAND() LIMIT 1
You have an error in your SQL syntax near ') ORDER BY RAND() LIMIT 1' at line 5

It gave me a similar error-message when my web-provider changed some server-settings.

Ask your web-provider. if he did not forbid you to create temporary tables with your MySQL account...
Title: Re: Signature image v2.20.1
Post by: Chrissie on April 11, 2005, 07:04:43 PM
hello which grafik konverter you ar using GD or different?
Yes GD
http://www.sys-web.de/4images/signature.php <-- my Signature with a red X  :(
 
Title: Re: Signature image v2.20.1
Post by: Chrissie on April 11, 2005, 10:45:49 PM
Jetzt scheint es zu funktionieren ! Muss es noch einbinden !  :D
Title: Re: Signature image v2.20.1
Post by: JimmyGee on April 13, 2005, 10:54:07 AM
DB Error: Bad SQL Query: CREATE TEMPORARY TABLE tab_883866 TYPE = HEAP SELECT i.image_id, i.cat_id FROM 4images_images i LEFT JOIN 4images_categories c ON c.cat_id = i.cat_id WHERE i.image_active = 1 AND c.auth_viewcat = 0 AND i.cat_id NOT IN () ORDER BY RAND() LIMIT 1
You have an error in your SQL syntax near ') ORDER BY RAND() LIMIT 1' at line 5

It gave me a similar error-message when my web-provider changed some server-settings.

Ask your web-provider. if he did not forbid you to create temporary tables with your MySQL account...
im on a dedicated server and have full control over all of that. Also I am able to install scripts that are able to create tables in mysql from a browser such as phpbb. If there was a problem creating tables wouldn't that also fail?
Title: Re: Signature image v2.20.1
Post by: V@no on April 13, 2005, 02:34:12 PM
theoreticaly yes, u must grant sertain privelegies for your mysql account.
Title: Re: Signature image v2.20.1
Post by: JimmyGee on April 19, 2005, 08:55:11 PM
ok so any ideas on how I do that?
Title: Re: Signature image v2.20.1
Post by: V@no on April 19, 2005, 11:49:18 PM
ok so any ideas on how I do that?
yes.
You contact your hoster...;)
Title: Re: Signature image v2.20.1
Post by: jaimecb on April 20, 2005, 02:33:38 AM
(http://www.misimagenes.net/signature.php)

why ?? only show JPEG icon... :S

Title: Re: Signature image v2.20.2
Post by: V@no on April 20, 2005, 02:52:33 AM
replace
Code: [Select]
$not_in_cat = ""; with
Code: [Select]
$not_in_cat = "0";
P.S. I've updated the original code to v2.20.2
Title: Re: Signature image v2.20.2
Post by: JimmyGee on April 20, 2005, 05:02:55 PM
I dont need to grant any permissions, permissions are fine. The hoster is no help. You are no help. I will abandon this little addon I think, too much hassle to set up.
Title: Re: Signature image v2.20.2
Post by: V@no on April 21, 2005, 12:30:43 AM
I dont need to grant any permissions, permissions are fine. The hoster is no help. You are no help. I will abandon this little addon I think, too much hassle to set up.
I hate to be rude, but that's fine by me, please dont use it.
If a person would reather wait for help, instead of try solve it selves (that including googling) or just read the explanation for each setting in the file, then why would I need such trouble "on my sholders"?

*cough* $random_fast = 1; //if your mysql account doesn't have permission to create/delete temporary tables, set this to 0 *cough*
Title: Re: Signature image v2.20.2
Post by: ascanio on April 21, 2005, 02:53:41 AM
Hi can we apply this software to this signature? http://software.redshift.je/?p=m&i=23
Title: Re: Signature image v2.20.2
Post by: V@no on April 21, 2005, 02:57:01 AM
and the point of doing this is...?
Title: Re: Signature image v2.20.2
Post by: ascanio on April 21, 2005, 03:24:16 AM
use other signatures ramdomly, like if you have other sites you can show the 4images signature and the others from the others sites ramdonly
Title: Re: Signature image v2.20.2
Post by: V@no on April 21, 2005, 03:32:00 AM
did u actualy see what that script does?
it just simply show u a random image from img folder...
Title: Re: Signature image v2.20.2
Post by: ascanio on April 21, 2005, 04:25:25 AM
oooh ok
Title: Re: Signature image v2.20.2
Post by: martrix on April 21, 2005, 09:23:11 AM
I'm sorry, but what changed in v2.20.2?  :oops:

Just the $not_in_cat stuff?  :|
Title: Re: Signature image v2.20.2
Post by: V@no on April 21, 2005, 02:24:12 PM
correct
Title: Re: Signature image v2.20.1
Post by: suprdave71 on April 26, 2005, 08:33:51 PM
Quote
Fatal error: Cannot instantiate non-existent class: db in /homepages/5/d23272572/htdocs/erz/4images/signature.php on line 117
Bekomme das mit der Signature einfach nicht hin ! Habe alles nach Anleitung gemacht
Kann mir jemand helfen ?

Danke

Hey V@no --

I have this same error, and I also have the db_mysql.php file in my includes folder. Can you help me as well?

http://heroicimages.net/4images/signature.php

No problem emailing you the code if you need it...

Thanks,

Dave
Title: Re: Signature image v2.20.2
Post by: V@no on April 27, 2005, 12:41:11 AM
Then both of u have same mistake: the ROOT_PATH
U must understand structure and the difference between relative and full paths.
relative path - is the path relatively to the executed file. It begins with a dot or two dots with a slash.
if its begins with one dot: ./ it means the directory where the executed file is
if it begins with two dots: ../ it measn a directory one level below the executed file

The full path is relative to the root of the file system. On unix based systems it starts with a forward slash ( / ) and on windows systems with a drive letter ( C:\ ) if u must use backslashes in the path ("windows server" systems), then u must use two backslashes ( C:\\path\\blah )

This mod has no preferenced for the type of path, u can use either full or relative path

Title: Re: Signature image v2.20.2
Post by: suprdave71 on April 27, 2005, 05:03:30 AM
Then both of u have same mistake: the ROOT_PATH

Thank you, V@no. I realized I had made things harder for myself by trying to update the Config section of your code. I just copied/pasted it back in as you had it & it works.

Sorry for my blunder but at least I learned a little something.  :oops:

Dave
Title: Re: Signature image v2.20.2
Post by: JensF on May 05, 2005, 09:27:19 PM
Hi,

i want to include the Status Indicator into my Signature.

I have put in this

Code: [Select]
$lang_yahoo = "<img src=\"http://osi.lostinspacehosting.com:81/yahoo/jensfunk\">";
and in the $stats = array( section i have put this in

Code: [Select]
array(array($fsize, $offset2+$tiny, $lang_yahoo, "text_color"))
But see my Signature, what is wrong???
Title: Re: Signature image v2.20.2
Post by: V@no on May 05, 2005, 10:03:42 PM
u can try this:
replace
Code: [Select]
// --------- End Config ----------
with:
Code: [Select]
$statusimages = "/www/onlinestatusimgs/"; //the directory where online.gif offline.gif and unknown.gif images are.
$statusurl = "http://osi.lostinspacehosting.com:81/"; //the url of status indicator server. WITH TRAILING SLASH!
//list of messengers
$messengers = array(
  "icq" => "85389818",
  "aim"   => "JensF200x",
  "yahoo"   => "jensfunk"
);
// --------- End Config ----------

function online($id, $what)
{
  global $statusurl;
  $url = parse_url($statusurl);
  $header = "";
  if ($request = @fsockopen($url['host'], ((isset($url['port'])) ? $url['port'] : 80), $header, $header, 3))
  {
    fputs($request, "GET /$what/$id HTTP/1.0\r\nHost: ".$url['host']."\r\n\r\n");
    $header = fread($request, 200);
    fclose($request);
    if (strstr($header, "online"))
    {
      return true;
    }
    if (strstr($header, "unknown"))
    {
      return 2;
    }
    else
    {
      return false;
    }
  }
  return 2;
}

Then find:
Code: [Select]
  $function = "Image".$type;Insert above:
Code: [Select]
  $i = 0;
  $n = array_rand($messengers, count($messengers));
  $left = ($width/2) - (48*count($messengers)/2) - 14;
  foreach ($n as $key)
  {
    $status = online($messengers[$key], $key);
    $img = ($status) ? (($status === true) ? "online" : "unknown") : "offline";
    $st = imagecreatefromgif($statusimages.$key.$img.".gif");
    imagecopymerge($im, $st, ($left+$i), ($height-25), 0, 0, 48, 25, 100);
    $i += 48;
  }
edit the settings.
Title: Re: Signature image v2.20.2
Post by: JensF on May 06, 2005, 03:34:09 PM
Hi,

is this all what i must do???

I have make the changes and edit the settings to:

Quote
$statusimages = "http://osi.lostinspacehosting.com:81"; //the directory where online.gif offline.gif and unknown.gif images are.
$statusurl = "http://osi.lostinspacehosting.com:81/"; //the url of status indicator server. WITH TRAILING SLASH!

Then i have change this

Quote
array(array($fsize, $offset2+$tiny, $lang_new_user, "text_color"), array($fsize, $far, $show['new_user'], "text_color"))

to this

Quote
array(array($fsize, $offset2+$tiny, $lang_new_user, "text_color"), array($fsize, $far, $show['new_user'], "text_color")),
                  array(array($fsize, $offset2+$tiny, $messengers, "text_color"), array($fsize, $far, $show['messengers'], "text_color"))

But now i see array and no images with my status...
Title: Re: Signature image v2.20.2
Post by: V@no on May 06, 2005, 05:59:21 PM
I dont know why u changed anything below // -------- End config ----------
and the
Code: [Select]
$statusimages = "/www/onlinestatusimgs/"; //the directory where online.gif offline.gif and unknown.gif images are.
must be a local path, not remove path. otherwords, u must have online.gif, offline.gif and unknown.gif images on the same server where your signature.php is (these images does not require access through web though)
Basicaly that's the only line u need to change before u test it ;)
Title: Re: Signature image v2.20.2
Post by: JensF on May 06, 2005, 06:52:45 PM
Ok,

i think i have it. Now i can see the unknown, but not online gifs......

What i mean, in the Signature all is unknown an here it goes... -> http://www.terraristik-galerie.de/contact.php


And now what i must do to have the image more in the right corner...
Title: Re: Signature image v2.20.2
Post by: V@no on May 06, 2005, 07:06:15 PM
the code I've posted was already setup for u, only $statusimages variable should be changed.
This is what I see when add the code to my sig (dont mind the AIM icon):
Title: Re: Signature image v2.20.2
Post by: JensF on May 06, 2005, 07:12:13 PM
I have made no other changes in the code...Now i have change the image path, nothing more.....

Title: Re: Signature image v2.20.2
Post by: V@no on May 06, 2005, 07:34:38 PM
hmmm...ok, lets debug it.
1) in
Code: [Select]
  if ($request = @fsockopen($url['host'], ((isset($url['port'])) ? $url['port'] : 80), $header, $header, 3)) increase the timeout time (replace 3 with 10)
check if that helps.
2) from that line remove @
check if any error messages showed
3) if no error message and u can see the image, then below:
Code: [Select]
    fclose($request);insert:
Code: [Select]
    echo $request;check again if anything showed

P.S. obviosly by "check" I mean execute your signature.php directly through the browser address bar, not through some html using <img> tag ;)
Title: Re: Signature image v2.20.2
Post by: JensF on May 06, 2005, 07:44:35 PM
I have do Step 1 - 3 but no Effect and no errors.

The Image is still loading 40 seconds :(
Title: Re: Signature image v2.20.2
Post by: V@no on May 06, 2005, 08:10:21 PM
if u do step 2 and 3 there must be showed something.
and u can not do anything about 40 seconds because the "status" server is remote, not local, or u should remove some of the messengers.
Title: Re: Signature image v2.20.2
Post by: JensF on May 06, 2005, 08:16:53 PM
if u do step 2 and 3 there must be showed something.
and u can not do anything about 40 seconds because the "status" server is remote, not local, or u should remove some of the messengers.

What i say, i have do the changes and the effect is what you see in my signature!

Is it a help for you when i send you my signature.php???
Title: Re: Signature image v2.20.2
Post by: V@no on May 06, 2005, 08:20:36 PM
Is it a help for you when i send you my signature.php???
well, if u could make a copy of signature.php on your server and rename it to whatever.phps and then pm me with the url to it, that would do ;)
Title: Re: Signature image v2.20.2
Post by: cagedsmurf on May 07, 2005, 06:40:28 PM
Hey V@no I have just tried using this add on But get the following errors when i goto the sinature.php
i have the phpbb mod installed to my 4images & although i dont know a great deal of sql i take it this is responsible for these errors
Just wondered if you know a way round this?

DB Error: Bad SQL Query: SELECT user_name FROM phpbb_users WHERE user_level > -1 ORDER BY user_id DESC
Unknown column 'user_name' in 'field list'

DB Error: Bad SQL Query: SELECT session_user_id, session_ip FROM phpbb_sessions WHERE session_lastaction >= 1115481810
Unknown column 'session_lastaction' in 'where clause'


Thanks in advance :D
Title: Re: Signature image v2.20.2
Post by: waleed on May 23, 2005, 02:52:25 PM
ok guys when i open the explorer to www.xxx.com/signature.php i can see the images with info
but i counldnt include it to phpBB forums i made the .htaccess file but still .
what the code to put it as signature in the profile .
thanks

ok done i fixed it so now how to make the png as link :)
Title: Re: Signature image v2.20.2
Post by: V@no on May 24, 2005, 12:34:04 AM
every forum software has (or atleast supposed to have) a help link where u can find the bbcode used on the forum.
for example SMF help:
http://www.4homepages.de/forum/Themes/default/help/posting.english.html#bbcref
Title: Re: Signature image v2.20.2
Post by: Aleksey on June 01, 2005, 11:16:48 PM
Hello! How change codepage for russian language?  is possible? :)
Title: Re: Signature image v2.20.2
Post by: V@no on June 02, 2005, 12:42:21 AM
sorry, PHP build-in fonts dont support russian letters. But you still have two choses:
1) very painfull but has the best result: use imagettftext() function instead of imagestring(), which uses a font u specify (even .ttf font from windows would work on unix systems). This method is painfull, because u'll have to make lots of other changes to the code besides that...
2) easy one: convert all russian letter to translit (а = a, я = ya, д = d, etc)

If the second chose would succesfy u, then insert on top of the signature.php this:
Code: [Select]
function translit($text) {
  $array = array("а","б","в","г","д","е","ё","ж","з","и","й","к","л","м","н","о","п","р","с","т","у","ф","х","ц","ч","ш","щ","ь","ъ","э","ю","я","ы","А","Б","В","Г","Д","Е","Ё","Ж","З","И","Й","К","Л","М","Н","О","П","Р","С","Т","У","Ф","Х","Ц","Ч","Ш","Щ","Ь","Ъ","Э","Ю","Я","Ы");
  $array_tr = array("a","b","v","g","d","e","e","zh","z","i","j","k","l","m","n","o","p","r","s","t","u","f","h","c","ch","sh","shj","'","j","e","yu","ya","y","A","B","V","G","D","E","E","Zh","Z","I","J","K","L","M","N","O","P","R","S","T","U","F","H","C","Ch","Sh","Shj","'","J","E","Yu","Ya","Y");
  return str_replace($array, $array_tr, $text);
}

Then, any text u need to convert, send it through translit() function.
For example, for "last registered user" replace
Code: [Select]
                array(array($fsize, $offset2+$tiny, $lang_new_user, "text_color"), array($fsize, $far, $show['new_user'], "text_color"))with:
Code: [Select]
                array(array($fsize, $offset2+$tiny, $lang_new_user, "text_color"), array($fsize, $far, translit($show['new_user']), "text_color"))

Good luck.
Title: Re: Signature image v2.20.2
Post by: Aleksey on June 02, 2005, 11:46:18 PM
Thank you Vano for your fastest answer. But cyrillic likes a lot :)
Title: Re: Signature image v2.20.2
Post by: V@no on June 03, 2005, 12:03:51 AM
ok, now I'm curious...how did u do that? 8O
Title: Re: Signature image v2.20.2
Post by: Aleksey on June 03, 2005, 12:57:59 AM
 :lol: Very simple... This is graphics of template signature :wink:
Title: Re: Signature image v2.20.2
Post by: V@no on June 03, 2005, 02:42:28 AM
omg...good thinking! nice :D
Title: Re: Signature image v2.20.2
Post by: V@no on June 03, 2005, 03:30:05 AM
ok, I found a sollution!
I've updated the original code to v2.21 which supports custom fonts (gd fonts only for now)

On this (http://puremango.co.uk/cm_fontmaker_114.php#) site you can create your own fonts
or download this (http://www.philiplb.de/index.php?showdownload=63&p=Downloads) program to convert windows fonts into "GD" format
or you can download already converted fonts from this (http://www.widgnet.com/gdf_fonts/) site.
Title: Re: Signature image v2.21
Post by: maikew on June 30, 2005, 03:32:52 PM
wie kann ich hier im forum meine signatur verlinken?  :? eingefügt habe ich sie schon,bekomme sie aber nicht verlinkt. :roll:

zweites problem:
manchmal wenn ich die signature.php aufrufe erscheint die meldung Die Grafik kann nicht angezeigt werden,da diese Fehler enthält was hat das zu bedeuten?  :cry:
Title: Re: Signature image v2.21
Post by: martrix on June 30, 2005, 06:52:07 PM
Die Antwort auf Frage 1 hat V@no schon in den ersten Beitrag geschrieben... lesen (http://www.4homepages.de/forum/index.php?topic=6755.msg29559#msg29559) ;)

Link in HTML

Code: [Select]
<a href=http://<deineaddresse>/signature.php?go=1><img src="http://<deineaddresse>/signature.php"></a>
oder in BBCode

Code: [Select]
[url=http://<deineaddresse>/signature.php?go=1][img]http://<deineaddresse>/signature.php[/img][/url]
Title: Re: Signature image v2.21
Post by: Vincent on June 30, 2005, 07:57:44 PM
Hello after my hoster updatet mysql und php i was tring again to install but i got a
Security violationSecurity violationSecurity violation
to test it - http://www.foto-kocher.biz/signature.php
to read the code http://www.foto-kocher.biz/signature.php.txt

Security violationSecurity violationSecurity violation

what did i wrong?

sincerly
vincent
Title: Re: Signature image v2.21
Post by: maikew on June 30, 2005, 08:08:37 PM
Die Antwort auf Frage 1 hat V@no schon in den ersten Beitrag geschrieben... lesen (http://www.4homepages.de/forum/index.php?topic=6755.msg29559#msg29559) ;)

Link in HTML

Code: [Select]
<a href=http://<deineaddresse>/signature.php?go=1><img src="http://<deineaddresse>/signature.php"></a>
oder in BBCode

Code: [Select]
[url=http://<deineaddresse>/signature.php?go=1][img]http://<deineaddresse>/signature.php[/img][/url]

danke  :mrgreen:,mein gott wie peinlich  :roll: :oops:
Title: Re: Signature image v2.21
Post by: Vincent on July 01, 2005, 11:50:23 PM
Hello after my hoster updatet mysql und php i was tring again to install but i got a
Security violationSecurity violationSecurity violation
to test it - http://www.foto-kocher.biz/signature.php
to read the code http://www.foto-kocher.biz/signature.php.txt

Security violationSecurity violationSecurity violation

what did i wrong?

sincerly
vincent
Title: Re: Signature image v2.21
Post by: V@no on July 02, 2005, 12:36:03 AM
Code: [Select]
define('ROOT_PATH', 'http://www.foto-kocher.com/');U can not use internet path in there, it must be full (/home/web/4images/) or relative (./4images) local path .
Title: Re: Signature image v2.21
Post by: Vincent on July 02, 2005, 02:20:46 PM
V@no thanks   :cry:
still not working but the error change - i am right the CHMOD of the tmp file have to be 777
because i can't change it i have to ask my hoster! i just want to make sure?!

sincerly
vincent
Title: Re: Signature image v2.21
Post by: V@no on July 02, 2005, 04:08:48 PM
since your host is using windows system, u must use the path either as relative or use something like: C:\\tmp\\
Title: Re: Signature image v2.21
Post by: Vincent on July 02, 2005, 09:19:53 PM
stupid Windows don't have mod 777
i have modified the tmp folder but still nothing happen or work

the picture       --> http://www.foto-kocher.biz/signature.png
the php file       --> http://www.foto-kocher.biz/signature.php
the php2txt file --> http://www.foto-kocher.biz/signature.php.txt

thanks vano for further support

vincent
Title: Re: Signature image v2.21
Post by: V@no on July 02, 2005, 10:54:50 PM
Ok, it seems u are not quet understand what is full/relative and internet paths and the difference between unix and windows paths.
on unix the root directory of the system represented by forward slash ( / ) on windows by driver letter ( C:\ )
Because windows is using backslash, and in PHP backslash usualy represents as an escape character, u must use double backslashes in the paths ( C:\\path\\blah\\ )

now, your path to the tmp folder should be full path ( D:\\web-data\\foto.wombat.ch\\tmp\\ )
Title: Re: Signature image v2.21
Post by: Vincent on July 03, 2005, 12:15:47 AM
V@no

you maybe are right i am to stupid to get it

the picture       --> http://www.foto-kocher.biz/signature.png
the php file       --> http://www.foto-kocher.biz/signature.php
the php2txt file --> http://www.foto-kocher.biz/signature.php.txt

i have changed it but still the same
Title: Re: Signature image v2.21
Post by: V@no on July 03, 2005, 03:44:31 AM
1) there are no slashes infront of the path!
Code: [Select]
$signature_template_dir = "\\signatures\\"; //directory with signature template images WITH TRAILING SLASH!!!
2) try to remove all of the @ signs from the code.
Title: Re: Signature image v2.21
Post by: maikew on July 03, 2005, 01:04:56 PM
versuche mal das vincent,das problem hatte ich anfangs nämlich auch *g*

$signature_template_dir = ".\\signatures\\"; //directory with signature template images WITH TRAILING SLASH!!!
$signature_template = ".\\signature.png"; //default signature template image filename

meine galerie läuft auch über windows und es funktioniert (zumindestens zeitweise *lach*) ;)
Title: Re: Signature image v2.21
Post by: Vincent on July 03, 2005, 05:14:04 PM
@maikew
@V@no
thanks a lot - it show up now - a bit coufusing how to modify the written part insight!
and the link to the homepage but i will try it

the php file       --> http://www.foto-kocher.biz/signature.php
the php2txt file --> http://www.foto-kocher.biz/signature.php.txt


sincerly
vincent
Title: Re: Signature image v2.21
Post by: Vincent on July 03, 2005, 09:20:19 PM
and i would like to know
how i could add the picture name below the picture

and how i could remove the name of the last member!

sincerly
vincent

finish playing arount but still the text is sticky
the php file       --> http://www.foto-kocher.biz/signature.php
the php2txt file --> http://www.foto-kocher.biz/signature.php.txt
Title: Re: Signature image v2.21
Post by: mawenzi on July 04, 2005, 12:37:50 AM
hi vincent,

Quote
how i could remove the name of the last member!

change this :
Code: [Select]
array(array($fsize, $offset2+$tiny, $lang_new_user, "text_color"), array($fsize, $far, $show['new_user'], "text_color"))into this :
Code: [Select]
//array(array($fsize, $offset2+$tiny, $lang_new_user, "text_color"), array($fsize, $far, $show['new_user'], "text_color"))
mawenzi
Title: Re: Signature image v2.21
Post by: maikew on July 04, 2005, 12:41:28 PM
kann ich die signatur auch in eine html datei includen oder einfügen?
falls ja,wie gehe ich da am besten vor?
Title: Re: Signature image v2.21
Post by: Vincent on July 04, 2005, 01:13:40 PM
so cool auch ich kann helfen -- steht auf der seite5     :wink:
Quote

Link in HTML

Code: [Select]
<a href=http://<deineaddresse>/signature.php?go=1><img src="http://<deineaddresse>/signature.php"></a>
oder in BBCode

Code: [Select]
[url=http://<deineaddresse>/signature.php?go=1][img]http://<deineaddresse>/signature.php[/img][/url]

hast du eine idee zu meinem schriftproblem?

gruss
vincent
Title: Re: Signature image v2.21
Post by: maikew on July 04, 2005, 01:24:02 PM
vielen dank vincent *g* ich brauche wohl wirklich eine brille  :mrgreen: funktioniert jetzt alles wie es soll :)

zu deinem problem,ich glaube die parameter wie die schrift angezeigt werden soll,kann man in der signature.php anpassen.werde gleich mal nachsehen und melde mich später wieder ;)
Title: Re: Signature image v2.21
Post by: Vincent on July 04, 2005, 01:34:22 PM
@maikew
was ich noch versucht habe ist es als signatur in einem Email einzubinden - aber das schein nicht zu gehen!  :wink:

gruss
vincent
Title: Re: Signature image v2.21
Post by: maikew on July 04, 2005, 02:03:32 PM
das sollte über outlook aber eigentlich gehen,dort kannst du z.b. eigenes html briefpapier erstellen und jeden beliebigen html code einbinden ;)
Title: Re: Signature image v2.21
Post by: Vincent on July 04, 2005, 08:54:11 PM
@mawenzi
your part have been changed and yes it works - just it still looks funny wrong!

sincerly
vincent
Title: Re: Signature image v2.21
Post by: mawenzi on July 04, 2005, 09:18:40 PM
@Vincent

your signature.php.txt-file is still current ... ?

mawenzi
Title: Re: Signature image v2.21
Post by: Vincent on July 04, 2005, 09:44:47 PM
just changed this part

//array(array($fsize, $offset2+$tiny, $lang_new_user, "text_color"), array($fsize, $far, $show['new_user'], "text_color"))

- but yes now it is right


sincerly
vincent
Title: Re: Signature image v2.21
Post by: V@no on July 04, 2005, 10:08:05 PM
ok, the problem is this line:
Code: [Select]
$far = $offset2+$tiny+(strlen($lang_new_user))*($fsize+4);Since u've removed $lang_new_user it doesnt calculate the correct coordinate.
just replace it with:
Code: [Select]
$far = $offset2+$tiny+XX;(replace XX with the offset number in pixels u wish.)
Title: Re: Signature image v2.21
Post by: Vincent on July 04, 2005, 10:39:00 PM
V@no
great  :lol:  :lol:  :lol: it works  :!:

is it possible to have on the bootem of the image
something like

<--- Picture name / Categorie
Title: Re: Signature image v2.21
Post by: Vincent on July 05, 2005, 08:21:06 AM
I found out something
if nobody stay on the homepage in the signature it is hidden guest and loged in member only if somebody stay on the page it writes 1 guest!

i am right?  :wink:

 8) vincent
Title: Re: Signature image v2.21
Post by: V@no on July 05, 2005, 08:42:22 AM
sorry, I didnt understand...
Title: Re: Signature image v2.21
Post by: V@no on July 05, 2005, 08:46:54 AM
If you were talking about that it shows "Online: ..." info only when atleast 1 visitor is curently active on your site, then - yes, that is correct.
It's controlled by this block:
Code: [Select]
    if ($key[0][2] == $lang_online && !$total_online)
    {
      continue;
    }
Title: Re: Signature image v2.21
Post by: Vincent on July 05, 2005, 08:47:53 AM
hello V@no

i mean the line online:
if nobody is on my page this line is hidden it is not writing 0 member 0 guest

sincerly
vincent
Title: Re: Signature image v2.21
Post by: Vincent on July 05, 2005, 08:48:56 AM
V@no
great       it works 

is it possible to have on the bootem of the image
something like

<--- Picture name / Categorie
Title: Re: Signature image v2.21
Post by: benda on July 07, 2005, 02:08:07 PM
Wenn ich die .htcess Datei hochlade dann dann kann die ganze Seite nicht mehr aufgerufen werden. Und wenn ich die Signature im PHP Format einfüge, wird sie nicht dargestellt. Meine Seite liegt auf dem fun.pic server. Kann es daran liegen?

Title: Re: Signature image v2.21
Post by: maikew on July 07, 2005, 02:41:43 PM
nein daran liegt es nicht.ich habe auch eine 4images galerie bei funpic und meine signatur wird angezeigt.
eventuell stimmen die pfade nicht.

so kannst du sie per bbcode einbinden
(http://deine-seite.de/4images/signature.php) (http://deine-seite.de/4images/signature.php?go=1)
Title: Re: Signature image v2.21
Post by: maikew on July 07, 2005, 02:44:33 PM
ich habe auch mal wieder ein problem. :mrgreen:
wie funktioniert das mit den fonts?
habe den ordner richtig angegeben und die fonts dort abgelegt,doch was muss ich in der signature.php anpassen damit sie auch
angezeigt werden?  :roll:
Title: Re: Signature image v2.21
Post by: Vincent on July 07, 2005, 04:08:58 PM
is it possible to have on the bootem of the image
something like

<--- Picture name / Categorie
Title: Re: Signature image v2.21
Post by: benda on July 07, 2005, 04:15:55 PM
nein daran liegt es nicht.ich habe auch eine 4images galerie bei funpic und meine signatur wird angezeigt.
eventuell stimmen die pfade nicht.

so kannst du sie per bbcode einbinden
(http://deine-seite.de/4images/signature.php) (http://deine-seite.de/4images/signature.php?go=1)

Mit welcher Methode hast du es eingebunden?

Quote
1) this method require Apache webserver with mod_rewrite enabled
2) this method require Apache webserver
Oder hast du es einfach mit (http://......signature.php) in die Signature eingebunden?
Title: Re: Signature image v2.21
Post by: Nicky on July 07, 2005, 04:54:06 PM
@maikew
auf deiner seite steht
Powered by 4images 1.8
hab ich was verpasst?  8O
Title: Re: Signature image v2.21
Post by: maikew on July 07, 2005, 04:56:25 PM
*lol* nein nicht das ich wüsste :) hatte noch eine modifizierte version von v@no auf meiner platte
.ich glaube man konnte sich diese version damals auf seiner seite runterladen  :mrgreen:
sehr praktisch,denn so musste ich nicht alle mods selbst einbauen *gg* da viele in dieser version schon enthalten sind
Title: Re: Signature image v2.21
Post by: maikew on July 07, 2005, 04:58:57 PM
nein daran liegt es nicht.ich habe auch eine 4images galerie bei funpic und meine signatur wird angezeigt.
eventuell stimmen die pfade nicht.

so kannst du sie per bbcode einbinden
(http://deine-seite.de/4images/signature.php) (http://deine-seite.de/4images/signature.php?go=1)

Mit welcher Methode hast du es eingebunden?

Quote
1) this method require Apache webserver with mod_rewrite enabled
2) this method require Apache webserver
Oder hast du es einfach mit (http://......signature.php) in die Signature eingebunden?


Code: [Select]
[url=http://<deineaddresse>/signature.php?go=1][img]http://<deineaddresse>/signature.php[/img][/url] per bbcode oder

Code: [Select]
<a href=http://<deineaddresse>/signature.php?go=1><img src="http://<deineaddresse>/signature.php"></a> per html
Title: Re: Signature image v2.21
Post by: Nicky on July 07, 2005, 04:59:19 PM
/me slaps V@no with correct version number :)

okay, will hier nicht mehr stören, have phun ppl.
Title: Re: Signature image v2.21
Post by: maikew on July 07, 2005, 05:02:34 PM
@ benda

hier der link zu meiner "funpic" signatur  :mrgreen:
http://maikew.ma.funpic.de/4images/signature.php
Title: Re: Signature image v2.21
Post by: maikew on July 07, 2005, 05:04:00 PM
/me slaps V@no with correct version number :)

okay, will hier nicht mehr stören, have phun ppl.

wo ändere ich die versionsnummer? in der index.php?
oder soll ich es so stehen lassen?:D
Title: Re: Signature image v2.21
Post by: Nicky on July 07, 2005, 05:40:48 PM
constants.php
// Script version
define('SCRIPT_VERSION', '1.7.1');

oder wenn nicht der fall ist in template footer.html
Title: Re: Signature image v2.21
Post by: V@no on July 08, 2005, 12:21:28 AM
why whould u change version number if the code is not v1.7.1?
/me actualy has no idea what u guys talking about...nvm if he got it wrong
Title: Re: Signature image v2.21
Post by: maikew on July 08, 2005, 06:27:39 PM
constants.php
// Script version
define('SCRIPT_VERSION', '1.7.1');

oder wenn nicht der fall ist in template footer.html

wenn ich in der constants.php die scriptversion auf 1.7 stelle,kann die datenbank nicht
mehr gefunden werden :(
in der footer.html steht nur {script_version}  :?:

hier die config.php (in der mysql_default.sql steht auch script version 1.8 und ich schwöre ich hab das nicht geändert  :mrgreen:

Code: [Select]
<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: config.php                                           *
 *        Copyright: (C) 2002 Jan Sorgalla                                *
 *            Email: jan@4homepages.de                                    *
 *              Web: http://www.4homepages.de                             *
 *    Scriptversion: 1.8                                                  *
 *                                                                        *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (Lizenz.txt) für weitere Informationen.                 *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (Licence.txt) for further information.                              *
 *                                                                        *
 *************************************************************************/

$db_servertype "mysql";
$db_host "localhost";
$db_name "";
$db_user "";
$db_password "";

$table_prefix "4images_";

define("4IMAGES_ACTIVE"1);

?>
Title: Re: Signature image v2.21
Post by: Vincent on July 10, 2005, 10:46:24 PM
Hello
on some signature on click you get direct to the same picture then in the sicnature.php.
i think it works with ?go=1

is it possible it is not working on a Windows server?

sincerly
vincent
Title: Re: Signature image v2.21
Post by: V@no on July 10, 2005, 11:11:31 PM
is it possible it is not working on a Windows server?
I dont see any limitations due to a server's system...
Title: Re: Signature image v2.21
Post by: Vincent on July 10, 2005, 11:59:25 PM
so this part ?go=1 i have to add just behind the signature.php

--- i have this script ----------
Code: [Select]
[url=http://www.foto-kocher.com/signature.php?go=1][img]http://www.foto-kocher.com/signature.php[/img][/url]
vincent
Title: Re: Signature image v2.21
Post by: V@no on July 11, 2005, 12:02:04 AM
everything is discribed in the original post. Yes, right after the signature.php in the url.
Title: Re: Signature image v2.21
Post by: V@no on July 11, 2005, 12:05:16 AM
ok, try to replace
Code: [Select]
$url = $site_sess->url(ROOT_PATH."index.php", "&"); with:
Code: [Select]
$url = $site_sess->url("http://www.foto-kocher.com/index.php", "&");
Originaly ROOT_PATH was not supposed to be used with full local path as u have, it was supposed to have relative path.
Title: Re: Signature image v2.21
Post by: Vincent on July 11, 2005, 12:19:03 AM
still not working!

and could you please tell me how to add the picture name and catecory?

vincent
Title: Re: Signature image v2.21
Post by: V@no on July 11, 2005, 03:38:13 AM
Sorry, Vincent, I was in a hurry to go watch "Fantastic 4" movie :D


Just search for $site_sess->url() parts and replace ROOT_PATH the same way as I've described above.

Regarding image name and category, I dont have a sollution for u at the moment, sorry.
Title: Re: Signature image v2.21
Post by: Vincent on July 11, 2005, 07:17:28 AM
Hello V@no

"Regarding image name" Problem - i think you have the Picture Name below your Randompict!

vincent
Title: Re: Signature image v2.21
Post by: V@no on July 11, 2005, 07:53:16 AM
well, my signature code is completly different then the published one...
Title: Re: Signature image v2.21
Post by: Vincent on July 11, 2005, 08:02:03 AM
 :P
it looks also different  :wink:

ok so i am happy with what i have!

Vincent
Title: Re: Signature image v2.21
Post by: benda on July 14, 2005, 06:05:28 PM
Ich hab in mein 4images phpBB integriert.
Ich würd gern in meiner Signature den letzten User und die Anzahl der User die grad online sind anzeigen lassen. Hab auch ein mod für phpBB Signature gefunden. http://www.phpbb.de/viewtopic.php?t=26079&highlight=signature+php
Leider ist mein php nicht so gut. Hab es probiert, aber leider nicht hin bekommen. Vielleicht hat ja noch jemand phpBB integriert der mehr von php versteht  :roll: und der es umschreiben könnt.

Würd mich freuen.

ps. werd es solang selbst weiter probieren....
Title: Re: Signature image v2.21
Post by: dontstay on July 19, 2005, 04:32:59 AM
Hello,

I'm trying to change the font for my image. I downloaded the converter to convert the font I wanted to use to GD, and uploaded them to my server, and in the signature.php file I specified what directory I had uploaded the fonts to, but the images generated are still using the default font. How would I go about changing the font to that of my own? Thank you so much for your help!
Title: Re: Signature image v2.21
Post by: V@no on July 19, 2005, 08:53:27 AM
did u update these two lines?
Code: [Select]
$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!
the $fonts array the correct structure?
Code: [Select]
$fonts = array(
               6  => "micross8px.gdf",
               7  => "micross9px.gdf",
               8  => "micross10px.gdf",
               9  => "micross12px.gdf"
);
and did u specify your new font in $fsize variable?
Title: Re: Signature image v2.21
Post by: fiskedagboken on July 19, 2005, 09:12:36 AM
I tried to install this mod. Unfortunatly I got this message when I was trying to see my signature.php

<b>Warning</b>:  readfile(): SAFE MODE Restriction in effect.  The script whose uid is 21 is not allowed to access /tmp/signature.tmp owned by uid 81 in <b>/home/kunder/7166/megapixeln.net/4images/signature.php</b> on line <b>359</b><br />

I have tried to chmod the tmp directory to 777, but it did´nt help.

Is there something I can do to bypass the SAFE MODE in this mod ?
Title: Re: Signature image v2.21
Post by: dontstay on July 20, 2005, 12:08:12 AM
did u update these two lines?
Code: [Select]
$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!
the $fonts array the correct structure?
Code: [Select]
$fonts = array(
               6  => "micross8px.gdf",
               7  => "micross9px.gdf",
               8  => "micross10px.gdf",
               9  => "micross12px.gdf"
);
and did u specify your new font in $fsize variable?

Yes; I did all of that, and the default fonts are still showing up for me.

This is what I have:

Code: [Select]
$fonts_dir = "/signatures/"; //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!
/*
//an example array:
$fonts = array(
               6  => "AntigoneBd.gdf",
               7  => "micross8px.gdf",
               8  => "micross9px.gdf",
               9  => "BeyondWonderland.gdf"
);
*/
$fsize = 1; //font type (1 - 5)
Title: Re: Signature image v2.21
Post by: V@no on July 20, 2005, 12:40:08 AM
@fiskedagboken:
try manualy remove the tmp/signature.tmp file

Yes; I did all of that, and the default fonts are still showing up for me.

This is what I have:

Code: [Select]
$fonts_dir = "/signatures/"; //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!
/*
//an example array:
$fonts = array(
 6 => "AntigoneBd.gdf",
 7 => "micross8px.gdf",
 8 => "micross9px.gdf",
 9 => "BeyondWonderland.gdf"
);
*/
$fsize = 1; //font type (1 - 5)
your $fsize is still set to use build-in font ( 1 ). your new fonts are avalable with numbers starting with 6 and whatever is your last font number is. (in your case its 9)
Title: Re: Signature image v2.21
Post by: fiskedagboken on July 20, 2005, 08:21:24 AM
Tnx V@no  for taking the time to answer me.
I have no signature.tmp file in my tmp map.
This is a link to my signature.php   http://www.megapixeln.net/4images/signature.php
Title: Re: Signature image v2.21
Post by: V@no on July 20, 2005, 02:26:34 PM
Tnx V@no  for taking the time to answer me.
I have no signature.tmp file in my tmp map.
This is a link to my signature.php   http://www.megapixeln.net/4images/signature.php
ok, then create a folder where you account has access to and make it writible and update your signature.php
Title: Re: Signature image v2.21
Post by: fiskedagboken on July 20, 2005, 05:24:10 PM
Tnx v@no


(http://www.megapixeln.net/4images/signature.php) (http://www.megapixeln.net/4images/signature.php?go=1)
Title: Re: Signature image v2.21
Post by: Vincent on July 27, 2005, 01:58:27 PM
Hello V@no
could you show me how to add the small country flag on the signature?
i would like to have them just below the
Onlie: xx members


sincerly
vincent
Title: Re: Signature image v2.21
Post by: bibabobu on July 28, 2005, 11:43:57 PM
Could somebody help me.
i have a windows server and apache.

i get these error messages:
Code: [Select]
Warning: imagecreatefrompng() [function.imagecreatefrompng]: './signatures/' is not a valid PNG file in /is/htdocs/wp1015398_0TDZ7CIHLH/www/galerie/signature.php on line 284

Warning: imagesx(): supplied argument is not a valid Image resource in /is/htdocs/wp1015398_0TDZ7CIHLH/www/galerie/signature.php on line 285

Warning: imagesy(): supplied argument is not a valid Image resource in /is/htdocs/wp1015398_0TDZ7CIHLH/www/galerie/signature.php on line 286

Warning: imagecolorallocate(): supplied argument is not a valid Image resource in /is/htdocs/wp1015398_0TDZ7CIHLH/www/galerie/signature.php on line 287

Warning: imagecolorallocate(): supplied argument is not a valid Image resource in /is/htdocs/wp1015398_0TDZ7CIHLH/www/galerie/signature.php on line 288

Warning: imagestring(): supplied argument is not a valid Image resource in /is/htdocs/wp1015398_0TDZ7CIHLH/www/galerie/signature.php on line 290

Warning: imagestring(): supplied argument is not a valid Image resource in /is/htdocs/wp1015398_0TDZ7CIHLH/www/galerie/signature.php on line 300

Warning: imagestring(): supplied argument is not a valid Image resource in /is/htdocs/wp1015398_0TDZ7CIHLH/www/galerie/signature.php on line 300

Warning: imagestring(): supplied argument is not a valid Image resource in /is/htdocs/wp1015398_0TDZ7CIHLH/www/galerie/signature.php on line 300

Warning: imagestring(): supplied argument is not a valid Image resource in /is/htdocs/wp1015398_0TDZ7CIHLH/www/galerie/signature.php on line 300

Warning: imagestring(): supplied argument is not a valid Image resource in /is/htdocs/wp1015398_0TDZ7CIHLH/www/galerie/signature.php on line 300

Warning: imagestring(): supplied argument is not a valid Image resource in /is/htdocs/wp1015398_0TDZ7CIHLH/www/galerie/signature.php on line 300

Warning: imagestring(): supplied argument is not a valid Image resource in /is/htdocs/wp1015398_0TDZ7CIHLH/www/galerie/signature.php on line 300

Warning: imagestring(): supplied argument is not a valid Image resource in /is/htdocs/wp1015398_0TDZ7CIHLH/www/galerie/signature.php on line 300

Warning: imagestring(): supplied argument is not a valid Image resource in /is/htdocs/wp1015398_0TDZ7CIHLH/www/galerie/signature.php on line 300

Warning: imagestring(): supplied argument is not a valid Image resource in /is/htdocs/wp1015398_0TDZ7CIHLH/www/galerie/signature.php on line 300

Warning: imagestring(): supplied argument is not a valid Image resource in /is/htdocs/wp1015398_0TDZ7CIHLH/www/galerie/signature.php on line 300

Warning: imagestring(): supplied argument is not a valid Image resource in /is/htdocs/wp1015398_0TDZ7CIHLH/www/galerie/signature.php on line 300

Warning: imagestring(): supplied argument is not a valid Image resource in /is/htdocs/wp1015398_0TDZ7CIHLH/www/galerie/signature.php on line 300

Warning: imagestring(): supplied argument is not a valid Image resource in /is/htdocs/wp1015398_0TDZ7CIHLH/www/galerie/signature.php on line 300

Warning: imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image dimensions in /is/htdocs/wp1015398_0TDZ7CIHLH/www/galerie/signature.php on line 337

Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /is/htdocs/wp1015398_0TDZ7CIHLH/www/galerie/signature.php on line 340

Warning: imagecopymerge(): supplied argument is not a valid Image resource in /is/htdocs/wp1015398_0TDZ7CIHLH/www/galerie/signature.php on line 344

Warning: imagerectangle(): supplied argument is not a valid Image resource in /is/htdocs/wp1015398_0TDZ7CIHLH/www/galerie/signature.php on line 345

Warning: imagepng(): supplied argument is not a valid Image resource in /is/htdocs/wp1015398_0TDZ7CIHLH/www/galerie/signature.php on line 348

Warning: imagedestroy(): supplied argument is not a valid Image resource in /is/htdocs/wp1015398_0TDZ7CIHLH/www/galerie/signature.php on line 349

Warning: Cannot modify header information - headers already sent by (output started at /is/htdocs/wp1015398_0TDZ7CIHLH/www/galerie/signature.php:284) in /is/htdocs/wp1015398_0TDZ7CIHLH/www/galerie/signature.php on line 354

Warning: Cannot modify header information - headers already sent by (output started at /is/htdocs/wp1015398_0TDZ7CIHLH/www/galerie/signature.php:284) in /is/htdocs/wp1015398_0TDZ7CIHLH/www/galerie/signature.php on line 355

Warning: Cannot modify header information - headers already sent by (output started at /is/htdocs/wp1015398_0TDZ7CIHLH/www/galerie/signature.php:284) in /is/htdocs/wp1015398_0TDZ7CIHLH/www/galerie/signature.php on line 356

Warning: Cannot modify header information - headers already sent by (output started at /is/htdocs/wp1015398_0TDZ7CIHLH/www/galerie/signature.php:284) in /is/htdocs/wp1015398_0TDZ7CIHLH/www/galerie/signature.php on line 357

Warning: Cannot modify header information - headers already sent by (output started at /is/htdocs/wp1015398_0TDZ7CIHLH/www/galerie/signature.php:284) in /is/htdocs/wp1015398_0TDZ7CIHLH/www/galerie/signature.php on line 358

Warning: readfile(/tmp/signature.tmp) [function.readfile]: failed to open stream: No such file or directory in /is/htdocs/wp1015398_0TDZ7CIHLH/www/galerie/signature.php on line 359

i think i have the wrong paths.

i dont have a /tmp folder.  do ihave to create one?

Ok. Problem is solved!!!  :D

(http://www.industrie-gravuren.de/galerie/signature.php) (http://www.industrie-gravuren.de/galerie/signature.php?go=1)
Title: Re: Signature image v2.21
Post by: Gulper on August 04, 2005, 03:08:16 PM
Followed all steps exactly as described here.... but calling the script just brings up an empty page.... tested it on my modified version of 4images and also on a new and clean installation... both 4images version are 1.7.1.... Script and jpeg.gif are in root... signature.gif is in folder signatures.... maybe anyone knows why it is not working?
Title: Re: Signature image v2.21
Post by: V@no on August 04, 2005, 03:14:11 PM
a link to the signature please?
and if u wish u can PM me with its source code.
Title: Re: Signature image v2.21
Post by: bibabobu on August 04, 2005, 10:51:16 PM
I thiought it should be a signature.png in the signature folder.
not a .gif file.
perhaps that is the reason.
Title: Re: Signature image v2.21
Post by: ID25 on August 14, 2005, 05:18:50 PM
V@no: maybe you can post your signature.php there?

there is clock and other features, looks good..
Title: Re: Signature image v2.21
Post by: maikew on August 28, 2005, 02:29:08 PM
hello v@no,

how can i add "total downloads"  in my signature?
i try this "$lang_downloads = "Downloads: "; but it's not working :(
Title: Re: Signature image v2.21
Post by: TheOracle on August 28, 2005, 07:34:14 PM
Did you also added the $lang_downloads string into the $stats string ?
Title: Re: Signature image v2.21
Post by: maikew on August 28, 2005, 11:52:05 PM
yes i try this  :oops:


$stats = array(
                     array(array($fsize, $offset2+$tiny, $lang_downloads, "text_color"), array($fsize, $far, $show['downloads'], "text_color"))

Title: Re: Signature image v2.21
Post by: TheOracle on August 28, 2005, 11:59:12 PM
Quote

$stats = array(
                     array(array($fsize, $offset2+$tiny, $lang_downloads, "text_color"), array($fsize, $far, $show['downloads'], "text_color"))


Are you sure the $show['downloads'] source is correctly assigned with that SQL statement ?
Title: Re: Signature image v2.21
Post by: maikew on August 29, 2005, 12:12:46 AM
no,i'm not sure  :oops: :mrgreen:
can you help me plz?

what i must add to my signature.php to show "total  downloads"  :oops:

sorry for my outstanding english  :roll: :lol:
Title: Re: Signature image v2.21
Post by: TheOracle on August 29, 2005, 12:33:29 AM
Post your entire SQL statement regarding the total downloads and I will take a look at it.
Title: Re: Signature image v2.21
Post by: maikew on September 01, 2005, 12:06:06 PM
i will post it later,thank you for help :)
Title: Re: Signature image v2.21
Post by: srijit on September 04, 2005, 06:36:20 PM
where can i change the XY co-ords of the image? am guessing somewhere in this part.....
Code: [Select]
$posx = round(($offset2-$width_end)/2);
    $posy = round(($height-$height_end)/2);
    imagecopymerge($im,$temp, $posx, $posy, 0, 0, $width_end, $height_end, 100);
    ImageRectangle($im, $posx-1, $posy-1, $posx+$width_end-1, $posy+$height_end-1, $text_color);

is it possible to have the image at a position that i can set? i can find out the exact pixel position from photoshop. also how can i reduce the size of the random image?
Title: Re: Signature image v2.21
Post by: hyde101 on September 15, 2005, 10:51:56 PM
Hello V@no / Oracle,

I have been using the old signature, the one that was out with the old forum...
I just created a new signature2.php with the code you've given on this topic, the new version,
however when i check signature.php and signature2.php, they display the exact same thing.. How is that possible?
It seems like signature2.php is duplicate of signature.php (it shouldn't be because on signature.php i changed the images, comments, etc.. to different words.)

how is this possible?
Thanks
Title: Re: Signature image v2.21
Post by: Xyu BAM on September 16, 2005, 07:27:27 AM
make sure you specifyed two different names for the temp files in two different signatures:
Code: [Select]
$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)
Title: Re: Signature image v2.21
Post by: hyde101 on September 16, 2005, 03:37:43 PM
I will try again.
Thanks
Title: Re: Signature image v2.21
Post by: eZz on October 04, 2005, 05:05:01 PM
i have a problem whit the fonts.

the font wont change i have did all i can but font wont chainge

part of my signatures.php
Code: [Select]
$fonts_dir = "/signatures/"; //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  => "nu.gdf",
               9  => "micross12px.gdf"
);
*/
$fsize = 8; //font type (1 to 5 for build-in fonts and 6 to XX for your custom fonts (see $font array above)

Title: Re: Signature image v2.21
Post by: hyde101 on October 04, 2005, 05:18:56 PM
Isn't supposed to be truetype font?
Title: Re: Signature image v2.21
Post by: eZz on October 04, 2005, 05:28:39 PM
now i have a other problem

when i go
http://ez.pri.ee/signature.png

i get error

" The image “http://ez.pri.ee/signature.png” cannot be displayed, because it contains errors. "

heres my signature.php

Code: [Select]
<?php
################################
#  signature.php version 2.21  #
# - - - - - - - - - - - - - - -#
#    Copyright © V@no 2004     #
################################
#                              #
#        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 "100"//image quality when used jpeg
define('ROOT_PATH''./'); //path to your 4images root dir
$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 "7dana"//name of the template which icons will be used, if thumbnail not found
$sitename "Statistika ez.pri.ee"//signature header
$fonts_dir "/font/"//directory with custom fonts WITH TRAILING SLASH! (leave blank if no fonts)
$fonts = array(6); // 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  => "nu.gdf",
               7  => "micross9px.gdf",
               8  => "micross10px.gdf",
               9  => "micross12px.gdf"
);
*/
$fsize 6//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 "Pildid: ";
$lang_users "Liikmed: ";
$lang_cat "Katekooriad: ";
$lang_new_user "Uusim liige: ";
$lang_online "Online: ";
$lang_comments "Kommentaare: ";
// --------- 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);
      }
    }
  }
  
header("Location: ".$url);
  exit;
}
$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);
    }
    
$thumb = (empty($imagedata)) ? ICON_PATH."/".$noimage get_file_path($imagedata['image_media_file'], "thumb"$imagedata['cat_id']);
  }
  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,$quality);
  
ImageDestroy($im);
  
$handle = @fopen($tmptname"wb");
  
$contents = @fwrite($handle, (($random_image) ? $imagedata['image_id'] : 0));
  @
fclose($hande);
//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);
readfile($tmpfname);
?>

Title: Re: Signature image v2.21
Post by: Vincent on October 04, 2005, 09:59:03 PM
http://ez.pri.ee/signature.php
this link is not working so i can't see the error!
or what is the right path?
did you put the signature png file in the right directory?

vincent
Title: Re: Signature image v2.21
Post by: V@no on October 05, 2005, 12:08:11 AM
now i have a other problem

when i go
http://ez.pri.ee/signature.png

i get error

" The image “http://ez.pri.ee/signature.png” cannot be displayed, because it contains errors. "
That is perfectly normal error message, because its not a .png image you show, its your .php file, but because you changed extension from .php to .png, PHP on your server does not know that its supposed to execute that file and your server simply returns it as a text file.
Rename it back to .php then try access it.
Title: Re: Signature image v2.21
Post by: izone on October 06, 2005, 05:27:13 PM
V@no  thanks for all great job u have done on this.

How is it possible to show the country flag on this image, as yours.

Please Please help me with it. Thanks.

Best regards
Title: Re: Signature image v2.21
Post by: eZz on October 15, 2005, 12:16:07 PM
hey,

is this possebel to convert the signature to 128x32 pixels and it show a very little thumbnail and some info ?

i made a sample
(http://images.koffer.ee/images/uploaded/sample.png)
Title: Re: Signature image v2.21
Post by: eZz on October 21, 2005, 04:12:02 PM
hey,

is this possebel to convert the signature to 128x32 pixels and it show a very little thumbnail and some info ?

i made a sample
(http://images.koffer.ee/images/uploaded/sample.png)

anyone ???
Title: Re: Signature image v2.21
Post by: Matthias70 on October 28, 2005, 05:16:51 PM
Hab ich das was verpasst oder bin ich blind?
Wie schaffe ich es, dass das signature image auf die Detailseite des gerade angezeigten Bildes weiterleitet?

viele Grüße
Matthias
Title: Re: Signature image v2.21
Post by: Acidgod on October 28, 2005, 05:18:52 PM
To redirect to the last random image showed in the signature use: http://<youraddress>/signature.png?go=1

Bitte...
Title: Re: Signature image v2.21
Post by: Matthias70 on October 28, 2005, 05:23:24 PM
To redirect to the last random image showed in the signature use: http://<youraddress>/signature.png?go=1

Bitte...

Danke, ich muss wohl doch blind gewesen sein  :wink:
Title: Re: Signature image v2.21
Post by: Matthias70 on October 28, 2005, 05:33:59 PM
To redirect to the last random image showed in the signature use: http://<youraddress>/signature.png?go=1

Hm, irgendwie bekomme ich das nicht zum Laufen.
Muss die Zeile im Forum in die Signatur oder muss ich das irgendwo in die signature.php einbauen.

Momentan schaut meine signatur so aus:
Code: [Select]
[url=http://www.url.de/bildergalerie/][img]http://www.url.de/bildergalerie/signature/signature.php[/img][/url]
Dein Vorschlag läuft leider nicht
Code: [Select]
[url=http://www.url.de/bildergalerie/][img]http://www.url.de/bildergalerie/signature/signature.png?go=1[/img][/url]
Matthias

Quote
Title: Re: Signature image v2.21
Post by: Acidgod on October 28, 2005, 05:47:03 PM
klappt es jetzt?
Title: Re: Signature image v2.21
Post by: Matthias70 on October 28, 2005, 05:53:54 PM
klappt es jetzt?

Mit folgendem Code wird zwar die Signatur angezeigt, aber der Link führt auf meine Fehlerseite, d.h. das Zufallsbild wird nicht gefunden.
Code: [Select]
[url=http://www.url.de/bildergalerie/signature.php?go=1][img]http://www.gpaed.de/bildergalerie/signature/signature.php[/img][/url]
Findest du einen Fehler im Code?
Title: Re: Signature image v2.21
Post by: Acidgod on October 28, 2005, 07:26:02 PM
du scheinst was in der htaccess flash gemacht zu haben...
Title: Re: Signature image v2.21
Post by: Acidgod on October 28, 2005, 11:24:27 PM
If everything is done correctly, by executing the script (type in your browser: http://yoursiteurl/path_to_the_script/signature.php) u should see the image.


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

Der Part fehlt dir dafür...
Title: Re: Signature image v2.21
Post by: Matthias70 on October 28, 2005, 11:49:09 PM
Hallo Acidgod,
das Umschreiben mit der htaccess Datei funktioniert zwar, aber mir wird nach wie vor eine Fehlerseite angezeigt.
Habe gerade beschlossen, aufzugeben, so wichtig ist die Weiterleitung auf die Detailseite auch wieder nicht  :roll:

Danke für deine Hilfe
viele Grüße
Matthias
Title: Re: Signature image v2.21
Post by: V@no on October 29, 2005, 12:01:19 AM
This is wrong:
Quote
define('ROOT_PATH', '/www/htdocs/v030672/bildergalerie/'); //path to your 4images root dir
The path must be relative ( ./ or ../ or cobination of these ) and not full local path!
Title: Re: Signature image v2.21
Post by: Matthias70 on October 29, 2005, 12:13:43 AM
This is wrong:
Quote
define('ROOT_PATH', '/www/htdocs/v030672/bildergalerie/'); //path to your 4images root dir
The path must be relative ( ./ or ../ or cobination of these ) and not full local path!

With this hint I solved my problem in less than 2 Minutes.
V@no somtimes I wonder, if there is a problem you cannot solve  :wink:

BTW there is one  :mrgreen: :mrgreen:
http://www.4homepages.de/forum/index.php?topic=6729.msg50064#msg50064

Matthias
Title: Re: Signature image v2.21
Post by: V@no on October 29, 2005, 12:17:04 AM
I guess I should add that note to the tutorial ;)
Title: Re: Signature image v2.21
Post by: karlyn on November 20, 2005, 04:40:25 PM
Hello!

I got this working and I enjoy it. Thank you for it!

I would like to show total downloads and maybe even "new downloads" also if possible, but when trying to add total downloads, I think I have the stats area written in wrong because it down not display, or I'm missing something else that I need.

array(array($fsize, $offset2+$tiny, $lang_downloads, "text_color"), array($fsize, $far, $show['downloads'], "text_color")),

Thanks in advance for your help.
- karlyn
Title: Re: Signature image v2.21
Post by: V@no on November 20, 2005, 06:42:06 PM
You also need this mysql query:
Code: [Select]
// --- Total comments -----
  $sql = "SELECT SUM(image_downloads) AS sum
          FROM ".IMAGES_TABLE;
  $row = $site_db->query_firstrow($sql);
  $show['downloads'] = $row['sum'];
Title: Re: Signature image v2.21
Post by: karlyn on November 21, 2005, 12:07:21 AM
That's the ticket, thank you V@no!  :D
Title: Re: Signature image v2.20.2
Post by: karlyn on November 21, 2005, 01:38:50 AM
I read/reread these status messages up and down and tried and tried and I just can't get my yahoo status to work.

Did I put this in wrong?

$statusimages = "/thegallery/"; //the directory where online.gif offline.gif and unknown.gif images are.
$statusurl = "http://osi.lostinspacehosting.com:81/"; //the url of status indicator server. WITH TRAILING SLASH!
//list of messengers
$messengers = array(
  "yahoo"   => "iamawahm"
);



u can try this:
replace
Code: [Select]
// --------- End Config ----------
with:
Code: [Select]
$statusimages = "/www/onlinestatusimgs/"; //the directory where online.gif offline.gif and unknown.gif images are.
$statusurl = "http://osi.lostinspacehosting.com:81/"; //the url of status indicator server. WITH TRAILING SLASH!
//list of messengers
$messengers = array(
  "icq" => "85389818",
  "aim"   => "JensF200x",
  "yahoo"   => "jensfunk"
);
// --------- End Config ----------

function online($id, $what)
{
  global $statusurl;
  $url = parse_url($statusurl);
  $header = "";
  if ($request = @fsockopen($url['host'], ((isset($url['port'])) ? $url['port'] : 80), $header, $header, 3))
  {
    fputs($request, "GET /$what/$id HTTP/1.0\r\nHost: ".$url['host']."\r\n\r\n");
    $header = fread($request, 200);
    fclose($request);
    if (strstr($header, "online"))
    {
      return true;
    }
    if (strstr($header, "unknown"))
    {
      return 2;
    }
    else
    {
      return false;
    }
  }
  return 2;
}

Then find:
Code: [Select]
  $function = "Image".$type;Insert above:
Code: [Select]
  $i = 0;
  $n = array_rand($messengers, count($messengers));
  $left = ($width/2) - (48*count($messengers)/2) - 14;
  foreach ($n as $key)
  {
    $status = online($messengers[$key], $key);
    $img = ($status) ? (($status === true) ? "online" : "unknown") : "offline";
    $st = imagecreatefromgif($statusimages.$key.$img.".gif");
    imagecopymerge($im, $st, ($left+$i), ($height-25), 0, 0, 48, 25, 100);
    $i += 48;
  }
edit the settings.
Title: Re: Signature image v2.21
Post by: maikew on November 21, 2005, 05:13:02 AM
have the same problem.my icq status won't work too  :oops:
Title: Re: Signature image v2.21
Post by: V@no on November 21, 2005, 06:20:32 AM
Quote
Warning: Invalid argument supplied for foreach() in /home/frkarlyn/public_html/thegallery/signature.php on line 390
Title: Re: Signature image v2.21
Post by: karlyn on November 21, 2005, 06:38:59 AM
Line 390 is :

  foreach ($n as $key)

I'm not sure what to do with that.
Any suggestions on what I'm missing?
Title: Re: Signature image v2.21
Post by: V@no on November 21, 2005, 07:03:16 AM
attach your signature.php to your reply (u might need change extension to .txt)
Title: Re: Signature image v2.21
Post by: karlyn on November 21, 2005, 08:04:37 AM
Thank you for checking it out!  It's much appreciated.

signature.php.txt (changed to .txt for this purpose) is attached.

- Karlyn
Title: Re: Signature image v2.21
Post by: V@no on November 21, 2005, 08:11:48 AM
Hmm...apperently array_rand() function does not work when only one item in the array is present...
replace
Code: [Select]
  $n = array_rand($messengers, count($messengers));with:
Code: [Select]
  $n = $messengers;
Title: Re: Signature image v2.21
Post by: karlyn on November 21, 2005, 08:21:13 AM
Thank you. Done.
My signature graphic displays now, but still no yahoo images displaying. I still must have something else written the wrong way. Maybe a path?
Title: Re: Signature image v2.21
Post by: geohei on November 21, 2005, 09:06:35 PM
Something else ...

I have several private categories (visible only after permissions are set) in my image gallery. These are also shown in the signature thumb. Is it possible to exclude those from being displayed in the signature?

Thanks,
Title: Re: Signature image v2.21
Post by: maikew on November 21, 2005, 10:32:05 PM
same prob @vano.my icq graphic won't work.:(

i attached my signature,please check it out  :oops:
my icq graphics (icqoffline,icqonline and icqunknown.gif are in the right folder "icq" with chmod 777)  :?:

thank you
maike
Title: Re: Signature image v2.21
Post by: V@no on November 22, 2005, 12:57:34 AM
ok, replace
Code: [Select]
  foreach ($n as $key)
  {
    $status = online($messengers[$key], $key);
with:
Code: [Select]
  foreach ($n as $key => $val)
  {
    $status = online($val, $key);
Title: Re: Signature image v2.21
Post by: maikew on November 22, 2005, 01:07:33 AM
V@NO YOU ROCK !!!!!!!!! it works *happydance*  :mrgreen: thank you :)
Title: Re: Signature image v2.21
Post by: maikew on November 22, 2005, 02:59:55 AM
*ROFL* another problem  :roll:
now,my status is always unknown  8O but i'm online  :?:
same problem with yahoo  :?
i think i'm to stupid. :mrgreen:

ports are all forwarded and i checked my icq preferences but i'm sure ,the settings are correct. :|
Title: Re: Signature image v2.21
Post by: V@no on November 22, 2005, 03:05:39 AM
now,my status is always unknown 8O but i'm online :?:
same problem with yahoo :?
Its not related to this mod at all ;) You'd better of asking it there: http://www.onlinestatus.org/

Proof:
http://snind.gotdns.com:8080/icq/140584099 = (http://snind.gotdns.com:8080/icq/140584099) (I guess its ok showing your ICQ number here ;))
Title: Re: Signature image v2.21
Post by: maikew on November 22, 2005, 03:11:53 AM
okay,thank you v@no :)
but this board is currently unavailable.i try it later  :|
i have no prob to schow my icq number it's okay ;)

maybe you tell me a little about your host??  :mrgreen: your host is working  :mrgreen:  :mrgreen:
thanks a lot
Title: Re: Signature image v2.21
Post by: V@no on November 22, 2005, 03:26:45 AM
maybe you tell me a little about your host?? :mrgreen: your host is working :mrgreen: :mrgreen:
sorry, I run my own host, very private, not accesible from outside ;)
Perhaps you could try other hosts listed on the site I mentioned above ;)
Title: Re: Signature image v2.21
Post by: maikew on November 23, 2005, 01:30:51 AM
hmm...there are no hosts on this site you write above. :oops:
i try to run my own host,but it doesen't work too  :?
can you help me?
my status images are on my extern webserver and i adding this path
in my status.conf  :?but nothing works.my signature image are unknown  :cry:

but locally works right 8O
http://maike.homeip.net:8080/140584099
i'm offline right now and it shows the right status image  :?:





Title: Re: Signature image v2.21
Post by: V@no on November 23, 2005, 01:53:17 AM
then use that host
Title: Re: Signature image v2.21
Post by: maikew on November 23, 2005, 02:02:56 AM
 i use this host,but my status on my signature are unknown  :oops:
see attached sig.txt

Title: Re: Signature image v2.21
Post by: V@no on November 23, 2005, 02:34:14 AM
wierd, I just tested that server and it showed my ICQ status just fine...did u enable showing your online status on web in ICQ itself?
Title: Re: Signature image v2.21
Post by: maikew on November 23, 2005, 03:16:49 AM
V@no,on my home windows server it works fine .the signature.php shows my status icons correct  :mrgreen:
now i'm happy, because i know i'm not stupid  :mrgreen: *LOL*

maybe "funpic" don't support any of this features  :?:
Title: Re: Signature image v2.21
Post by: maikew on November 24, 2005, 03:15:44 PM
V@no,my msn status icon is always unknown.which port use msn messenger? i try port 1863 but this don't work  :(
and in my signature.php my messenger id looks like maike_w@msn.com,is this correct????  :?

thanks for help
maike
Title: Re: Signature image v2.21
Post by: V@no on November 24, 2005, 04:37:28 PM
You must add the bots account into your msn messnegers buddy's list.
Title: Re: Signature image v2.21
Post by: maikew on November 24, 2005, 04:51:37 PM
thank you V@no,but how can i add the bot to my buddylist? i can't find it.  :oops:
Title: Re: Signature image v2.21
Post by: V@no on November 24, 2005, 05:06:21 PM
Contacts -> Add contact
:?

P.S. dont know why we are discusing it here, it has nothing to do with the signature...
Title: Re: Signature image v2.21
Post by: geohei on November 24, 2005, 11:22:30 PM
P.S. dont know why we are discusing it here, it has nothing to do with the signature...
Right. My question has to do with the signature :)
Something else ...

I have several private categories (visible only after permissions are set) in my image gallery. These are also shown in the signature thumb. Is it possible to exclude those from being displayed in the signature?

Thanks,
Title: Re: Signature image v2.21
Post by: V@no on November 24, 2005, 11:44:22 PM
You can list the categories IDs that you dont want to see thumbnails from:
Code: [Select]
$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
Title: Re: Signature image v2.21
Post by: maikew on November 25, 2005, 11:49:15 AM
sorry for this mistake V@no you're right. :oops:
Title: Re: Signature image v2.21
Post by: Fastian on November 27, 2005, 08:03:17 PM
I am trying to use this feature.

Is there any other nice looking image ".png" that can be used for signature.

Anywebsite that provide few ??  Or if any of you like to share some other images.

I need something in Dark Gray or Redish Brown
Title: Re: Signature image v2.21
Post by: mawenzi on November 27, 2005, 08:35:48 PM
When you are a "Good Learner" ... than it is not a great thing to make your own png (with PS or something else ...) ...  :wink:
Title: Re: Signature image v2.21
Post by: GooSe_1977 on November 28, 2005, 08:25:42 PM
hmm, ich bekomm "Die Grafik "http://www.bastian-dammers.de/images/4images/signature.php" kann nicht angezeigt werden, weil sie Fehler enthält."

hab den Text von der ersten seite kopiert und hochgeladen, den ordner für das .png erstellt und eins von den vorlagen genommen ........
Title: Re: Signature image v2.21
Post by: Darkness2001 on November 29, 2005, 10:44:57 AM
Hallo,

verry nice MOD  :D

Greez Darkness  :mrgreen:
Title: Re: Signature image v2.21
Post by: GooSe_1977 on November 29, 2005, 11:17:04 AM
jetzt kommt einfach gar nichts mehr  :?:

Code: [Select]
// ------- Config -----------
$random_image = 1; //show random image
$random_fast = 0; //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', './images/4images/'); //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 = 0; //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!
/*

so sieht meine config aus, hab ich das was falsch ?
Title: Re: Signature image v2.21
Post by: Kyo on December 03, 2005, 08:18:30 PM
Code: [Select]
<b>Warning</b>:  readfile() has been disabled for security reasons in <b>/home/foto/public_html/signature.php</b> on line <b>359</b><br />

where is the problem? :roll:
Title: Re: Signature image v2.21
Post by: GooSe_1977 on December 03, 2005, 10:38:49 PM
I don't undersatand what youre trying to tell me  :roll:
Title: Re: Signature image v2.21
Post by: V@no on December 03, 2005, 10:47:51 PM
Try replace
Code: [Select]
readfile($tmpfname); with one of the following:
Code: [Select]
echo file_get_contents($tmpfname);or
Code: [Select]
echo implode('', file($tmpfname));
If still doesnt work, contact your hoster and ask them to allow use readfile() function.



@GooSe_1977:
If you cant get error logs, nobody would be able to help you.
Title: Re: Signature image v2.21
Post by: DrknMnky on December 28, 2005, 05:44:22 AM
 :oops: Im having a problem with
Code: [Select]
$peruser = ($peruser && isset($_GET['user']) && intval($_GET['user'])) ? intval($_GET['user']) : "";

Didn't even look over it im so tired I cant even see straight :(

Just trying to finish this (Big head ache) lol
Title: Re: Signature image v2.21
Post by: V@no on December 28, 2005, 08:19:22 AM
is there a question in your message?
Title: Re: Signature image v2.21
Post by: DrknMnky on December 28, 2005, 08:37:01 AM
Parse error: parse error, unexpected T_STRING in /mysite/signature.php on line 66


... coding error? :?:
Title: Re: Signature image v2.21
Post by: V@no on December 28, 2005, 09:45:19 AM
... coding error? :?:
yep
Title: Re: Signature image v2.21
Post by: DrknMnky on December 28, 2005, 09:49:47 AM
Well lol 8O How do i fix it? :mrgreen:
Title: Re: Signature image v2.21
Post by: V@no on December 28, 2005, 10:02:21 AM
Well lol 8O How do i fix it? :mrgreen:
restore backups and try again.
Whatever you've changed in the code produced the error.
Title: Re: Signature image v2.21
Post by: DrknMnky on December 28, 2005, 10:09:38 AM
I didn't change anything but what your first post said

this is line 66.

$peruser = ($peruser && isset($_GET['user']) && intval($_GET['user'])) ? intval($_GET['user']) : "";

Thats also the code from your post..


I've reinstalled twice.

3rd times the charm? ;)
Title: Re: Signature image v2.21
Post by: DrknMnky on December 28, 2005, 10:21:06 AM
No luck :(
Title: Re: Signature image v2.21
Post by: V@no on December 28, 2005, 02:50:39 PM
rename your signature.php into signature.phps and post the url to it. If posting url not possible, then open the renamed signature.phps in your browser, and PM me with the code it showed you.
Title: Re: Signature image v2.21
Post by: Lunique on January 03, 2006, 02:28:24 AM
Hi

everything works fine but unfortunately on the webspace I use hotlinking is not allowed so I can't use the image anywhere else than on the page of my gallery

Is there a way to store the signature template on any other server ?

hugs Luna
Sorry for my bad english...
Title: Re: Signature image v2.21
Post by: V@no on January 03, 2006, 08:13:10 AM
template?
if your "anti hotlinking" feature is based on mod_rewrite in .htaccess, and you can modify it the way you want it to, then you can adjust it to ignore requests to signature.php
Title: Re: Signature image v2.21
Post by: Lunique on January 03, 2006, 05:29:17 PM
I'm sorry with template I mean the signature.png images
I'm only holding webspace on this server and are not paying for it so I don't have permission to hotlink anything. It's www.funpic.de where I am
But I have another webspace where hotlinking is allowed (but I've got no database, mysql there so I can't run 4images there)
Is it possible to store the signature.php at the 4image root server and the png-image at my other webspace ?
hugs & thanks Luna
Title: Re: Signature image v2.21
Post by: V@no on January 04, 2006, 12:25:06 AM
No, you can not. I can provide you with a code that would download the signature image from your funpic.de site and then display it like its located on other host.
but your account on funpic.de would use as much bandwidth as the filesize of generated image (on each request) and your other host will use up DOUBLE of that bandwidth, because it will have to download the image and then send it back to the browser.
Title: Re: Signature image v2.21
Post by: Lunique on January 04, 2006, 12:29:07 AM
Thanks a lot I think I will look for better webspace...
hugs Luna
Title: Re: Signature image v2.21
Post by: Fastian on January 19, 2006, 10:26:56 PM
Can I show total downloads and Hits ?? If yes, then how ?

I dont want to show Comments coz I don't have any  :(
Title: Re: Signature image v2.21
Post by: SAD on January 23, 2006, 01:46:58 PM
very nice mod!
Title: Re: Signature image v2.21
Post by: Eagle Eye on January 28, 2006, 12:48:27 AM
Hello V@no
could you show me how to add the small country flag on the signature?
i would like to have them just below the
Onlie: xx members


sincerly
vincent

coooool!!!
V@no, please show us how to do it ;)
Title: Re: Signature image v2.21
Post by: bibabobu on February 01, 2006, 06:45:21 PM
 :cry:
 Hello!
Something mysterious has happened to my signature in this forum. I receive red cross image error.
I changed nothing to my code for the last few weeks.

I think I get this error message
Quote
Fatal error: imagepng() [<a href='function.imagepng'>function.imagepng</a>]: gd-png: fatal libpng error: zlib error in /is/htdocs/wp1015398_0TDZ7CIHLH/www/galerie/signature.php on line 349
What has happen :?:

Did my provider changed something?
Any idea?

EDIT:
Just had a look in my php server information for giving some more information.
Quote
ZLib Support  enabled 
Stream Wrapper support  compress.zlib:// 
Stream Filter support  zlib.inflate, zlib.deflate 
Compiled Version  1.2.1 
Linked Version  1.2.1 

Directive Local Value Master Value
zlib.output_compression Off Off
zlib.output_compression_level -1 -1
zlib.output_handler no value no value

P.S. My signature was working perfect for a long time
Title: Re: Signature image v2.21
Post by: V@no on February 02, 2006, 12:16:31 AM
You should contact your hoster, they must have changed something recently in the server setup, seems that PHP was not compiled correctly.
Title: Re: Signature image v2.21
Post by: V@no on February 03, 2006, 02:11:46 AM
This code is using 4images' default function get_file_path so, if it returns 404 image, then it means some of you images in the gallery missing.
Try this plugin and see if any files are missing:
http://www.4homepages.de/forum/index.php?topic=6760.0
Title: Re: Signature image v2.21
Post by: mawenzi on February 03, 2006, 10:59:37 AM
@ ivan

... um diesen bug zu umgehen (bis eine Lösung gefunden ist) kannst du folgendes machen ...
... nimm dein Lieblings-Thumbnail -> wandele es ins gif-Format um -> benenne es 404.gif -> kopiere es nach /templates/<dein_template>/icons/ -> mache eine Sicherung von deiner alten 404.gif ...
... oder du definierst dein $noimage mit deinem Lieblings-Thumbnail ...
... nun wirst du "file not found" nicht mehr in deiner Signatur sehen ...
... dafür vielleicht öfter dein Lieblings-Thumbnail ... und niemanden fällt es auf ...
Title: Re: Signature image v2.21
Post by: V@no on February 03, 2006, 02:33:38 PM
and do you have any remote files (thumbnails/media files)?
Title: Re: Signature image v2.21
Post by: mawenzi on February 03, 2006, 06:55:04 PM
@ ivan

... bei mir kam das auch vor ...
... doch wie ich das Problem gelöst habe ... weist du ja nun ...  :wink:
... ich nehme an, dass der random-Auswahlvorgang nach einer bestimmten Zeit abgebrochen wird ...
... und das passiert abhängig von der Bilderzahl, der Serverlast oder ...
... und dann wird eben "file not found" eingefügt ...
Title: Re: Signature image v2.21
Post by: Chicco on February 14, 2006, 12:31:52 PM
NUn muss ich wohl doch auch einen Beitrag schreiben, da anscheinend ich der einzige bin, der nunr JPGs in seiner Galerie hat.

Die Signature usw. funktioniert alles prima soweit. Nur wird immer das jpeg.gi als Thumbnail angezeigt, da ihc keine jpeg-Bilder habe. Ich habe nur JPG-Bilder und keine JPEG-Bilder. Also habe ich mal alles im Script von JPEG auf JPG umgewandelt und bekomme aber nun plötzlich folgende Meldung:

DB Error: Bad SQL Query: CREATE TEMPORARY TABLE tab_883866 TYPE = HEAP SELECT i.image_id, i.cat_id FROM 4images_images i LEFT JOIN 4images_categories c ON c.cat_id = i.cat_id WHERE i.image_active = 1 AND c.auth_viewcat = 0 AND i.cat_id NOT IN (20) ORDER BY RAND() LIMIT 1
Access denied for user: 'web517@localhost' to database 'usr_web517_1'

DB Error: Bad SQL Query: SELECT t.image_id, t.cat_id, i.user_id, i.image_name, i.image_media_file, i.image_thumb_file FROM tab_883866 AS t LEFT JOIN 4images_images AS i ON i.image_id=t.image_id
Table 'usr_web517_1.tab_883866' doesn't exist

DB Error: Bad SQL Query: DROP TABLE tab_883866
Unknown table 'tab_883866'

Fatal error: Call to undefined function: imagejpg() in /var/www/web517/html/THEPICTUREWORLD/signature.php on line 348


Was ist nun das Problem? Sobald er quasi ein Bild nun endlich findet, macht es terror...

Habe daraufhin dann im Script das random-fast auf 0 mal gesetzt und habe nun nur noch diese Fehlermeldung:
Fatal error: Call to undefined function: imagecreatefromjpg() in /var/www/web517/html/THEPICTUREWORLD/signature.php on line 338

Aber nun weiss ich nicht mehr weiter...
Title: Re: Signature image v2.21
Post by: V@no on February 15, 2006, 06:06:12 AM
DB Error: Bad SQL Query: CREATE TEMPORARY TABLE tab_883866 TYPE = HEAP SELECT i.image_id, i.cat_id FROM 4images_images i LEFT JOIN 4images_categories c ON c.cat_id = i.cat_id WHERE i.image_active = 1 AND c.auth_viewcat = 0 AND i.cat_id NOT IN (20) ORDER BY RAND() LIMIT 1
Access denied for user: 'web517@localhost' to database 'usr_web517_1'
Title: Re: Signature image v2.21
Post by: Chicco on February 15, 2006, 09:40:06 AM
Sorry for my English.

This is no my problem! I have make "random-fast to 0" on the signature.php.

And now i have this Problem:
Fatal error: Call to undefined function: imagecreatefromjpg() in /var/www/web517/html/THEPICTUREWORLD/signature.php on line 338

Look for my Problem:
http://www.thepictureworld.de/signature.php

I have only JPG-Files in my Gallery and NO JPEG-Files!
if i make in the signature.php of JPEG, is the script running and i see ONLY the JPEG.GIF. But if i make in the script to JPG i see this code:
Fatal error: Call to undefined function: imagecreatefromjpg() in /var/www/web517/html/THEPICTUREWORLD/signature.php on line 338

Deutsch:
Das ist ja nicht mehr mein Problem! Habe in der signature.php das "random-fast = 0" nun gesetzt. Jetzt habe ich nur noch dieses Problem:
Fatal error: Call to undefined function: imagecreatefromjpg() in /var/www/web517/html/THEPICTUREWORLD/signature.php on line 338

Also nochmal. ich habe keine JPEG-Files sondern nur JPG-Files in meiner Galerie. Lasse ich im Script es auf JPEG funktioniert das Script aber zeigt mir nur die JPEG.GIF an, da ich ja keine Bilder in diesem Format habe. Ändere ich das Script auf JPG, so bekomme ich diese Fehlermeldung. Warum???

Hier könnt ihr mein momentanes Problem sehen:
http://www.thepictureworld.de/signature.php
Title: Re: Signature image v2.21
Post by: V@no on February 15, 2006, 09:41:49 AM
Are you sure that your host has GD enabled? if not (which is seems like it), you can not use this script...
Title: Re: Signature image v2.21
Post by: Chicco on February 15, 2006, 09:51:50 AM
Yes. my GD ist enabled.

Look:
http://www.thepictureworld.de/phpinfo.php
Title: Re: Signature image v2.21
Post by: V@no on February 15, 2006, 02:35:25 PM
Ok, how about you test any scripts with the original code provided with only configuration changes and then when you make sure its working properly you start modifying it for your needs? Otherwise you modify something you are not supposed to, break the sript and then trying to get support ;)
Hope you understand what I'm trying to say.
Title: Re: Signature image v2.21
Post by: izone on February 15, 2006, 03:09:37 PM
Chicco

Your sig. works fine for me!
Title: Re: Signature image v2.21
Post by: Chicco on February 15, 2006, 03:18:21 PM
Yes. I have make all new. New Script, new PNG-Template.....
But.....When I had already already used the original Script yesterday, it did not go! Now already! :roll: 8O

Sorry! :lol: :wink:

Deutsch:
Ich habe nun alles nochmal neu gemacht. Neues PHP-Datei und neue PNG-Template. Und nun funktioniert es plötzlich!!! Dabei war es gestern eigentlich genauso. Alles genau so gemacht wie im Forum es drin steht bzw. wie ich es heute auch gemacht habe! Aber da ging es nicht! Könnte kot....!!! ;-)

Es tut mir leid, das ich nun so manchen genervt habe! Trotzdem vielen Dank für Eure Hilfe!

Sorry
Title: Re: Signature image v2.21
Post by: egozent on February 22, 2006, 04:06:08 PM
Wie kann ich das Ganze auf Deutsch anzeigen lassen?
Ich habe zwar in der signature.php die Punkte "Bilder", "Mitglieder", usw. bereits umbenannt,
doch dahinter steht dann "new", "not activated", usw. Diese Punkte konnte ich nicht finden.
Title: Re: Signature image v2.21
Post by: egozent on February 24, 2006, 02:04:19 PM
Erst einmal danke für die Hilfe.
Allerdings gibt es ein kleines Problem:
1 Gast    -    2 Gäste
Wie kann ich den Code umbauen,
daß es so angezeigt wird.
Denn bisher können bei Plural
nur Buchstaben angehängt werden.
Title: Re: Signature image v2.21
Post by: martrix on February 25, 2006, 06:50:18 PM
Die Zeile als solche ist ja schon die Lösung ;)

ändere die Zeile einfach so:
Code: [Select]
$online = " ( ".$show['reg_online'].(($show['reg_online'] > 1 || !$show['reg_online'])? "Mitglieder" : "Mitglied")." und ".$show['guests_online'].(($show['guests_online'] > 1 || !$show['guests_online'])? "Gäste" : "Gast").")";
Funzt es?
Title: Re: Signature image v2.21
Post by: egozent on February 25, 2006, 08:14:22 PM
Hm, hab's bei mir mal eingebaut.
Allerdings kann ich nicht sagen, ob es geht,
da momentan nur ich auf der Seite bin.. :wink:
Bin leider in PHP nicht so fit. Aber mir war klar,
daß es wohl kein ohne Akt sein dürfte.
Title: Re: Signature image v2.21
Post by: martrix on February 25, 2006, 11:37:24 PM
ehm...  :|
Title: Re: Signature image v2.21
Post by: mawenzi on February 25, 2006, 11:44:13 PM
@ ivan,

nur zur Richtigstellung ... der Dank gebührt ... martrix ... !
Title: Re: Signature image v2.22
Post by: V@no on February 26, 2006, 01:51:31 AM
A little bug fixed that only affects servers with PHP v5.1.x installed and PNG signature.
Replaced at the end of the file
Code: [Select]
  $function($im,$tmpfname,$quality);
With this:
Code: [Select]
  $function($im,$tmpfname,(($type == "png") ? 9 : $quality));
Title: Re: Signature image v2.21
Post by: martrix on February 27, 2006, 02:13:59 PM
martrix, du bist natürlich auch der beste  :P
So etwas liest sich ja gut :D
Title: Re: Signature image v2.22
Post by: bibabobu on February 27, 2006, 04:36:35 PM
Thank you V@no!

Your Bugfix was exactly what i've been looking for.
My signature works again :D
I was wondering why it was destroyed, because i had changed nothing to my code.

Thanks one more.

Title: Re: Signature image v2.22
Post by: Eagle Eye on March 24, 2006, 02:02:12 PM
v@no, can you please tell us, how to add image name under the thumbnail on signatures?

:)
Title: Re: Signature image v2.22
Post by: Fastian on March 25, 2006, 07:12:05 PM
Hi V@no

Everything on my signature works fine.
Today I tried to use it on the forum (I am finally getting the sense that my site is almost done  :wink: )

When I try to use " Signature.php?go=1 " to redirect. I got such URL.

domain.com/Signature.php?go=1 <br />

I can't find any <br/> tag in my signature.php
From where it is coming ?
Title: Re: Signature image v2.22
Post by: V@no on March 25, 2006, 09:36:42 PM
Sorry, I have no clue...and tell you the truth, I dont know what are you talking about...
Title: Re: Signature image v2.22
Post by: Fastian on March 25, 2006, 10:58:20 PM
I was saying that
When I click on my signature, The URL that opens up in new window look like this

http://www.domain/signature.php?go=1 <br />
An extra <br/> in the end.

Anyway, I found out the problem.
I am convinced. I do stupid things certain times.  :oops:
Title: Re: Signature image v2.22
Post by: ciprianmp on March 28, 2006, 08:50:59 PM
Thank you V@no! Very cool mod!
I have it installed for a year or so, but as a phpbb one. Demo bellow:
(http://ciprianmp.com/forum/signature.php)
Now that I saw yours, which is very cool, I thought... let's upgrade :)
The features that I love most are the online status for the messengers. I've read all 18 pages last night, but I don't think you told us how to include the skype status as well. So, my question is: can you help me add the skype status to my signature? (I also miss the images for the skype status, so you might share them if you are so kind...).
How do I include the flags into my signature? But the clock? These would be very advanced and cool "How to's", if you'll share them, of course :lol:
Thank you in advance! Good job!
Title: Re: Signature image v2.22
Post by: ciprianmp on March 28, 2006, 09:03:30 PM
Another question...
My signature shows the total_categories (5). What should I change to extract the number of the private categories (let's say... 3 of them ar not publicaly accesible, so I want to show only 2 categories available). Is that possible?
Thanks!
Title: Re: Signature image v2.22
Post by: V@no on March 29, 2006, 01:46:34 AM
I've posted some information about skype status on another (http://www.onlinestatus.org/forum/viewtopic.php?t=27) forum, more related to that stuff ;)

As of categories, you can replace
Code: [Select]
         FROM ".CATEGORIES_TABLE;with:
Code: [Select]
         FROM ".CATEGORIES_TABLE."
         WHERE auth_viewcat < ".AUTH_ACL;
Title: Re: Signature image v2.22
Post by: Stoleti on March 29, 2006, 01:56:05 AM
how added the flag from who are watching (browsing the signature) how in V@no signature !?
Title: Re: Signature image v2.22
Post by: ciprianmp on March 29, 2006, 09:15:29 AM
Thank you V@no for the skype hint! I posted there the issues I still have :p

On the other hand, using AUTH_ACL still shows me the private categories in total...
I fixed it with:
Code: [Select]
         FROM ".CATEGORIES_TABLE."
         WHERE auth_viewcat < 2";
Also this works:
Code: [Select]
         FROM ".CATEGORIES_TABLE."
         WHERE cat_id NOT IN ($not_in_cat)";
Any other solution? Which one do you think it's better? I think the first one... (< 2).

What about the clock and flag?
Title: Re: Signature image v2.22
Post by: V@no on March 29, 2006, 02:55:16 PM
I guess, you are missusing word "private" in this case ;)
Private - is when only selected members can see, but in your case you call "private" the categories that ANY registered members can see. In that case you can use AUTH_USER instead of AUTH_ACL

The clock I'm using is made by this class:
http://analogclock.caiphp.com/

and the flags are based on this mod:
http://www.4homepages.de/forum/index.php?topic=6709.0
Title: Re: Signature image v2.22
Post by: Stoleti on March 29, 2006, 04:57:36 PM
I guess, you are missusing word "private" in this case ;)
Private - is when only selected members can see, but in your case you call "private" the categories that ANY registered members can see. In that case you can use AUTH_USER instead of AUTH_ACL

The clock I'm using is made by this class:
http://analogclock.caiphp.com/

and the flags are based on this mod:
http://www.4homepages.de/forum/index.php?topic=6709.0

But how added on signature  :oops:
Title: Re: Signature image v2.22
Post by: ciprianmp on March 29, 2006, 10:16:56 PM
Ok V@no, I added the phpclock to my website: http://ciprianmp.com/plain.php or http://ciprianmp.com/plain.png (rewriten with .htaccess)
I tryed some tricks to add it to my signature image, but I failed (of course, how else?!)
How do I actually create a temporary physical plain.png (clock image) to use it in signature.php?
Please teach me how to add that clock bellow the picture displayed from the gallery (I mean in the right side down). Or at least the function and the caller which merge/embede that clock image into the template. Pleaseeeee.... :p
Thank you!
Title: Re: Signature image v2.22
Post by: ciprianmp on March 30, 2006, 03:32:50 AM
Ok V@no, kill me softly babes! (I've done the hard work myself)

Now I have the clock in, my skype status works like a charm, but there is only one issue:
How do I reload the clock? I made clock script create a clock.png file every refresh of the clock skin file (http://ciprianmp.com.plain.php - the png results in http://ciprianmp.com/clock/clock.png)
Then I use the clock.png file in the signature.php:
Code: [Select]
//include_once('./plain.php');
    $st = imagecreatefrompng("./clock/clock.png");
    imagecopymerge($im, $st, 20, 90, 0, 0, 55, 55, 100);
The result is nice, but if I don't comment out the include line, this will happen:
- at first load of signature.php, only the clock is shown (as a result of the plain.php file included); it also creates the according clock.png file;
- at the next reload/refresh, the signature shows up correct.
The cycle starts over overy time, which is not what we need...

There is a better solution for this? I thought we might use a different script to generate de png file continously or every several minutes. (like a refresh page somewhere on the website). Could this be a solution?
Please give me the final hint...

As for the flags ... I wondered: Why should I tell my visitors which country are they from? Are they so stupid? Oh, if I could show them my country, that would make more sense, but at this point... I give up on flags in signature image... :)

PS: I found a misspelling in your signature.php file (line 352):
Code: [Select]
@fclose($hande);
...should really be:
Code: [Select]
@fclose($handle);
:wink:
Title: Re: Signature image v2.22
Post by: ciprianmp on March 30, 2006, 05:21:05 PM
Well, that was my bad! My plain.php (clock skin) file was returning both a .png file and a temporary image to be shown. Therefore, my signature first showed the clock, then, on the second load, the full image.
Now this is the right function in clock.php:
Code: [Select]
  function DrawPNG()
  {
    header('Content-type: image/png');
//    imagepng($this->im); //only shows the clock
    imagepng($this->im,"./clock/clock.png"); //generates the file
    imagedestroy($this->im);
  }
Then in signature.php, I have:
Code: [Select]
include('./plain.php');
    $st = imagecreatefrompng("./clock/clock.png");
    imagecopymerge($im, $st, 20, 90, 0, 0, 55, 55, 100);
 
(hint: 20 & 90 = position of the clock; 55 & 55 = size of the clock - same as the pixels' size of the clock image)

And here I am... my clock shows up very smooth and exact in my image stats signature!!!
Thank you all for your help! V@no, you rock man! So do I :D

See bellow??? Nice one, hah?
Title: Re: Signature image v2.22
Post by: ciprianmp on March 31, 2006, 11:02:32 PM
Hello again!
As you can see... I love challlenges! So I added the country flag, IP and country name, eventhough... it's quite senseless... But here you are!
Title: Re: Signature image v2.22
Post by: ciprianmp on March 31, 2006, 11:48:25 PM
V@no, here's a new challenge!
I just tested my signature with a friend of mine back in Romania. I'm abroad and therefore I use a Hong-Kong ISP right now. It seems we opened the signature.php file in the same time, which showed him the same image as it showed to me (I mean... the data which he could view were actually mine: HongKong, my IP) . But i put him refesh and he got the right data: Romania, his IP.
Is this possible, right?
Then, here's the challenge: how can we generate different temp images for each different viewer? Then distroy every image as they got loaded?
Do you have any idea? I will think myself for some piece of code, but as I said... let's try a fix together... You first?  :mrgreen:

PS: why haven't you dropped me a line for two days?  :( I saw you've read my posts and made the suggested correction to the code (first page). Please say something  :P

See ya!
Title: Re: Signature image v2.22
Post by: V@no on April 01, 2006, 01:12:38 AM
Then, here's the challenge: how can we generate different temp images for each different viewer? Then distroy every image as they got loaded?
Do you have any idea? I will think myself for some piece of code, but as I said... let's try a fix together... You first?  :mrgreen:
I've fixed this problem by using IP of the visitor as the  filename for cached signature. It seems to work quiet well, except after almost 1.5 years since I made this signature, I just looked in the temp folder where the cached signatures are saved and my jaw fell on table...there were over 70,000 files and total size of the folder was over 3gb...hopefuly a solution for simular issue was requested not long time ago, so its easy to create cron job that would automaticaly clean up that folder every NN days.

PS: why haven't you dropped me a line for two days?  :( I saw you've read my posts and made the suggested correction to the code (first page). Please say something  :P
Because I didnt have to...you are one of not so many (unfortunetly) people here who dont sit and wait for an answer, but trying figure out by yourself ;)
Title: Re: Signature image v2.22
Post by: ciprianmp on April 01, 2006, 01:32:29 AM
Very cool solution (the ip.png file)! Pretty doable though!
Now what about the cron job? I think we could use a clean up script in the signature.php, using the time of the files to delete those older then one day, at every load I mean... If you're talking about cron job, it makes me think about those in the cpanel. Was that what you're talking about?
I'll try to figure out a piece of code to do that. If you have something to let me start with, it would be cool. If not, it's ok... I got some ideas. TTY you soon! ;)

Thank you for the second input!
Title: Re: Signature image v2.22
Post by: Stoleti on April 01, 2006, 02:30:12 AM
how change the color of letter to "white" in signature ??

can someone help me ?
Title: Re: Signature image v2.22
Post by: ciprianmp on April 01, 2006, 03:03:03 AM
Search for this line:
Code: [Select]
  $text_color = ImageColorAllocate ($im, 0, 0, 0);Change the values to: ($im, 255, 255, 255);

Here is a link which shows you the HTML color codes: http://www.geocities.com/SiliconValley/Network/2397/
Title: Re: Signature image v2.22
Post by: Stoleti on April 01, 2006, 04:32:00 AM
Search for this line:
Code: [Select]
  $text_color = ImageColorAllocate ($im, 0, 0, 0);Change the values to: ($im, 255, 255, 255);

Here is a link which shows you the HTML color codes: http://www.geocities.com/SiliconValley/Network/2397/

 :P thanks alot :D
Title: Re: Signature image v2.22
Post by: V@no on April 01, 2006, 06:31:11 AM
This is the command could be used to clean up cache directory:
http://www.4homepages.de/forum/index.php?topic=8476.msg65065#msg65065
Title: Re: Signature image v2.22
Post by: elvedix on April 08, 2006, 02:59:46 PM
V@no tnx for nice code....
Title: Re: Signature image v2.22
Post by: BartAfterDark on April 09, 2006, 08:16:04 PM
It wont show the members right for me.
It shows members 45 but there is over 4400 members. How can that be?
I used the code V@no posted on the first site.
Title: Re: Signature image v2.22
Post by: tripiyon on May 01, 2006, 09:28:36 PM
Hello to all,
I would like to know if the possibility that exists the Visualizations and the Unloadings of the gallery are seen?



P.D.: I hope you prune to excuse my English, I have had to use a translator  :roll:
(Espero podáis disculpar mi inglés, he tenido que usar un traductor)
Title: Re: Signature image v2.22
Post by: V@no on May 02, 2006, 02:17:32 AM
Sorry, I did not understand your question.
Title: Re: Signature image v2.22
Post by: tripiyon on May 02, 2006, 11:36:25 AM
I feel it, I will try to explain itself. 
Would like that it was possible to be seen I in the signature, which I put next:

{total_hits}
{total_downloads}


(http://www.galeriatripiyon.com/galeria/data/media/6/stats.jpg)
Title: Re: Signature image v2.22
Post by: tripiyon on May 08, 2006, 03:42:16 PM
You follow without understanding V@no to me?
Title: Re: Signature image v2.22
Post by: flo31083 on May 16, 2006, 06:14:09 AM
kan mir das vielleicht jemand auf deusch erklären bei mir funktioniert nur die hälfte ich bin schon am verzweiflen sry

this problem here:

DB Error: Bad SQL Query: CREATE TEMPORARY TABLE tab_883866 TYPE = HEAP SELECT i.image_id, i.cat_id FROM 4images_images i LEFT JOIN 4images_categories c ON c.cat_id = i.cat_id WHERE i.image_active = 1 AND c.auth_viewcat = 0 AND i.cat_id NOT IN (0) ORDER BY RAND() LIMIT 1
Benutzer 'ncf152'@'89.110.129.53' hat keine Zugriffsberechtigung für Datenbank 'usr_ncf152_4'

DB Error: Bad SQL Query: SELECT t.image_id, t.cat_id, i.user_id, i.image_name, i.image_media_file, i.image_thumb_file FROM tab_883866 AS t LEFT JOIN 4images_images AS i ON i.image_id=t.image_id
Tabelle 'cc45f1552_4.tab_883866' existiert nicht

DB Error: Bad SQL Query: DROP TABLE tab_883866
Unbekannte Tabelle 'tab_883866'

Warning: Cannot modify header information - headers already sent by (output started at /home/www/ncf152/html/Abcd_gallerie/includes/db_mysql.php:188) in /home/www/cc5/html/Abcd_gallerie/signature.php on line 354

Warning: Cannot modify header information - headers already sent by (output started at /home/www/ncf152/html/Abcd_gallerie/includes/db_mysql.php:188) in /home/www/cc5/html/Abcd_gallerie/signature.php on line 355

Warning: Cannot modify header information - headers already sent by (output started at /home/www/ncf152/html/Abcd_gallerie/includes/db_mysql.php:188) in /home/www/cc5/html/Abcd_gallerie/signature.php on line 356

Warning: Cannot modify header information - headers already sent by (output started at /home/www/ncf152/html/Abcd_gallerie/includes/db_mysql.php:188) in /home/www/cc5/html/Abcd_gallerie/signature.php on line 357

Warning: Cannot modify header information - headers already sent by (output started at /home/www/ncf152/html/Abcd_gallerie/includes/db_mysql.php:188) in /home/www/cc5/html/Abcd_gallerie/signature.php on line 358
Title: Re: Signature image v2.22
Post by: V@no on May 16, 2006, 08:53:00 AM
Quote
$random_fast = 1; //if your mysql account doesn't have permission to create/delete temporary tables, set this to 0
Set it 0
Title: Re: Signature image v2.22
Post by: ciprianmp on May 29, 2006, 11:59:27 PM
Hello again V@no!

Not sure about the reason, but my MSN status isn't shown on my signature, eventhough I've tried like 5 OSI servers this month. What server do you use for that?

PS: it might be the Windows Live Mesenger I upgraded to? No support for that? What do you think?
Thank you!
Title: Re: Signature image v2.22
Post by: V@no on May 30, 2006, 05:59:13 AM
The OSI updated to v6 recently, try find a server with updated status.jar
Title: Re: Signature image v2.22
Post by: idijotaz on May 31, 2006, 12:18:17 PM
ok... first where can i get gd becouse i dont have that :D
Title: Re: Signature image v2.22
Post by: V@no on May 31, 2006, 02:40:08 PM
try google.
Title: Re: Signature image v2.22
Post by: izone on June 20, 2006, 06:29:41 PM
Quote
The clock I'm using is made by this class:
http://analogclock.caiphp.com/

this site is down now. Does anybody please have this script? if yes please send it to me!

thanks.
Title: Re: Signature image v2.22
Post by: ciprianmp on June 20, 2006, 07:46:12 PM
Here you go.... Good luck!
Title: Re: Signature image v2.22
Post by: izone on June 20, 2006, 08:35:56 PM
Thanks a lot ciprianmp! I need all luck :wink:
Title: Re: Signature image v2.22
Post by: idijotaz on June 21, 2006, 09:39:56 AM
how to make it work, if my path to gallery is: /var/www/vhosts/laisvalaikis.yours.lt/httpdocs
tmp is: /var/www/vhosts/laisvalaikis.yours.lt/tmp
Title: Re: Signature image v2.22
Post by: V@no on June 21, 2006, 03:04:10 PM
not sure what is that your question...then use that path (make sure you added slash at the end)
Title: Re: Signature image v2.22
Post by: idijotaz on June 21, 2006, 07:10:53 PM
ok ive made it working... Thanks for help  :wink:
Title: Re: Signature image v2.22
Post by: Heinrich-Uwe on July 24, 2006, 01:19:34 PM
bekomme fehler anzeige
im Browser

Security violationSecurity violationSecurity violation
Fatal error: Cannot instantiate non-existent class: db in /home/virtual/netz-effect.net/public_html/fotoheinrich/signature.php on line 132

scheint er kann auf die datenbank nicht zugreifen ??? warum hat einer eine idee

Danks
Title: Re: Signature image v2.22
Post by: Fryz on August 01, 2006, 12:16:54 PM
ich hab da auch ein problem...

wenn ich die signature.php aufrufe, erscheint "Die Grafik "http://alkoven.al.funpic.de/signature.php" kann nicht angezeigt werden, weil sie Fehler enthält."
vielleicht kann mir jemand einen tip geben ;)
Title: Re: Signature image v2.22
Post by: V@no on August 01, 2006, 03:32:27 PM
the directory set in $path variable is not accessible by your signature.php, syou you'll need create a new folder "tmp" in the same directory where signature.php is, make sure its CHMOD 777. Then use this line:[qcode]$path = "./tmp/"; // WRITEBLE dir (chmod 777), where compilled image will be stored (does not requere access from web)
[/qcode]
Title: Re: Signature image v2.22
Post by: Fryz on August 01, 2006, 05:24:06 PM
great... thank you very much!!!
Title: Re: Signature image v2.22
Post by: Fryz on August 03, 2006, 01:04:17 PM
jetzt hätte ich noch 2 fragen:
wie und wo kann ich den link auf meine galerie ( http://fryz.fr.funpic.de/4images ) einfügen?
wie kann ich die angezeigte schriftfarbe ändern?

Danke :)
Title: Re: Signature image v2.22
Post by: Fryz on August 05, 2006, 11:31:52 AM
ich stell mich wirklich zu doof an...
wenn ich diese .htaccess erstelle und in das verzeichnis kopiere, geht gar nicht mehr. beim aufrufen der seite oder er signature.php...  erscheint nur eine fehlerseite. egal welche art von .htaccess ich verwende :(




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

Title: Re: Signature image v2.22
Post by: commode59 on August 08, 2006, 12:18:23 AM
merci beaucoup pour ce code, très beau travail  :mrgreen:
Title: Re: Signature image v2.22
Post by: ccsakuweb on August 12, 2006, 05:15:29 PM
hi v@no! i have the next error:
Code: [Select]
An unexpected error occured. Please try again later.

An unexpected error occured. Please try again later.

maybe it is because i didn´t install GD v2.x but i thougth that 4images 1.7.3 have it because in ACP my thumbnails is making with GD... where can i find this program or script? i´m searching in google but i don´t find it..
Title: Re: Signature image v2.22
Post by: annam on August 31, 2006, 12:51:37 PM
Hi. Is it possible to change the signature.php in any way so that I can publish on the frontpage of my joomla site?
I just wanted the thumbnail to show, not the details of the forum :)
Could anyone here please give me some light?
Thank you!
Title: Re: Signature image v2.22
Post by: V@no on August 31, 2006, 03:18:05 PM
we have a mod for that "[mod] random image" :?
Title: Re: Bildergallery braucht Hilfe mit $new_cutoff
Post by: e-trader_2002 on September 14, 2006, 11:16:41 PM
hallo zusammen,
ich benutze diesen mod schon länger

1.) doch bin ich mit der neuen bilder abfrage nicht zufrieden
ich möchte gerne die new_cutoff wie im acp

// --- Total new images -----
  $new_cutoff = 45; // oder $config['new_cutoff']; | Anzahl neue Bilder im ACP
  $new_cutoff = time() - 60 * 60 * 24 * $new_cutoff;

wenn ich dies wie oben benutze, funktioniert dies einwandfrei.
aber wenn es $new_cutoff = $config['new_cutoff']; werden die neuen bilder mit (0 new) angezeigt!
ich habe dies auch in der statistik eingebaut und dort funktioniert es einwandfrei

...

danke für die hilfe

danke für die antwort

Hi ivan,

I just solved your problem #1 (How to use the value $new_cutoff from ACP in signature.php):

Step 1: Find in signature.php:

[qcode]
// --- 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'];
[/qcode]

Insert above:

[qcode]
// --- new_cutoff -----
  $sql = "SELECT setting_value
          FROM ".SETTINGS_TABLE."
          WHERE setting_name = 'new_cutoff'";
  $row = $site_db->query_firstrow($sql);
  $show['new_cutoff'] = $row['setting_value'];
 
[/qcode]

Step 2: Find in signature.php:

[qcode]
// --- 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'];
[/qcode]

and change it to:

[qcode]
// --- Total new images -----
  $new_cutoff = time() - 60 * 60 * 24 * $show['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'];
[/qcode]

It works fine with my signature.php and I hope it will help you too.

Greetings

e-trader_2002
Title: Re: Signature image v2.22
Post by: V@no on September 15, 2006, 01:59:31 AM
very good :)

just a little change could save you from needing step 2:
instead of
Code: [Select]
  $show['new_cutoff'] = $row['setting_value'];use
Code: [Select]
  $new_cutoff = $row['setting_value'];no need step 2 anymore ;)
Title: Re: Signature image v2.22
Post by: Sternie on September 18, 2006, 10:59:58 PM
Kann mir das bitte mal jemand verdeutschen :(

ich habe es eigentlich alles soweit hinbekommen, bis auf das wechselnde Bild in der Signatur. Es wird immer das von mir angegebene Bild genommen für: kein gefundenes Bild.

Ich bin ehrlich gesagt schon an Schritt 2 mit meinem englisch gescheitert. Ich weiß z.B. nicht, ob es reicht nur einen neuen Ordner signatures anzulegen oder ob da noch Unterordner wie tmp angelegt werden müssen.  :roll:

Wäre es nicht möglich im ersten Post für Englisch-Nieten wie mich auch eine deutsche Anleitung hinzuzufügen?
Title: What's wrong with with my signature in this forum?
Post by: e-trader_2002 on September 19, 2006, 01:04:58 PM
Hi,

what's wrong with with my signature in this forum?
URL- and image-link are working but instead of the image itself the HTML-Code is displayed. You can see the result below.

Please give me a hint.

Thanks

e-trader_2002
Title: Re: Signature image v2.22
Post by: V@no on September 19, 2006, 01:26:20 PM
no offence, but with 40 posts of yours you still didnt notice such feature on this forum as BBCode?

http://www.4homepages.de/forum/Themes/default/help/posting.english.html#bbcref
Title: Re: Signature image v2.22
Post by: e-trader_2002 on September 19, 2006, 07:49:24 PM
Hi V@no,

off course I noticed that there is something like BBCode available in this forum and I gave it a few tries before posting my request for assistance. But still being a newbie I'm not familiar with that stuff. So even the link in your last post doesn't give me enough information to do the trick completely; only the grafic is displayed now but the link is still a separate text.
My signature now looks like this:

Code: [Select]
A hobby is a great way to spent time you actually don't have! :wink:
[URL]http://www.fruitsticker.de/4images/signature/tmp/signature.php?go=1]
[img]http://www.fruitsticker.de/4images/signature.php[/img][/URL]

I can't think of anything else to do about it and I wouldn't feel really offended, if you could post the full BBCode to displayed the complete grafic-link. :wink:

Thanks in advance

e-trader_2002
Title: Re: Signature image v2.22
Post by: V@no on September 20, 2006, 12:45:55 AM
You almost there ;)

[qcode]A hobby is a great way to spent time you actually don't have! :wink:
[url=http://www.fruitsticker.de/4images/signature/tmp/signature.php?go=1]
[
img]http://www.fruitsticker.de/4images/signature.php[/img][/url][/qcode]
Title: Re: Signature image v2.22
Post by: e-trader_2002 on September 20, 2006, 09:21:04 AM
Hi V@no,

thank you, as you can see it's working now. :D And all necessary information was indeed provided by the link you gave. But maybe after a long day at the office I was to tired to see it.  :roll:

e-trader_2002
Title: Re: Signature image v2.22
Post by: hyde101 on September 23, 2006, 05:35:12 AM
Hi everyone, didn't we have a lot of templates here? What happened to them, I hope someone could put some templates they are using for signature.png. I am looking for something with rocks or stones or mud, something like that.

Thank you very much,

last resort, i will try do one myself, but they always get distorted... :(
Title: Re: Signature image v2.22
Post by: V@no on September 23, 2006, 05:57:04 AM
last resort, i will try do one myself, but they always get distorted... :(
make sure you save your png templates in 24bit ;)
Title: Re: Signature image v2.22
Post by: hyde101 on September 23, 2006, 04:39:35 PM
I will try, thanks V@no! :)
Title: Re: Signature image v2.22
Post by: e-trader_2002 on September 24, 2006, 08:17:44 AM
Hi,

there is a way to dynamically display the 4images version of your site in signature.php. Dynamically means, you can do it without defining it as a constant in signature.php itself and it will change automatically if you upgrade your version of 4images. In order to use this, it may be necessary to increase the height of your signature#.png files in \signatures also. You may use a grafic editor of your choice to do this.

To do this insert the red code-fragtments into signature.php:

[qcode]
$lang_online = "Online: ";
$lang_comments = "Comments: ";
$lang_version = "4images Version: ";
// --------- End Config ----------
[/qcode]

[qcode]
$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);
  $version = SCRIPT_VERSION;

// --- Random image -----
[/qcode]

[qcode]
  //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")),
                  array(array($fsize, $offset2+$tiny, $lang_version, "text_color"), array($fsize, $far, $version, "text_color"))
  );
  if ($signature_template_random)
[/qcode]

You can see the result in my signature below.

e-trader_2002
Title: Re: Signature image v2.22
Post by: hyde101 on September 30, 2006, 11:25:48 PM
How can I make (xxx new) part of the images RED color..
I tried something like this (which of course does not work).

Code: [Select]
array(array($fsize, $offset2+$tiny, $lang_images, "text_color"), array($fsize, $far, $show['total_images'], "text_color"), array($fsize, $offser2_$tiny, "(".$show['total_new_images']." new)", "red")),
Title: Re: Signature image v2.22
Post by: V@no on October 01, 2006, 12:25:01 AM
what is this?
$offser2_$tiny
Title: Re: Signature image v2.22
Post by: hyde101 on October 01, 2006, 05:31:35 AM
offset, mistype. But i was wondering, i realized that I must seperate the XX and (xxx new) strings by two arrays.
Images:  XX  (xxx new)

So, instead of two arrays in that part, it will be three arrays, so that we can have seperate color for them two.

And when seperated, I assumed the two new arrays must follow the same syntax, with 4 in both of them.
I didn't know how to put the offset so I copied from the first one, because I didn't know if I could just put a pixel there.
Still didn't work. :(
Title: Re: Signature image v2.22
Post by: annam on October 08, 2006, 05:34:46 PM
Hi. Is it possible to change the signature.php in any way so that I can publish on the frontpage of my joomla site?
I just wanted the thumbnail to show, not the details of the forum :)
Could anyone here please give me some light?
Thank you!
we have a mod for that "[mod] random image" :?
All this time I´ve been trying to fix that mod on my Joomla site, but I can´t do it :(
Could anyone here please give me some hint?


Title: Re: Signature image v2.22
Post by: |Rene| on November 23, 2006, 06:51:21 PM
Hallo, ich habe Probleme beim Anzeigen der Signatur. Habe möglichkeiten 1 und 2 bereits getestet. Wenn ich die PHP direkt Adressiere wird die Signatur angezeigt. Leider kann ich in meinem Forum (iphpbb) scheinbar nur Bilddateien verwenden. Wenn ich dafür also Methode zwei teste bekomme ich nur das bekannte X. Auch das Auskommentieren der Header Funktionen bringt nichts.

Jemand eine Idee woran es noch liegen könnte?
Title: Re: Signature image v2.22
Post by: ccsakuweb on November 30, 2006, 10:48:14 PM
Hi! Great mod Vano ;)
but.. i think that my server don't support it because I'm only obtain the signature in php and the third step. http://www.paxykochan.net/myart/signature.php/sig.png but http://www.paxykochan.net/myart/signature.png?go=1 doesn't works.

I try first option but i don't see the signature.. and if i use the second option my all website will be white... because is an error..
However I will use this with a target , but the signature image don't change and the thumbnail don't change too, I don't understand it because I have in settings $random_image = 1; //show random image. And I only have a signature in the folder, but it isn't your signature.. allways is the same signature... -.-
(http://www.paxykochan.net/myart/signature.php/sig.png) (http://www.myart.es)
Title: Re: Signature image v2.22
Post by: ELO on February 03, 2007, 07:48:22 PM
Hallo, ich habe Probleme beim Anzeigen der Signatur. Habe möglichkeiten 1 und 2 bereits getestet. Wenn ich die PHP direkt Adressiere wird die Signatur angezeigt. Leider kann ich in meinem Forum (iphpbb) scheinbar nur Bilddateien verwenden. Wenn ich dafür also Methode zwei teste bekomme ich nur das bekannte X. Auch das Auskommentieren der Header Funktionen bringt nichts.

Jemand eine Idee woran es noch liegen könnte?
Ich habe das selbe Problem (phpBBoard), gibt es schon eine Lösung dafür?
Hier geht es einwandfrei
Gruß
Michael
Title: Re: Signature image v2.22
Post by: Acidgod on February 03, 2007, 08:00:03 PM
kannst du den mod rewrite nutzen?
Title: Re: Signature image v2.22
Post by: ELO on February 03, 2007, 08:55:24 PM
kannst du den mod rewrite nutzen?
Welchen mod rewrite?
Gruß
Michael
Title: Re: Signature image v2.22
Post by: m.a on February 04, 2007, 01:29:43 AM
Hi,

beim signature.php abeufen kommt die Fehler-Meldung:
Warning: imagepng(): Unable to open './tmp/signature.tmp' for writing in /var/www/web1/html/signature.php on line 352
Warning: readfile(./tmp/signature.tmp): failed to open stream: No such file or directory in /var/www/web1/html/signature.php on line 367

Kann Jemand mir helfen?

Danke im Voraus
m.a
Title: Re: Signature image v2.22
Post by: m.a on February 05, 2007, 11:39:13 PM
hi,
ich hatte die meldung noch nie aber ich vermute dass du die rechte anders setzen musst.

probier mal einen ordner /tmp (haupt/root pfad) einzurichten und vergebe 777 rechte

so wie es aussieht kann er die signature.tmp nicht erstellen weil eben die rechte
oder sogar der ordner fehlt!

gruss ivan

Hi,
Danke ivan!
Du hast richtig gesagt, es war kein tmp Ordner erstellt.
Nach hin und her und Löschen von tmp Ordner, ich hab es vergessen noch Mal den Ordner tmp erstellen! :!:

Aber du hast vielen Dank!

Es funktioniert jetzt prima!
Dankeschön und Grüss
m.a
Title: Re: Signature image v2.22
Post by: ELO on April 04, 2007, 11:50:26 AM
Hallo, ich habe Probleme beim Anzeigen der Signatur. Habe möglichkeiten 1 und 2 bereits getestet. Wenn ich die PHP direkt Adressiere wird die Signatur angezeigt. Leider kann ich in meinem Forum (iphpbb) scheinbar nur Bilddateien verwenden. Wenn ich dafür also Methode zwei teste bekomme ich nur das bekannte X. Auch das Auskommentieren der Header Funktionen bringt nichts.

Jemand eine Idee woran es noch liegen könnte?
Ich habe das selbe Problem (phpBBoard), gibt es schon eine Lösung dafür?
Hier geht es einwandfrei
Gruß
Michael


Ich suche immer noch nach einer Lösung fürs phpbb , hat keiner eine Idee? :-(
Gruß
Michael
Title: Re: Signature image v2.22
Post by: JJLB on April 17, 2007, 04:49:51 PM
Hallo

Ich bekomme diese Fehlermeldung wenn ich auf die signature.php gehe:

Code: [Select]

Warning: imagecreatefrompng() [function.imagecreatefrompng]: Unable to access ./signatures/signature.png in /srv/www/httpd/phost/a/de/pytalhost/animalphotos/web/4images/signature.php on line 284

Warning: imagecreatefrompng(./signatures/signature.png) [function.imagecreatefrompng]: failed to open stream: No such file or directory in /srv/www/httpd/phost/a/de/pytalhost/animalphotos/web/4images/signature.php on line 284

Warning: imagesx(): supplied argument is not a valid Image resource in /srv/www/httpd/phost/a/de/pytalhost/animalphotos/web/4images/signature.php on line 285

Warning: imagesy(): supplied argument is not a valid Image resource in /srv/www/httpd/phost/a/de/pytalhost/animalphotos/web/4images/signature.php on line 286

Warning: imagecolorallocate(): supplied argument is not a valid Image resource in /srv/www/httpd/phost/a/de/pytalhost/animalphotos/web/4images/signature.php on line 287

Warning: imagecolorallocate(): supplied argument is not a valid Image resource in /srv/www/httpd/phost/a/de/pytalhost/animalphotos/web/4images/signature.php on line 288

Warning: imagestring(): supplied argument is not a valid Image resource in /srv/www/httpd/phost/a/de/pytalhost/animalphotos/web/4images/signature.php on line 290

Warning: imagestring(): supplied argument is not a valid Image resource in /srv/www/httpd/phost/a/de/pytalhost/animalphotos/web/4images/signature.php on line 300

Warning: imagestring(): supplied argument is not a valid Image resource in /srv/www/httpd/phost/a/de/pytalhost/animalphotos/web/4images/signature.php on line 300

Warning: imagestring(): supplied argument is not a valid Image resource in /srv/www/httpd/phost/a/de/pytalhost/animalphotos/web/4images/signature.php on line 300

Warning: imagestring(): supplied argument is not a valid Image resource in /srv/www/httpd/phost/a/de/pytalhost/animalphotos/web/4images/signature.php on line 300

Warning: imagestring(): supplied argument is not a valid Image resource in /srv/www/httpd/phost/a/de/pytalhost/animalphotos/web/4images/signature.php on line 300

Warning: imagestring(): supplied argument is not a valid Image resource in /srv/www/httpd/phost/a/de/pytalhost/animalphotos/web/4images/signature.php on line 300

Warning: imagestring(): supplied argument is not a valid Image resource in /srv/www/httpd/phost/a/de/pytalhost/animalphotos/web/4images/signature.php on line 300

Warning: imagestring(): supplied argument is not a valid Image resource in /srv/www/httpd/phost/a/de/pytalhost/animalphotos/web/4images/signature.php on line 300

Warning: imagestring(): supplied argument is not a valid Image resource in /srv/www/httpd/phost/a/de/pytalhost/animalphotos/web/4images/signature.php on line 300

Warning: imagestring(): supplied argument is not a valid Image resource in /srv/www/httpd/phost/a/de/pytalhost/animalphotos/web/4images/signature.php on line 300

Warning: imagestring(): supplied argument is not a valid Image resource in /srv/www/httpd/phost/a/de/pytalhost/animalphotos/web/4images/signature.php on line 300

Warning: imagestring(): supplied argument is not a valid Image resource in /srv/www/httpd/phost/a/de/pytalhost/animalphotos/web/4images/signature.php on line 300

Warning: imagestring(): supplied argument is not a valid Image resource in /srv/www/httpd/phost/a/de/pytalhost/animalphotos/web/4images/signature.php on line 300

Warning: imagestring(): supplied argument is not a valid Image resource in /srv/www/httpd/phost/a/de/pytalhost/animalphotos/web/4images/signature.php on line 300

Warning: imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image dimensions in /srv/www/httpd/phost/a/de/pytalhost/animalphotos/web/4images/signature.php on line 337

Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /srv/www/httpd/phost/a/de/pytalhost/animalphotos/web/4images/signature.php on line 340

Warning: imagecopymerge(): supplied argument is not a valid Image resource in /srv/www/httpd/phost/a/de/pytalhost/animalphotos/web/4images/signature.php on line 344

Warning: imagerectangle(): supplied argument is not a valid Image resource in /srv/www/httpd/phost/a/de/pytalhost/animalphotos/web/4images/signature.php on line 345

Warning: imagepng(): supplied argument is not a valid Image resource in /srv/www/httpd/phost/a/de/pytalhost/animalphotos/web/4images/signature.php on line 348

Warning: imagedestroy(): supplied argument is not a valid Image resource in /srv/www/httpd/phost/a/de/pytalhost/animalphotos/web/4images/signature.php on line 349

Warning: Cannot modify header information - headers already sent by (output started at /srv/www/httpd/phost/a/de/pytalhost/animalphotos/web/4images/signature.php:284) in /srv/www/httpd/phost/a/de/pytalhost/animalphotos/web/4images/signature.php on line 354

Warning: Cannot modify header information - headers already sent by (output started at /srv/www/httpd/phost/a/de/pytalhost/animalphotos/web/4images/signature.php:284) in /srv/www/httpd/phost/a/de/pytalhost/animalphotos/web/4images/signature.php on line 355

Warning: Cannot modify header information - headers already sent by (output started at /srv/www/httpd/phost/a/de/pytalhost/animalphotos/web/4images/signature.php:284) in /srv/www/httpd/phost/a/de/pytalhost/animalphotos/web/4images/signature.php on line 356

Warning: Cannot modify header information - headers already sent by (output started at /srv/www/httpd/phost/a/de/pytalhost/animalphotos/web/4images/signature.php:284) in /srv/www/httpd/phost/a/de/pytalhost/animalphotos/web/4images/signature.php on line 357

Warning: Cannot modify header information - headers already sent by (output started at /srv/www/httpd/phost/a/de/pytalhost/animalphotos/web/4images/signature.php:284) in /srv/www/httpd/phost/a/de/pytalhost/animalphotos/web/4images/signature.php on line 358

Warning: readfile() [function.readfile]: open_basedir restriction in effect. File(/tmp/signature.tmp) is not within the allowed path(s): (/srv/www/httpd/phost/a/de/pytalhost/animalphotos/web/:/srv/www/httpd/phost/a/de/pytalhost/animalphotos/tmp/:/srv/www/httpd/phost/a/de/pytalhost/animalphotos/ses/) in /srv/www/httpd/phost/a/de/pytalhost/animalphotos/web/4images/signature.php on line 359

Warning: readfile(/tmp/signature.tmp) [function.readfile]: failed to open stream: Operation not permitted in /srv/www/httpd/phost/a/de/pytalhost/animalphotos/web/4images/signature.php on line 359
Title: Re: Signature image v2.22 and RUSSIAN Fonts!!!!
Post by: MacroWorld on April 25, 2007, 02:47:48 PM
for Russian:

Не нашел на форуме ответа на вопрос, как сделать чтобы МОД воспринимал русский язык, пришлось разбираться как работает функция ImageString и как ее приучить к русскому языку.

Вот, что нашел и придумал:

Шаг 1
С помощью программы phpfont делаем из любого кириллического шрифта шрифт формата .phpfon

Кладем их в папку  /signatures
(У меня это были два шрифта с названиями файлов verdana.phpfont и CourierNew.phpfont)

Шаг 2
В файле signature.php находим строку

Code: [Select]
ImageString($im, 3, $offset2+$tiny, 4, $sitename, $text_color);
Вставляем Над ней
Code: [Select]
  $m = imageloadfont ('./signatures/verdana.phpfont');
           $m2 = imageloadfont ('./signatures/CourierNew.phpfont');

Находим строку
Code: [Select]
ImageString($im, 3, $offset2+$tiny, 4, $sitename, $text_color);
Заменяем ее на:
Code: [Select]
ImageString($im, [color=red]$m[/color], $offset2+$tiny, 4, $sitename, $text_color);
Находим строку
Code: [Select]
ImageString($im, $val[0], $val[1], $i, $val[2], $$val[3]);
Заменяем ее на:
Code: [Select]
ImageString($im, $m2, $val[1], $i, $val[2], $$val[3]);
Само собой нужно поменять:
Code: [Select]
$lang_images = "Фотографий : ";
$lang_users = "Участников: ";
$lang_cat = "Категорий: ";
$lang_new_user = "Новый участник: ";
$lang_online = "На сайте: ";
$lang_comments = "Комментариев: ";


и далее по тексту файла английские записи поменять на русские "новые", "зарегистрированные", "активные" и т.п.


ВНИМАНИЕ!!!
У меня база данных в UFT-8 (почему то у меня только в этой кодировке нормально работает поиск  :?)

Если у вас база тоже в UTF-8 то нужно немного изменить код, т.к. данные в UTF-8 будут крокозябрами на картинке:
Quote
Code: [Select]
ImageString($im,  $m2, $val[1], $i, $val[2], $$val[3]);

На:
Code: [Select]
ImageString($im,  $m2, utf8tocyr($val[1]), $i, utf8tocyr($val[2]), utf8tocyr($$val[3]));
и добавить в конец файла /includes/functions.php (перед  закрывающей ?>) следующий код:
Code: [Select]
function utf8tocyr($string) {
     for ($c = 0; $c < strLen($string); $c=$c+2) {
          $ub = ord(subStr($string, $c, 1));
          $lb = ord(subStr($string, $c+1, 1));

          if ($ub == 208) {
               if ($lb != 81) {
                    $result = $result.chr($lb + 48);
                    }
               else {
                    $result = $result.'Ё';
                    }
               }

          if ($ub == 209) {
               if ($lb != 91) {
                    $result = $result.chr($lb + 112);
                    }
               else {
                    $result = $result.'ё';
                    }
               }

          if (($ub != 208) AND ($ub != 209) AND ($lb != 91) AND ($lb != 81)) {
               $result = $result.chr($ub);
               $c = $c-1; }
               }
     return $result;
     }

Собственно вот результат работы:

(http://macroworld.santakla.us/signature.png) (http://macroworld.santakla.us/signature.png?go=1)

Title: Re: Signature image v2.22 and RUSSIAN Fonts!!!!
Post by: Acidgod on April 25, 2007, 06:51:23 PM
for Russian:

Yes, then another one can't read it... *g*
Title: Re: Signature image v2.22 and RUSSIAN Fonts!!!!
Post by: MacroWorld on April 25, 2007, 09:41:32 PM
for Russian:

Yes, then another one can't read it... *g*

One shouldn't be another one to read it.  :wink:

Information concerning how to make russian letters display on the banner, i.e. how to make ImageString(); and russian fonts deal with each other.
Title: Re: Signature image v2.22
Post by: k1lljoy on May 21, 2007, 05:55:01 PM
Quote
Шаг 2
В файле signature.php находим строку

MacroWorld, привет.
Но такой строки нет в коде, который опубликован на 1 странице данной темы  :roll:

Если не сложно, может ты мне дашь готовый файлик signature.php и файлики .phpfont?  :oops:



Title: Re: Signature image v2.22
Post by: MacroWorld on May 22, 2007, 10:18:06 AM
Quote
Шаг 2
В файле signature.php находим строку

MacroWorld, привет.
Но такой строки нет в коде, который опубликован на 1 странице данной темы  :roll:

Если не сложно, может ты мне дашь готовый файлик signature.php и файлики .phpfont?  :oops:





Действительно ошибся...
Строку поменял в своем посте.
Искать нужно вот такую:
Code: [Select]
ImageString($im, 3, $offset2+$tiny, 4, $sitename, $text_color);
Title: Re: Signature image v2.22
Post by: Drezno on June 10, 2007, 05:27:01 PM
hat das mal bitte jemand in deutsch? und für version 1.7.4.???
Title: Re: Signature image v2.22
Post by: hyde101 on June 10, 2007, 07:47:47 PM
How can we resize the random thumb on the signature. I looked for the line in the php where I could specify the thumb size, i couldn't find it :(
Title: Re: Signature image v2.22
Post by: mawenzi on June 10, 2007, 10:46:40 PM
@ufkydpnr

... instead of ...
Code: [Select]
$dimension = $offset2-$offset*2;

... use this ...
Code: [Select]
$dimension = 20;
... where "20" is the max. side length of your thumbnail in pixel ...
... and the rest ist testing ...
Title: Re: Signature image v2.22
Post by: hyde101 on June 11, 2007, 12:13:40 AM
Thank You, but that only does work on some images, and not on others, not sure why :(
Title: Re: Signature image v2.22
Post by: Lennforce on July 22, 2007, 07:35:57 AM
Hallo,

ich habe ein Problem. Bei mir funktioniert es überhaupt nicht: schaut es euch selbst an, bei allen Varianten kam das jetzt raus

http://www.picture-collection.net/signature.png (http://www.picture-collection.net/signature.png)

http://www.picture-collection.net/signature.png?go=1 (http://www.picture-collection.net/signature.png?go=1)

Kann mir vielleicht jemand sagen, was daran verkehrt ist.

MfG Lennforce
Title: Re: Signature image v2.22
Post by: vipersgarden on September 19, 2007, 06:50:20 PM
Einfügen der Signature in die
MS Outlook 2003 Signatur:

Nach ewigem Rumprobieren hab ich´s geschafft.

Die Signature muss "signature.png" sein!
Und in MS Outlook für emails "HTML" eingestellt sein!

1) MS Outlook Signatur öffnen
2) Cursor an gewünschte Stelle
3) rechte Maustaste -> Bild einfügen
4) dann den gesamten Pfad händisch eingeben, z.B. "http://deineSeite/Ordner/signature.png"
5) Dann erweitertes Bearbeiten -> normalerweise öffnet sich Word als Editor
6) signature.png markieren -> rechte Maustaste -> Hyperlink einfügen
7) wieder Pfad zur Galerie händisch eingeben, z.B. "http://deineSeite/4images/index.php"
8) alles Speichern
9) Achtung! Der Signatur-Wordfile muss geschlossen sein, sonst funkts nicht!
10) fertig!

..... und so (http://vipersgarden.at/4images/test/testmail1.htm) sieht´s aus!

Mario
Title: Re: Signature image v2.22
Post by: skiemor on October 09, 2007, 10:22:41 AM
Hello, I don't show all images in gallery, but signature.php counts "total_images".
Is there a way to count only the pictures in "public" category?

Best, Chris.
Title: Re: Signature image v2.22
Post by: skiemor on October 16, 2007, 09:33:26 AM
Geht wirklich nicht? ;-)

Hello, I don't show all images in gallery, but signature.php counts "total_images".
Is there a way to count only the pictures in "public" category?

Best, Chris.

Title: Re: Signature image v2.22
Post by: ciprianmp on January 11, 2008, 11:53:40 PM
I don't know what the h happenned, but the signature image doesn't work anymore for me (as it could be seen bellow). It might be the server - people could have changed something in the server's configuration. Anyway, I didn't touch the signature.php or gallery files for more than a year...
It all started 3 weeks ago for no reason, and this is the only message I get:

Fatal error: Cannot redeclare class db in /home/ciprian/public_html/gallery/includes/db_mysql.php on line 0
http://www.ciprianmp.com/signature.php

Does anyone know how to fix this?
Thanks!
Title: Re: Signature image v2.22
Post by: KurtW on January 12, 2008, 08:28:57 AM
Hi,

your singnature.php include a part of code a second time...
=> this meens the error text...


Test:
search every:
Code: [Select]
  include(ROOT_PATH.'and test for always only one of this codes:
Code: [Select]
  include once(ROOT_PATH.'

KurtW
Title: Re: Signature image v2.22
Post by: ciprianmp on January 12, 2008, 04:56:41 PM
Great! It worked. Thank you!

PS: I changed all include and require to include_once and require_once and seems to be working fine. Thanks again Kurt!
Title: Re: Signature image v2.22
Post by: mawenzi on March 26, 2008, 10:34:17 PM
Hallo Ivan,

habe das von dir beschriebene Problem bei mir wie folgt gelöst ...
statt ...
Code: [Select]
$function($im,$tmpfname,$quality);
verwende ich nun ...
Code: [Select]
$function($im);

Title: Re: Signature image v2.22
Post by: Heinrich-Uwe on April 16, 2008, 09:06:39 AM
Hallo Leute
Habe nach Serverumstellung nun mit Signature ein Problem
Bekomme nur noch Fehler Meldung

Code: [Select]
[Wed Apr 16 09:03:02 2008] [error] [client 87.169.142.145] PHP Warning: imagecreatefrompng(./signatures/signature.png) [<a href='function.imagecreatefrompng'>function.imagecreatefrompng</a>]: failed to open stream: No such file or directory in /var/www/vhosts/oberlausitz-digital.de/httpdocs/Galerie/signature.php on line 284
[Wed Apr 16 09:03:02 2008] [error] [client 87.169.142.145] PHP Warning: imagesx(): supplied argument is not a valid Image resource in /var/www/vhosts/oberlausitz-digital.de/httpdocs/Galerie/signature.php on line 285
[Wed Apr 16 09:03:02 2008] [error] [client 87.169.142.145] PHP Warning: imagesy(): supplied argument is not a valid Image resource in /var/www/vhosts/oberlausitz-digital.de/httpdocs/Galerie/signature.php on line 286
[Wed Apr 16 09:03:02 2008] [error] [client 87.169.142.145] PHP Warning: imagecolorallocate(): supplied argument is not a valid Image resource in /var/www/vhosts/oberlausitz-digital.de/httpdocs/Galerie/signature.php on line 287
[Wed Apr 16 09:03:02 2008] [error] [client 87.169.142.145] PHP Warning: imagecolorallocate(): supplied argument is not a valid Image resource in /var/www/vhosts/oberlausitz-digital.de/httpdocs/Galerie/signature.php on line 288
[Wed Apr 16 09:03:02 2008] [error] [client 87.169.142.145] PHP Warning: imagestring(): supplied argument is not a valid Image resource in /var/www/vhosts/oberlausitz-digital.de/httpdocs/Galerie/signature.php on line 290
[Wed Apr 16 09:03:02 2008] [error] [client 87.169.142.145] PHP Warning: imagestring(): supplied argument is not a valid Image resource in /var/www/vhosts/oberlausitz-digital.de/httpdocs/Galerie/signature.php on line 300
[Wed Apr 16 09:03:02 2008] [error] [client 87.169.142.145] PHP Warning: imagestring(): supplied argument is not a valid Image resource in /var/www/vhosts/oberlausitz-digital.de/httpdocs/Galerie/signature.php on line 300
[Wed Apr 16 09:03:02 2008] [error] [client 87.169.142.145] PHP Warning: imagestring(): supplied argument is not a valid Image resource in /var/www/vhosts/oberlausitz-digital.de/httpdocs/Galerie/signature.php on line 300
[Wed Apr 16 09:03:02 2008] [error] [client 87.169.142.145] PHP Warning: imagestring(): supplied argument is not a valid Image resource in /var/www/vhosts/oberlausitz-digital.de/httpdocs/Galerie/signature.php on line 300
[Wed Apr 16 09:03:02 2008] [error] [client 87.169.142.145] PHP Warning: imagestring(): supplied argument is not a valid Image resource in /var/www/vhosts/oberlausitz-digital.de/httpdocs/Galerie/signature.php on line 300
[Wed Apr 16 09:03:02 2008] [error] [client 87.169.142.145] PHP Warning: imagestring(): supplied argument is not a valid Image resource in /var/www/vhosts/oberlausitz-digital.de/httpdocs/Galerie/signature.php on line 300
[Wed Apr 16 09:03:02 2008] [error] [client 87.169.142.145] PHP Warning: imagestring(): supplied argument is not a valid Image resource in /var/www/vhosts/oberlausitz-digital.de/httpdocs/Galerie/signature.php on line 300
[Wed Apr 16 09:03:02 2008] [error] [client 87.169.142.145] PHP Warning: imagestring(): supplied argument is not a valid Image resource in /var/www/vhosts/oberlausitz-digital.de/httpdocs/Galerie/signature.php on line 300
[Wed Apr 16 09:03:02 2008] [error] [client 87.169.142.145] PHP Warning: imagestring(): supplied argument is not a valid Image resource in /var/www/vhosts/oberlausitz-digital.de/httpdocs/Galerie/signature.php on line 300
[Wed Apr 16 09:03:02 2008] [error] [client 87.169.142.145] PHP Warning: imagestring(): supplied argument is not a valid Image resource in /var/www/vhosts/oberlausitz-digital.de/httpdocs/Galerie/signature.php on line 300
[Wed Apr 16 09:03:02 2008] [error] [client 87.169.142.145] PHP Warning: imagestring(): supplied argument is not a valid Image resource in /var/www/vhosts/oberlausitz-digital.de/httpdocs/Galerie/signature.php on line 300
[Wed Apr 16 09:03:02 2008] [error] [client 87.169.142.145] PHP Warning: imagestring(): supplied argument is not a valid Image resource in /var/www/vhosts/oberlausitz-digital.de/httpdocs/Galerie/signature.php on line 300
[Wed Apr 16 09:03:02 2008] [error] [client 87.169.142.145] PHP Warning: imagestring(): supplied argument is not a valid Image resource in /var/www/vhosts/oberlausitz-digital.de/httpdocs/Galerie/signature.php on line 300
[Wed Apr 16 09:03:02 2008] [error] [client 87.169.142.145] PHP Warning: imagestring(): supplied argument is not a valid Image resource in /var/www/vhosts/oberlausitz-digital.de/httpdocs/Galerie/signature.php on line 300
[Wed Apr 16 09:03:02 2008] [error] [client 87.169.142.145] PHP Warning: imagecreatetruecolor() [<a href='function.imagecreatetruecolor'>function.imagecreatetruecolor</a>]: Invalid image dimensions in /var/www/vhosts/oberlausitz-digital.de/httpdocs/Galerie/signature.php on line 337
[Wed Apr 16 09:03:02 2008] [error] [client 87.169.142.145] PHP Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /var/www/vhosts/oberlausitz-digital.de/httpdocs/Galerie/signature.php on line 340
[Wed Apr 16 09:03:02 2008] [error] [client 87.169.142.145] PHP Warning: imagecopymerge(): supplied argument is not a valid Image resource in /var/www/vhosts/oberlausitz-digital.de/httpdocs/Galerie/signature.php on line 344
[Wed Apr 16 09:03:02 2008] [error] [client 87.169.142.145] PHP Warning: imagerectangle(): supplied argument is not a valid Image resource in /var/www/vhosts/oberlausitz-digital.de/httpdocs/Galerie/signature.php on line 345
[Wed Apr 16 09:03:02 2008] [error] [client 87.169.142.145] PHP Warning: imagepng(): supplied argument is not a valid Image resource in /var/www/vhosts/oberlausitz-digital.de/httpdocs/Galerie/signature.php on line 348
[Wed Apr 16 09:03:02 2008] [error] [client 87.169.142.145] PHP Warning: imagedestroy(): supplied argument is not a valid Image resource in /var/www/vhosts/oberlausitz-digital.de/httpdocs/Galerie/signature.php on line 349
[Wed Apr 16 09:03:02 2008] [error] [client 87.169.142.145] PHP Warning: readfile(/tmp/signature.tmp) [<a href='function.readfile'>function.readfile</a>]: failed to open stream: No such file or directory in /var/www/vhosts/oberlausitz-digital.de/httpdocs/Galerie/signature.php on line 359

hat einer eine Idee
Danke
Title: Re: Signature image v2.22
Post by: mawenzi on April 16, 2008, 09:19:41 AM
@Heinrich-Uwe
... ich sag es immer und immer wieder ... wer lesen kann, ist klar im vorteil ... ;)
... viel dichter kann deine Lösung doch schon nicht mehr liegen ...
... schau doch einfach mal, worum es in den 4 Posts über deinem so ging ... ;)
Title: Re: Signature image v2.22
Post by: Heinrich-Uwe on April 16, 2008, 09:46:03 AM
@mawenzi

Ja gut  habe ich getestet aber da kommen nur noch mehr andere Fehler ..... an den kans dann nicht liegen

aber an einen punkt ...........
nun gehts
Title: Re: Signature image v2.22
Post by: HostV on June 02, 2008, 07:34:23 AM
Very nice, thanks!
Title: Re: Signature image v2.22
Post by: Fryz on June 08, 2008, 11:18:39 AM
Bei mir haben diese oben stehenden Tips leider ncht geholfen... Anstatt der Signatur wird nur "Die Grafik http://.....signature.php" kann nicht angezeigt werden, weil sie Fehler enthält.
Das komische ist: Manchmal wird sie angezeigt und manchmal nicht...
Hat vielleicht noch jemand eine Idee, an was es liegen könnte?
Danke.
Gruß,
Fryz
Title: Re: Signature image v2.22
Post by: Fryz on June 29, 2008, 05:25:01 PM
Niemand?  :?
Title: Re: Signature image v2.22
Post by: kerzi on July 04, 2008, 09:20:21 AM
Hallo Zusammen,

danke für das super MOD.
Kann mir jemand sagen wie ich das aus einem HTML Script einbetten bzw. aufrufen kann?

Danke und Grüße
Günter
Title: Re: Signature image v2.22
Post by: Sleepy on August 07, 2008, 07:41:52 AM
Thanks for providing such a great mod.
However, I checked all the posts but couldn't find how to show the name of the icon image showed.
Does anyone know how to do it?
Thank you very much.

Best regards,
Sleepy
Title: Re: Signature image v2.22
Post by: V@no on August 07, 2008, 08:00:23 AM
use $imagedata['image_name'] variable
Title: Re: Signature image v2.22
Post by: Sleepy on August 07, 2008, 04:10:32 PM
use $imagedata['image_name'] variable
Thank you very much for your prompt reply.
I tried and it worked!

However, I found that the Chinese characters are not supported.
I tried to google but couldn't find any Chinese/utf-8 gdf fonts.
I guess I need to give it up, but...thanks ^_^.

Best regards,
Sleepy
Title: Re: Signature image v2.22
Post by: Nicky on August 07, 2008, 04:20:54 PM
i don't know if this will help

utf8_encode($imagedata['image_name'])

[EDIT]
sometimes i'm stupid :) you need fonts too...
Title: Re: Signature image v2.22
Post by: V@nо on August 07, 2008, 08:21:44 PM
But if you are using Windows OS, you can use fonts from it
Title: Re: Signature image v2.22
Post by: Sleepy on August 12, 2008, 09:56:40 PM
But if you are using Windows OS, you can use fonts from it
Thanks for your reply.
How could I use Windows ttf font in the signature png file?
Would you please tell me how to do it?

Thank you very much ^_^.
Title: Re: Signature image v2.22
Post by: V@no on August 13, 2008, 02:01:40 AM
never mind, thought I published my "other" version where I've used ttf fonts...sorry.
Title: Re: Signature image v2.22
Post by: Sleepy on August 20, 2008, 11:15:23 PM
never mind, thought I published my "other" version where I've used ttf fonts...sorry.
If you'd like to publish your "other" version using ttf fonts, please let me know ^_^.
Anyways, thank you very much.
Title: Re: Signature image v2.22
Post by: l1some on August 24, 2008, 04:08:31 AM
Can anyone help me add user flag info. and user IP into the signature image.
Title: Re: Signature image v2.22
Post by: Lunat on October 21, 2008, 09:39:10 PM
Sorry, my english is bad and i'm don't understand what doing this mod...
Is it watermark?
Title: Re: Signature image v2.22
Post by: nobby on October 21, 2008, 09:55:11 PM
Sorry, my english is bad and i'm don't understand what doing this mod...
Is it watermark?

Your posting here is wrong, This is signature thread
Title: Re: Signature image v2.22
Post by: samla on November 15, 2008, 06:12:49 PM
Gibt es die Anleitung auch in Deutsch ???  :roll:
Title: Re: Signature image v2.22
Post by: Nicky on November 15, 2008, 10:26:02 PM
hi samla,

probier es mal so
http://translate.google.com/translate?u=http%3A%2F%2Fwww.4homepages.de%2Fforum%2Findex.php%3Ftopic%3D6755.0&hl=de&ie=UTF-8&sl=en&tl=de
Title: Re: Signature image v2.22
Post by: Lunique on January 16, 2009, 01:08:39 AM

As of categories, you can replace
Code: [Select]
         FROM ".CATEGORIES_TABLE;with:
Code: [Select]
         FROM ".CATEGORIES_TABLE."
         WHERE auth_viewcat < ".AUTH_ACL;

Thanks for this it works fine for me. Is it possible to use something like this to count only the images which can be viewed by all? So it don't count the images only admin or private groups can see.
Title: Re: Signature image v2.22
Post by: V@no on January 16, 2009, 02:20:12 AM
Sure, replace // --- Total images -----
  $sql = "SELECT COUNT(*) AS total_images
          FROM ".IMAGES_TABLE."
          WHERE image_active = 1";


With:
// --- Total images -----
  $sql = "SELECT COUNT(i.image_id) AS total_images
          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_ACL;
Title: Re: Signature image v2.22
Post by: Lunique on January 16, 2009, 03:52:40 PM
Thanks a lot but now There is nothing at the place the number should be (also not a 0) http://silent.moonlightonmygrave.de/signature.php (http://silent.moonlightonmygrave.de/signature.php)
And the image shows not everytime. Sometimes it shows an error and sometimes the picture. This is the error it shows sometimes:
Code: [Select]
Warning: Cannot modify header information - headers already sent by (output started at /var/www/web443/html/silent/includes/db_mysql.php:192) in /var/www/web443/html/silent/signature.php on line 356

Warning: Cannot modify header information - headers already sent by (output started at /var/www/web443/html/silent/includes/db_mysql.php:192) in /var/www/web443/html/silent/signature.php on line 357

Warning: Cannot modify header information - headers already sent by (output started at /var/www/web443/html/silent/includes/db_mysql.php:192) in /var/www/web443/html/silent/signature.php on line 358

Warning: Cannot modify header information - headers already sent by (output started at /var/www/web443/html/silent/includes/db_mysql.php:192) in /var/www/web443/html/silent/signature.php on line 359

Warning: Cannot modify header information - headers already sent by (output started at /var/www/web443/html/silent/includes/db_mysql.php:192) in /var/www/web443/html/silent/signature.php on line 360
Title: Re: Signature image v2.22
Post by: Lunique on January 16, 2009, 04:52:48 PM
OK now the error message is not the one you see in my last post I delete the header information in signature.php and now it works in IE with http://silent.moonlightonmygrave.de/signature.php (http://silent.moonlightonmygrave.de/signature.php) and in firefox only if it's integrated into a web side or as forum signature and this is enough cause I don't need to give someone the direct link.

Still the same problem with "Total images" the line goes like this: Images:    (557 new)
but it have to be 70 images that can be viewed by all. Everything else works like it should. It also shows only the 8 categorys users allowed to see (24 I have in total) with the other code you posted
Title: Re: Signature image v2.22
Post by: V@no on January 17, 2009, 04:58:23 AM
Ops, my mistake, sorry.
I've updated my previous post.
Title: Re: Signature image v2.22
Post by: Lunique on January 17, 2009, 04:48:33 PM
Yeeeeaah! Thanks so much! That's great!
Can I have it for new images to? Sorry but I really have no idea how to do it myself...
Title: Re: Signature image v2.22
Post by: V@no on January 17, 2009, 08:18:30 PM
This should do it:
Code: [Select]
  $sql = "SELECT COUNT(i.image_id) AS total_new_images
          FROM ".IMAGES_TABLE." i
          LEFT JOIN ".CATEGORIES_TABLE." c ON (c.cat_id = i.cat_id)
          WHERE i.image_active = 1 AND i.image_date > ".$new_cutoff." AND c.auth_viewcat < ".AUTH_ACL;
Title: Re: Signature image v2.22
Post by: Lunique on January 17, 2009, 08:36:35 PM
It works perfect! Thanks so much!!!
Title: Re: Signature image v2.22
Post by: cliff on January 31, 2009, 05:01:46 PM
hmm... I´ve installed this mod and sometimes he shows the signature.png and sometime he shows a red X...

Just looking at the signature.php on the server the same... Some times he shows the signature.png and sometimes he shows this:

An unexpected error occured. Please try again later
‰PNG  IHDRÂdšH§U IDATxœì½wœ¥Gu z*}ùæ¾ÃL÷$ÍHšQÎBB…lðÚ8w𳽎{Ù%ì®3Æö³Æ~æ±Ùk1  ’ÅÑŒ¤™‘4¡{:§›ïýr¥ýãöÌôŒº!Ëðü[Îïþº¿[ß©sNª:uªêT]´ºº €Bgž4œ!­ÏK{¥AoÄøÜ÷ëþ_õå:ç ­5è®^´Ög4 µÃðesÒ ¥N„"^ÅjÌë±hD¢žˆv*}¡bˆb‹Ç¢›•L’wXÙa=» yÉü Šùø|g8ÓÚ…q ƒIÅøKÌøé/þõG>öÇŽÅ2`”¢Á§Øc%q ¢ŒÔ*QuEmÔ¬éë®~ÓÏ_þk–ã_h¼|+ðxy€Rš‡bÅO¾ÔNæÚñB,\†\E\†RÅR¥R§@1cØfÄeÄ!ØĈ¬mã…7­ßï¢üþíÁË(˜TL\Y)%„PJ5æþÎÖoy‰–tthÂÉ`F!ÀLÈæu¹ßfш{l@+tBe`Xúè OaDZ½W¦„ßs ===ßoþ "LkÍh¶ê«úÇá©f4׎湌”–”ÖJk 5hèú¼!@a„ •Ìv¸¹\¦'óƒºû\ôy³+PJqÎ¥”@w´­bØRTïÜ4¿ÖI’ÄqL)eæ¶Äýt/ÿB-‰«¦Þ~Æ×_ùêmã»;¢r=p3J¨À&C–‰0ñ⸎0X6NM T«/M/¾pó5¯{EÊü½Jù~ËðhÐaZYiYh>5×x¬æOF¼™ ŸËï4èzZv¿ÙFqkéæ‹ßVp·®¯;.à ­˜4c±zQÏùŽÀ9ït:5òÿ¤æc µµu ˆß}µ…9‹nyqß÷WVV‚—À¥â›ÓDQT­VÛ}?!›±~y2h­Ó4m´gkô#²ø©3´å Ûõ×7ËÕÕLýeê|㥨å{ RÊv»]‰ï‹Gþ½É¯sæ?ÑêûqåÉ“Ág•ñ;sèõ”RÛ¶Ó4õ}ŸtFL{×4þ± õ%ÃçIµæ‡Æ1ržÑÆøKiŠÐA…:X;J
(...)

Here is the url http://www.reptipics.de/signature.php

Can someone explain...?!?

GreetZ
cliff

Title: Re: Signature image v2.22
Post by: V@no on January 31, 2009, 09:14:57 PM
login as admin and see if more details about the database error showed.
Title: Re: Signature image v2.22
Post by: cliff on February 01, 2009, 10:58:05 AM
Hey Vl@no,,

I´ve solved the problem. The --- Online users ----- couldn´t get by the 4images tables. They are in the phpbb Forum tables... I comment out the lines and no it´s running. But without the online user... :(

GreetZ
cliff
Title: Re: Signature image v2.22
Post by: Sunny C. on April 07, 2009, 09:17:01 PM
Geht das denn auch in einer einfachen Form?
Ich meine als generelles Script, welches mit der Gallery nichts zu tun hat.

Ich versuche das mal zu erklären:

Ich habe 2 gleich Große Bilder,
diese sollen in den Abstand von 4 Sekunden gewechselt werden.
Die URL sollte zu den jeweiligen Bild ebenfalls geändert werden.

Mehr sollte das dann nicht können! Sollte halt auch als Bild ausgegeben werden!

LG
Benny
Title: Re: Signature image v2.22
Post by: jopainter on April 20, 2009, 12:23:45 AM
thanks man

(http://pho2o.net/signature.png) (http://pho2o.net)
Title: Re: Signature image v2.22
Post by: harinezumi on June 17, 2009, 12:13:12 PM
Hi!
I've got a problem - my signature does not show any pictures, it just gives a standard media pic instead.

[problem resolved, image deleted]


The specificity of my gallery is that it's created for a small community of friends, all categories are visible "only for registered users", may that be the reason?
If that could be fixed, then is it possible to show the latest picture thumb, not a random one?

Config part of the script (no changes were made below this block):

Code: [Select]
// ------- 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 = 1; //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 = "signature2.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 = "On-line Gallery Statistics"; //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 ----------


Many thanks in advance!

Title: Re: Signature image v2.22
Post by: V@no on June 17, 2009, 03:41:39 PM
It's because you don't allow view images for guests.

to show latest images, replace
Code: [Select]
              ORDER  BY RAND()with:
Code: [Select]
              ORDER  BY i.image_date DESC
Title: Re: Signature image v2.22
Post by: harinezumi on June 17, 2009, 03:48:25 PM
V@no, thank you for such a quick reply! Did I get you right that the only way to solve the problem is to allow guests to see all categories?
Title: Re: Signature image v2.22
Post by: V@no on June 17, 2009, 04:05:51 PM
the only way to solve the problem is to allow guests to see all categories?
Correct.
Or remove any authorization check from the signature script, which I don't recommend, just in case you decide create categories accessible by a group of selected members.
Title: Re: Signature image v2.22
Post by: harinezumi on June 17, 2009, 04:24:21 PM
V@no, that's exactly what i need - i would like to use this signature as an informer on other closed site, so no security problems will arise.
how can i remove authorization check from the script? and thanks once again for your time!  :D
Title: Re: Signature image v2.22
Post by: V@no on June 17, 2009, 04:37:20 PM
set to 9 $auth variable. like this:
Code: [Select]
$auth = 9; //permission level for auth_viewimage (0 = All, 2 = Members, 3 = Private or 9 = Admin) Refer in /includes/constants.php
Title: Re: Signature image v2.22
Post by: harinezumi on June 17, 2009, 04:50:21 PM
everything's working fine now  :D
thanks a lot!
Title: Re: Signature image v2.22
Post by: Sebas Bonito on June 22, 2009, 08:14:50 PM
Sorry, it doesn't work.

I gues I changed every path correct (GD 2.x exists also), but if I execute the "signature.php" only the URL (e.g. http://www.mydomain.com/signature.php) appears, BUT as an image!
Title: Re: Signature image v2.22
Post by: V@no on June 23, 2009, 02:43:09 AM
usually errors logs can reveal the problem.
Title: Re: Signature image v2.22
Post by: Sebas Bonito on June 23, 2009, 12:01:52 PM
Quote
[Tue Jun 23 11:58:08 2009] [error] [client XYZ] PHP Warning: imagepng() [<a href='function.imagepng'>function.imagepng</a>]: open_basedir restriction in effect. File(/srv/www/vhosts/XYZ.de/XYZ/tmp/signature.tmp) is not within the allowed path(s): (/srv/www/vhosts/XYZ.de/httpdocs:/tmp) in /srv/www/vhosts/XYZ.de/httpdocs/XYZ/signature.php on line 328
[Tue Jun 23 11:58:08 2009] [error] [client XYZ] PHP Warning: imagepng() [<a href='function.imagepng'>function.imagepng</a>]: Invalid filename in /srv/www/vhosts/XYZ.de/httpdocs/XYZ/signature.php on line 328
[Tue Jun 23 11:58:08 2009] [error] [client XYZ] PHP Warning: readfile() [<a href='function.readfile'>function.readfile</a>]: open_basedir restriction in effect. File(/srv/www/vhosts/XYZ.de/XYZ/tmp/signature.tmp) is not within the allowed path(s): (/srv/www/vhosts/XYZ.de/httpdocs:/tmp) in /srv/www/vhosts/XYZ.de/httpdocs/XYZ/signature.php on line 339
[Tue Jun 23 11:58:08 2009] [error] [client XYZ] PHP Warning: readfile(/srv/www/vhosts/XYZ.de/XYZ/tmp/signature.tmp) [<a href='function.readfile'>function.readfile</a>]: failed to open stream: Operation not permitted in /srv/www/vhosts/XYZ.de/httpdocs/XYZ/signature.php on line 339

Okay, I guess there are problems, which I made probably, but what does these errors mean?

Update OMG, newbie-error: I missed a folder in the path. It works now. Thx mate!
Title: Re: Signature image v2.22
Post by: V@no on June 23, 2009, 03:11:46 PM
these error means that you need change path in $path variable to a directory where script can write file into. Whatever path you have right now is not good.
Title: Re: Signature image v2.22
Post by: Sebas Bonito on June 23, 2009, 03:24:47 PM
done.  8)

How to integrate other variables like "total HITS"?
Title: Re: Signature image v2.22
Post by: Sebas Bonito on June 28, 2009, 04:29:10 PM
done.  8)

How to integrate other variables like "total HITS"?

Noone an idea?  :oops:

Other question: How to avoid showing pics in "portrait format"?
Title: Re: Signature image v2.22
Post by: Nicky on June 28, 2009, 09:23:23 PM
done.  8)

How to integrate other variables like "total HITS"?

Code: [Select]
$lang_hits = "Hits: ";
Code: [Select]
 $sql = "SELECT SUM(image_hits) AS hit
          FROM ".IMAGES_TABLE;
  $row = $site_db->query_firstrow($sql);
  $show['hits'] = $row['hit'];

and add this to the another arrays

Code: [Select]
                 array(array($fsize, $offset2+$tiny, $lang_hits, "text_color"), array($fsize, $far, $show['hits'], "text_color")),
Title: Re: Signature image v2.22
Post by: Sebas Bonito on June 28, 2009, 09:36:42 PM
wonderful! Thx a lot.  8)

UPDATE:
Now, my signature works fantastic and nearly everything is fine. BUT I only get some errors including my signature in some boards, and I know where the problem is.

e.g. vbulletin needs the file-size to allow the including, otherwise it will say "wrong url" or something like that. I've found some topics about this and "dynamic images".

So, how to find the final file-size to add the header with this:
Quote
header('Content-length: 25773');

UPDATE 2:
Okay, I got it... but the procedure takes very very long:
Code: [Select]
$pic = fopen("signature.png","br");
$filesize = filesize ($pic);
header ("Content-Length: ".$filesize);    
Maybe there is a better way, cause it takes really seconds of seconds... to long in my opinion.
Title: Re: Signature image v2.23
Post by: V@no on July 02, 2009, 03:31:32 AM
Your idea is technically correct, except you get wrong size from the wrong image ;)
I've added this header in the code on first page. Just look at the end of the file.
Title: Re: Signature image v2.23
Post by: Sebas Bonito on July 02, 2009, 09:33:18 PM
YES, this works better and has also the right file-size  :lol: thx!
Title: Re: Signature image v2.23
Post by: Sebas Bonito on July 15, 2009, 02:04:30 PM
As you can see in my signature below, sometimes it show only around 80-90% of the image.
The rest will be cropped. This happens... I guess every 2nd/3rd time.  :|

Update: one example...

FIRST load
(http://www.bilder-hochladen.net/files/bn9m-4.jpg)

....after RELOAD:
(http://www.bilder-hochladen.net/files/bn9m-5.jpg)
Title: Re: Signature image v2.23
Post by: V@no on July 17, 2009, 05:20:03 AM
I think you should check your server's logs...
Title: Re: Signature image v2.23
Post by: Sebas Bonito on July 17, 2009, 08:34:55 AM
I think you should check your server's logs...

Oupps... yes... there is something...

Code: [Select]
[Fri Jul 17 08:33:05 2009] [error] [client x] PHP Notice: Undefined offset: 2 in /srv/www/vhosts/de/httpdocs/daeof/signature.php on line 280, referer: http://www.4homepages.de/forum/index.php?topic=6755.new;topicseen
[Fri Jul 17 08:33:05 2009] [error] [client x] PHP Notice: Undefined offset: 3 in /srv/www/vhosts/de/httpdocs/daeof/signature.php on line 280, referer: http://www.4homepages.de/forum/index.php?topic=6755.new;topicseen
[Fri Jul 17 08:33:05 2009] [error] [client x] PHP Notice: Undefined variable: in /srv/www/vhosts/de/httpdocs/daeof/signature.php on line 280, referer: http://www.4homepages.de/forum/index.php?topic=6755.new;topicseen
Title: Re: Signature image v2.23
Post by: V@no on July 17, 2009, 03:40:30 PM
and line 280 is...


Is there any other errors?
Title: Re: Signature image v2.23
Post by: Sebas Bonito on July 19, 2009, 03:34:28 AM
Code: [Select]
ImageString($im, $val[0], $val[1], $i, $val[2], $$val[3]);...but I guess the prob is somewhere else, would you'd like to take a look on the whole php?
No other probs I've found with the script. Thx!
Title: Re: Signature image v2.23
Post by: V@no on July 19, 2009, 05:13:50 AM
would you'd like to take a look on the whole php?
yes, that could help.
Title: Re: Signature image v2.23
Post by: Sebas Bonito on July 19, 2009, 03:24:16 PM
Code: [Select]
<?php
$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 30//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 "100"//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 0//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 ""//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 = -13//offset from the left, right and bottom, uses for random image and the text (not used if random image disabled)
$offset2 74//extra offset from the left (place where random image will be embeded if its enabled. Not used if random image disabled)
$spacing 9//height of each line of text
$start 19//offset from top (space where header shows)
$tiny 20//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 0//alow per user random image (images uploaded by XX user. Usage: signature.php?user=XX)
$noimage "rs.gif"//icon name if no random image was found
$new_cutoff 7//Days when images treated as new
$lang_hits "Aufrufe: ";
$lang_images "Fotos/Videos:  ";
$lang_users "Mitglieder:  ";
$lang_cat "Kategorien:  ";
$lang_new_user "Neu dabei:  ";
$lang_online "Online:  ";
$lang_comments "Kommentare:  ";
// --------- 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);
      }
    }
  }
  
header("Location: ".$url);
  exit;
}
$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);
    }
    
$thumb = (empty($imagedata)) ? ICON_PATH."/".$noimage get_file_path($imagedata['image_media_file'], "thumb"$imagedata['cat_id']);
  }

// --- 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'];

  
$sql "SELECT SUM(image_hits) AS hit
          FROM "
.IMAGES_TABLE;
  
$row $site_db->query_firstrow($sql);
  
$show['hits'] = $row['hit'];
// --- 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(
$fsize78$lang_images"text_color"), array($fsize$far-7$show['total_images']." (davon ".$show['total_new_images']." neu)""text_color")),
                  array(array(
$fsize,78$lang_hits"text_color"), array($fsize$far-7$show['hits'], "text_color")),   
                  array(array(
$fsize78$lang_comments"text_color"), array($fsize$far-7$show['comments'], "text_color")),
                  array(array(
$fsize78$lang_users"text_color"), array($fsize$far-7$show['total_users']+$show['total_users_awaiting'], "text_color"), array($fsize$far+12+strlen($show['total_users'])*($fsize+4)))
  );
  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($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;
    }
    
$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);
?>
Title: Re: Signature image v2.23
Post by: V@no on July 19, 2009, 11:00:17 PM
the problem is in this part of your code:
Code: [Select]
array($fsize, $far+12+strlen($show['total_users'])*($fsize+4))this array contains only 2 values, but it must have 4.
I don't know what you were trying to show with it, but either remove it or, add 2 more parameters as all other arrays.

P.S. if you remove it, make sure you remove a quote before it too.
Title: Re: Signature image v2.23
Post by: Sebas Bonito on July 19, 2009, 11:12:54 PM
I've deleted the part
Code: [Select]
, array($fsize, $far+12+strlen($show['total_users'])*($fsize+4))in line 247, and now there are no errors in the server-logs any longer. Thx for it!

BUT the cropped images are still there
(http://www.bilder-hochladen.net/files/bn9m-4.jpg)

(http://www.bilder-hochladen.net/files/bn9m-5.jpg)
Title: Re: Signature image v2.23
Post by: V@no on July 20, 2009, 02:34:51 AM
I think I figured what's causing it. It might be the server is caching filesize of signature image...
find:
  @fclose($handle);

insert below:
  clearstatcache();

See if it fixes it.
Title: Re: Signature image v2.23
Post by: Sebas Bonito on July 20, 2009, 02:53:19 AM
Thx a lot, I gues that has fixed it  :idea:   8)
Title: Re: Signature image v2.23
Post by: Lunique on July 21, 2009, 03:36:06 AM
Is it possible to change the font size?
I don't know where to get gdf-fonts so I can only use the ones already working and changing them in this line does not bring the result I need
$fsize = 3; //font type (1 to 5 for build-in fonts and 6 to XX for your custom fonts (see $font array above)


I just want to have the smallest readable font as possible.
Title: Re: Signature image v2.23
Post by: softxgame on July 24, 2009, 06:20:14 PM
Very beautiful
Title: Re: Signature image v2.23
Post by: Hagen-Roderich on August 07, 2009, 02:51:08 PM
Thanks for this great MOD.
How to add the date/time of the newest/last picture, behind "picture: 100 (5 new) last from 07.08.2009 14:50" ?
How to add the "cat_name" under the picture?
Title: Re: Signature image v2.23
Post by: clubsociety on August 25, 2009, 07:48:02 PM
Hi,

how can I get the image to my 4images comments now?

Regards Clubsociety
Title: Re: Signature image v2.23
Post by: live@ct on September 14, 2009, 07:14:24 PM
How can I show 2 signatures from the same site in a 1 page,

I modify the code to specified the image id to show an specific image, reduce the time to 0 to every time i access the image it will create a new image signature

but when I use 2 images signatures in the same page it create 2 images of the same image ID one it´s complete and the second its the same image but showed only the half of the image

to access the image I use the rewrite mode to access the images like: site.com/img000.png and the php original its signature.php?img=000

thanks for your help
Title: Re: Signature image v2.23
Post by: V@no on September 15, 2009, 01:50:16 AM
in your signature2.php use this:
$tmpfname = $path."signature2.tmp"; // filename for the compilled image (extension does not metter)
$tmptname = $path."signature2.id"; // filename for the file where some extra info will be stored in (image id)
Title: Re: Signature image v2.23
Post by: Lunique on October 28, 2009, 05:40:05 PM
Is it possible to change the font size?
I don't know where to get gdf-fonts so I can only use the ones already working and changing them in this line does not bring the result I need
$fsize = 3; //font type (1 to 5 for build-in fonts and 6 to XX for your custom fonts (see $font array above)


I just want to have the smallest readable font as possible.


Can someone please help me?
Title: Re: Signature image v2.23
Post by: V@no on October 29, 2009, 03:32:46 AM
gdf fonts don't have sizes like ttf, one font is one size, if you need bigger/smaller size, you need new font...
http://www.devtrolls.com/gdf_fonts/
Title: Re: Signature image v2.23
Post by: GaYan on November 07, 2009, 04:27:57 PM
hey..i have a doubt :) .. when i click on the PNG..it doestnot take me to the image URL :( hw to fix this ?
Title: Re: Signature image v2.23
Post by: Hagen-Roderich on November 07, 2009, 05:28:41 PM
(http://nuwaragedara.com/Gallery/signature.png) (http://nuwaragedara.com/Gallery/signature.png?go=1)

Code: [Select]
[url=http://nuwaragedara.com/Gallery/signature.png?go=1][img]http://nuwaragedara.com/Gallery/signature.png[/img][/url]
Title: Re: Signature image v2.23
Post by: GaYan on November 07, 2009, 05:30:13 PM
Thanks..it worked :) !
Title: [Source] Templates For Signature Image v2.23
Post by: GaYan on November 07, 2009, 06:29:58 PM
I Didn't See many Colorful Templates for the mod Signature Image v2.23
so here are some templates (PNG) created by G2 Design Labz

i Have Attached Them :) Download and Enjoy :)
Title: Re: Signature image v2.23
Post by: d1eter on February 02, 2010, 03:30:16 AM
this is a cool mod...
thanx V@no..!!


(http://www.batamphotoclub.org/gallery/signature.png)


.

Title: Re: Signature image v2.23
Post by: alekseyn1 on February 03, 2010, 02:01:18 AM
weird... did all as instructed...

I get an error... but if I look in tmp folder and rename the signature.tmp file into png, it's a readable picture with all necessary info...

error I get is:

Code: [Select]
Warning: Cannot modify header information - headers already sent by (output started at /home/xxx/public_html/yyy/signature.php:1) in /home/xxx/public_html/yyy/signature.php on line 355

Warning: Cannot modify header information - headers already sent by (output started at /home/xxx/public_html/yyy/signature.php:1) in /home/xxx/public_html/yyy/signature.php on line 356

Warning: Cannot modify header information - headers already sent by (output started at /home/xxx/public_html/yyy/signature.php:1) in /home/xxx/public_html/yyy/signature.php on line 357

Warning: Cannot modify header information - headers already sent by (output started at /home/xxx/public_html/yyy/signature.php:1) in /home/xxx/public_html/yyy/signature.php on line 358

Warning: Cannot modify header information - headers already sent by (output started at /home/xxx/public_html/yyy/signature.php:1) in /home/xxx/public_html/yyy/signature.php on line 359

Warning: Cannot modify header information - headers already sent by (output started at /home/xxx/public_html/yyy/signature.php:1) in /home/xxx/public_html/yyy/signature.php on line 360
�PNG  ��� IHDR������c��M���� �IDATx�Ľw��q.ZU�t���� ,rH$�EI�DQ��E��(��$]+\��^���>�ײe �kYֻ��d+���f"�H���l��}N�?N���.�R

etc..

no additional errors are displayed if I login as admin...

EDIT...

sorry... not enough sleep lately....
i have saved the signature.php file in the wrong encoding... MUST save in ANSI... i.e. normal ISO-8859-1... so I have converted the file and it works...

ONE MORE EDIT:

Ok guys... I have modified the code to use Imagettftext() function... (for those russian friends out there  8)) the code attached presumes that you have a standard windows TAHOMA.TTF (watch the file name case) in the root of your 4images installation. Also a temp folder and signatures folder should be in your 4images root folder. Sorry that the info labels are in Russian... but I am sure you'll figure this out...

Enjoy  8)
Title: Major Bug
Post by: GaYan on February 16, 2010, 05:12:55 AM
Major Bug Found - Please Correct This as soon as possible

in signature.php

find
Code: [Select]
Copyright © V@no 2004-2005
And replace with

Code: [Select]
Copyright © V@no 2004-2010  :wink:

  :mrgreen:  :mrgreen:

Title: Re: Signature image v2.23
Post by: V@no on February 16, 2010, 06:57:15 AM
Oh. You are absolutely right! Fixed in v2.3  :mrgreen:
Also fixed $noimage displayed instead of image icon if image doesn't have thumbnail, it should now display icon, based on image extension instead.
Title: Re: Signature image v2.3
Post by: Hagen-Roderich on February 26, 2010, 09:16:26 AM
How to add the "cat_name" under the acual shown picture?  :roll:
Title: Re: Signature image v2.3
Post by: Sunny C. on May 04, 2010, 11:49:13 PM
Please Help
Code: [Select]
Warning: imagecreatefrompng(./signatures/signature.png) [function.imagecreatefrompng]: failed to open stream: No such file or directory in /www/htdocs/w00b2576/gamevote/signature.php on line 309

Warning: imagesx(): supplied argument is not a valid Image resource in /www/htdocs/w00b2576/gamevote/signature.php on line 310

Warning: imagesy(): supplied argument is not a valid Image resource in /www/htdocs/w00b2576/gamevote/signature.php on line 311

Warning: imagecolorallocate(): supplied argument is not a valid Image resource in /www/htdocs/w00b2576/gamevote/signature.php on line 312

Warning: imagecolorallocate(): supplied argument is not a valid Image resource in /www/htdocs/w00b2576/gamevote/signature.php on line 313

Warning: imagestring(): supplied argument is not a valid Image resource in /www/htdocs/w00b2576/gamevote/signature.php on line 315

Warning: imagestring(): supplied argument is not a valid Image resource in /www/htdocs/w00b2576/gamevote/signature.php on line 325

Warning: imagestring(): supplied argument is not a valid Image resource in /www/htdocs/w00b2576/gamevote/signature.php on line 325

Warning: imagestring(): supplied argument is not a valid Image resource in /www/htdocs/w00b2576/gamevote/signature.php on line 325

Warning: imagestring(): supplied argument is not a valid Image resource in /www/htdocs/w00b2576/gamevote/signature.php on line 325

Warning: imagestring(): supplied argument is not a valid Image resource in /www/htdocs/w00b2576/gamevote/signature.php on line 325

Warning: imagestring(): supplied argument is not a valid Image resource in /www/htdocs/w00b2576/gamevote/signature.php on line 325

Warning: imagestring(): supplied argument is not a valid Image resource in /www/htdocs/w00b2576/gamevote/signature.php on line 325

Warning: imagestring(): supplied argument is not a valid Image resource in /www/htdocs/w00b2576/gamevote/signature.php on line 325

Warning: imagestring(): supplied argument is not a valid Image resource in /www/htdocs/w00b2576/gamevote/signature.php on line 325

Warning: imagestring(): supplied argument is not a valid Image resource in /www/htdocs/w00b2576/gamevote/signature.php on line 325

Warning: imagestring(): supplied argument is not a valid Image resource in /www/htdocs/w00b2576/gamevote/signature.php on line 325

Warning: imagestring(): supplied argument is not a valid Image resource in /www/htdocs/w00b2576/gamevote/signature.php on line 325

Warning: imagestring(): supplied argument is not a valid Image resource in /www/htdocs/w00b2576/gamevote/signature.php on line 325

Warning: imagestring(): supplied argument is not a valid Image resource in /www/htdocs/w00b2576/gamevote/signature.php on line 325

Warning: imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image dimensions in /www/htdocs/w00b2576/gamevote/signature.php on line 362

Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /www/htdocs/w00b2576/gamevote/signature.php on line 365

Warning: imagecopymerge(): supplied argument is not a valid Image resource in /www/htdocs/w00b2576/gamevote/signature.php on line 369

Warning: imagerectangle(): supplied argument is not a valid Image resource in /www/htdocs/w00b2576/gamevote/signature.php on line 370

Warning: imagepng(): supplied argument is not a valid Image resource in /www/htdocs/w00b2576/gamevote/signature.php on line 373

Warning: imagedestroy(): supplied argument is not a valid Image resource in /www/htdocs/w00b2576/gamevote/signature.php on line 374

Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/w00b2576/gamevote/signature.php:309) in /www/htdocs/w00b2576/gamevote/signature.php on line 379

Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/w00b2576/gamevote/signature.php:309) in /www/htdocs/w00b2576/gamevote/signature.php on line 380

Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/w00b2576/gamevote/signature.php:309) in /www/htdocs/w00b2576/gamevote/signature.php on line 381

Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/w00b2576/gamevote/signature.php:309) in /www/htdocs/w00b2576/gamevote/signature.php on line 382

Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/w00b2576/gamevote/signature.php:309) in /www/htdocs/w00b2576/gamevote/signature.php on line 383

Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/w00b2576/gamevote/signature.php:309) in /www/htdocs/w00b2576/gamevote/signature.php on line 384
Title: Re: Signature image v2.3
Post by: Jan-Lukas on May 05, 2010, 12:46:03 AM
kann es sein, das die Adresse so heißen muss ?
signatures/signature.png, sonst lege es einfach ins root, habe ich auch gemacht

$signature_template = "signatures/signature.png"; //path to your signature template image


meine

$signature_template = "./portal.png"; //path to your signature template image

LG

Edit: was hast denn da alles eingebaut ?

signature.php on line 384

meine hat gerade mal 254 Zeilen ?
Title: Re: Signature image v2.3
Post by: Sunny C. on May 05, 2010, 12:54:33 AM
Die ist Standard, bis vorhin ging sie auch noch. Ich habe dieses mal nichts gemacht, daher meine Frage!
Meine hat sogar 386 Zeilen

<?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 = "GameVote.Net"; //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 = "Cover: ";
$lang_users = "Mitglieder: ";
$lang_cat = "Kategorien: ";
$lang_new_user = "Neuester User: ";
$lang_online = "Online: ";
$lang_comments = "Kommentare: ";
// --------- 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($handle, 4096);
      $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($handle, 4096);
    $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'], 0, 0))
    {
      $thumb = ICON_PATH."/".get_file_extension($imagedata['image_media_file']).".gif";
    }
    else
    {
      $thumb = get_file_path($imagedata['image_thumb_file'], "thumb", $imagedata['cat_id'], 0, 1);
    }
  }
  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']." Mitglieder".(($show['reg_online'] > 1 || !$show['reg_online'])? "s" : "")." und ".$show['guests_online']." G&auml;ste".(($show['guests_online'] > 1 || !$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']." neu)", "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), " und ".$show['total_users_awaiting']." nicht aktiviert", "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 ($im, 0, 0, 0);
  $red = ImageColorAllocate ($im, 255, 0, 0);
//  ImageString($im, 3, $offset2+(($width-$offset2)/2)-(strlen($sitename)*7/2), 4, $sitename, $text_color);
  ImageString($im, 3, $offset2+$tiny, 4, $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(1 => "gif", 2 => "jpeg", 3 => "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, $image, 0, 0, 0, 0, $width_end, $height_end, ImageSX($image), ImageSY($image));
    }
    $posx = round(($offset2-$width_end)/2);
    $posy = round(($height-$height_end)/2);
    imagecopymerge($im,$temp, $posx, $posy, 0, 0, $width_end, $height_end, 100);
    ImageRectangle($im, $posx-1, $posy-1, $posx+$width_end-1, $posy+$height_end-1, $text_color);
  }
  $function = "Image".$type;
  $function($im,$tmpfname,(($type == "png") ? 9 : $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);
?>
Title: Re: Signature image v2.3
Post by: Hagen-Roderich on June 04, 2010, 01:45:38 PM
No image found, if name of image is not the same as the name of the thumbnail.
On my page sometimes the images are saved as "*.JPG" and the thumbs as "*.jpg".

The same was the problem for a other MOD (http://www.4homepages.de/forum/index.php?topic=27307.msg147829#msg147829) but rinaldos have found the sulotion on changeing the code.

Is this possible for the Signature MOD too?
Title: Re: Signature image v2.3
Post by: V@no on June 04, 2010, 03:13:38 PM
The mod uses 4images' functions that retrieves the thumbnail filename, it should work regardless on extension case.
Title: Re: Signature image v2.3
Post by: Hagen-Roderich on June 04, 2010, 07:42:54 PM
The mod uses 4images' functions that retrieves the thumbnail filename, it should work regardless on extension case.

Maybe i have made a mistake to set up the MOD. Can you have a look up on it?  :oops:
Let me know what information you need.
Title: Re: Signature image v2.3
Post by: V@no on June 05, 2010, 02:28:06 AM
Did you modified your signature.php other then the settings section? if you did, try unmodified version.
Or, you could try test it and make sure that what you've described is correct, create a new category, upload a few images in it, change extension case on one thumbnail, make sure that the thumbnail shows ok when you visit category page. then in your testing signature_test.php replace (this is part of a line)
Code: [Select]
i.cat_id NOT IN ($not_in_cat)with:
Code: [Select]
i.cat_id IN (NNN)(replace NNN with the category number where you test images are)
Now, turn on debug ($debug = 1;)
see if it shows thumbnails.
Title: Re: Signature image v2.3
Post by: Sunny C. on June 08, 2010, 02:29:02 PM
Hallo zusammen,

wie kann ich die Positionen des Cover und der Statistik verändern? Ich würde gerne das Cover in das schwarze Feld schieben und die Statistiken in das blaue Feld.

---

Hi,

how can I change the positions of the cover and the stats? I would like to push the cover in the black box and the statistics in the blue box.


And how can i crate a tranpatent image?
Title: Re: Signature image v2.3
Post by: ghost_wizard on June 12, 2010, 09:43:41 PM
Danke für den tollen MOD!
Funktioniert einwandfrei  :D
Title: Re: Signature image v2.3
Post by: hannes61 on August 17, 2010, 01:54:49 PM
warum wandert dass nicht in die offizielle Version?

Why isn't this in the official version?
 :roll:
Title: Re: Signature image v2.3
Post by: V@no on August 17, 2010, 02:49:16 PM
What difference would it make? :D
Title: Re: Signature image v2.3
Post by: hannes61 on August 17, 2010, 06:07:37 PM
to stupid:



Warning: include(./4images/config.php) [function.include]: failed to open stream: No such file or directory in /mnt/web1/50/45/5222545/htdocs/4images/signature.php on line 132

Warning: include() [function.include]: Failed opening './4images/config.php' for inclusion (include_path='.:/opt/RZphp5/includes') in /mnt/web1/50/45/5222545/htdocs/4images/signature.php on line 132

Warning: include(./4images/includes/constants.php) [function.include]: failed to open stream: No such file or directory in /mnt/web1/50/45/5222545/htdocs/4images/signature.php on line 133

Warning: include() [function.include]: Failed opening './4images/includes/constants.php' for inclusion (include_path='.:/opt/RZphp5/includes') in /mnt/web1/50/45/5222545/htdocs/4images/signature.php on line 133

Warning: include(./4images/includes/db_mysql.php) [function.include]: failed to open stream: No such file or directory in /mnt/web1/50/45/5222545/htdocs/4images/signature.php on line 134

Warning: include() [function.include]: Failed opening './4images/includes/db_mysql.php' for inclusion (include_path='.:/opt/RZphp5/includes') in /mnt/web1/50/45/5222545/htdocs/4images/signature.php on line 134

Warning: include(./4images/includes/functions.php) [function.include]: failed to open stream: No such file or directory in /mnt/web1/50/45/5222545/htdocs/4images/signature.php on line 141

Warning: include() [function.include]: Failed opening './4images/includes/functions.php' for inclusion (include_path='.:/opt/RZphp5/includes') in /mnt/web1/50/45/5222545/htdocs/4images/signature.php on line 141

Fatal error: Class 'Db' not found in /mnt/web1/50/45/5222545/htdocs/4images/signature.php on line 142

any idea?
Seems that the path is not correct.

I set it to: './4images/'
Title: Re: Signature image v2.3
Post by: V@no on August 17, 2010, 06:14:04 PM
and you sure have this setup?:
./signature.php
./4images/config.php
./4images/<the rest of 4images files>
Title: Re: Signature image v2.3
Post by: hannes61 on August 17, 2010, 06:18:31 PM
no i have all under
./4images/...

./4images/signature.php
./4images/config.php
./4images/signature/
./4images/<the rest...>


I still use 1.7.6
Title: Re: Signature image v2.3
Post by: V@no on August 17, 2010, 07:03:44 PM
in that case why did you set it to ./4images/ ? ;)
leave it as ./
Title: Re: Signature image v2.3
Post by: hannes61 on August 18, 2010, 09:47:12 AM
WOW. :-) THANK YOU



okay in the browser it works, but how can i add it to the signature
[ url ..... url]
[img .... img]http://both seem not to work here...
Have i to create the png?

sorry again.


YEAH it works.

[img...../sig.png   img]

with redirect

[url ]..where to go...[img] .signature..[ end_img] [ end_url]

Title: Re: Signature image v2.3
Post by: RHhardmoney on August 21, 2010, 12:43:39 AM
I am new here, and all of your suggestion are really helpful.
Title: Re: Signature image v2.3
Post by: Sunny C. on September 12, 2010, 03:45:49 PM
Hi Vano,

it is also possible to create individual images for a signature image? In the signature to the things such as: Date, Downloads, Pictures Name and something else are
Title: Re: Signature image v2.3
Post by: ilaslan on September 29, 2010, 09:56:08 AM
hello..

i find in this topic ("upload.php") and nothing find this file...

my question is.. pics signatured every file showed. or only one time when file upload...

i have also a forum. extension watermark ( signature ) is proplem.. cpu need.. and host is warn me.

So. i need signature my images when pics are uploads.
Now is this mod does it?

(my english is not very good . sory if a problem )

Title: Re: Signature image v2.3
Post by: MrAndrew on September 29, 2010, 10:04:00 AM
This mod makes the signature. Such as you can see in my messages. If you need a watermark when downloading pictures, then you need this mod:

http://www.4homepages.de/forum/index.php?topic=27311.0 or http://www.4homepages.de/forum/index.php?topic=13719.0
Title: Re: Signature image v2.3
Post by: x23piracy on October 04, 2010, 06:23:02 PM
Hi,

someone know how to set transparency to the thumb that is layered on the signature background?
I have only png's in my gallery (with transparencys & rounded corners).

If the signature image is created the transparency parts of the pngs go black, so there is always
a (border) around those icons.

Can someone tell me what to change in signature.php for getting transparency?

Example Image:
(http://www.xup.in/pic,87766039/signaturec1635abdf0793d732ccd18d4f3df93cf.png) (http://www.xup.in/dl,87766039/signaturec1635abdf0793d732ccd18d4f3df93cf.png/)

The right point in the sourcecode should be:

Code: [Select]
   $th = "imagecreatefrom".$types[$image_info[2]];
or that?:

Code: [Select]
   $temp = imagecreateTrueColor($width_end, $height_end);
    if ($image = $th($thumb))
    {
      imagecopyresampled($temp, $image, 0, 0, 0, 0, $width_end, $height_end, ImageSX($image), ImageSY($image));
    }

If have tried around with this:


suche in include/image_utils.php:
$thumb = imagecreatetruecolor($width, $height);
füge darunter ein:
 if (in_array("png", $types)) {
      imagealphablending($thumb, false);
      imagesavealpha($thumb, true);
    }

Maybe it's the right code but the wrong position in source?

Who knows it?


Greetz Jens
Title: Re: Signature image v2.3
Post by: Nosferatu on December 11, 2010, 04:02:06 PM
hallo,

wie kann ich bilder anzeigen lassen ??

ich hab immer dieses JPEG bild
http://www.pj-firepower.com/picgallerie/signature.php

Edit: konnte den einen Fehler beheben, aber manchmal wird eine Leere seite angeizeigt, weiß jemand warum ?

gruß Jeff
Title: Re: Signature image v2.3
Post by: wassimo on January 28, 2011, 04:08:45 PM
thanks ,  How did u know that i love MTV logo ^-^
Title: Re: Signature image v2.3
Post by: Markus/TSC on August 01, 2011, 08:36:50 PM
Works great, thank you!
Title: Re: Signature image v2.3
Post by: ciprianmp on February 04, 2012, 09:23:15 AM
V@no, do you have any idea of other OSI servers/hosts? (onlinestatus.org seems not updated for 3 years now)
Title: Re: Signature image v2.3
Post by: wallward on May 21, 2012, 08:02:33 PM
not work :(
please see link:
http://www.wallward.net/signature.php
Title: Re: Signature image v2.3
Post by: Nosferatu on June 17, 2012, 09:07:07 AM
hi,

I had also some problems ;)

import is the place where yous signature.php is and the jpeg.gif and the signature.png

signature.php and jpeg.gif is in my Main directory, the signature.png is in /signature/signature.png

Thats my code:

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 0//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 10//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 "signature6.png"//default signature template image filename
$signature_template_random 0//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_full"//name of the template which icons will be used, if thumbnail not found
$sitename "Project-Firepower Gallery"//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 ($im255255255);
  
$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);
?>


hope it will help you
Title: Re: Signature image v2.3
Post by: Scarala on August 07, 2012, 11:01:40 AM
Is there any chance to get access to the signature.png on Windows server?
Its running with IIS and there is no effect with htaccess files (they only run with apache servers).

I hope anyone can help.

The signature.php is alreday running: http://www.mps-fotos.de/4images/signature.php
Title: Re: Signature image v2.3
Post by: PamBreeze on September 03, 2013, 01:08:50 PM
That was easy enough! Thanks!
Title: Re: Signature image v2.3
Post by: wallward on January 13, 2014, 08:03:53 PM
after many try and trace code, I get 3 error
An unexpected error occured. Please try again later.
Bad SQL Query: CREATE TEMPORARY TABLE tab_448866 TYPE  =  HEAP
              SELECT i.image_id, i.cat_id
              FROM 4images_images i
              LEFT JOIN 4images_categories c ON c.cat_id = i.cat_id
              WHERE i.image_active = 1 AND c.auth_viewcat = 0 AND i.cat_id NOT IN (0) AND i.image_id <> 2037
              ORDER  BY RAND()
              LIMIT 1
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE  =  HEAP
              SELECT i.image_id, i.cat_id
              FROM 4im' at line 1

An unexpected error occured. Please try again later.
Bad SQL Query: SELECT t.image_id, t.cat_id, i.user_id, i.image_name, i.image_media_file, i.image_thumb_file
              FROM tab_448866 AS t
              LEFT JOIN 4images_images AS i ON i.image_id=t.image_id
Table 'ramila_wallward.tab_448866' doesn't exist

An unexpected error occured. Please try again later.
Bad SQL Query: DROP TABLE tab_448866
Unknown table 'tab_448866'
Title: Re: Signature image v2.3
Post by: Rembrandt on January 13, 2014, 08:20:36 PM
after many try and trace code, I get 3 error
[....
and if you "TYPE = HEAP" removing?
Title: Re: Signature image v2.3
Post by: wallward on January 14, 2014, 03:36:04 PM
Thank you Rembrandt :)
Where should this code be removed?
Title: Re: Signature image v2.3
Post by: Rembrandt on January 14, 2014, 04:12:57 PM
in this mod?  8)
Title: Re: Signature image v2.3
Post by: wallward on January 14, 2014, 11:17:32 PM
no, I do not change orginal MOD code, maybe conflict with other MOD :(
Is there a way to figure out the problem?  :|
I'm sorry to take you precious time  :oops:
Title: Re: Signature image v2.3
Post by: Rembrandt on January 15, 2014, 04:46:36 AM
search and remove in signature.php:
TYPE = HEAP
Title: Re: Signature image v2.3
Post by: aryan2029 on February 27, 2014, 05:53:32 AM
Thank you very much
Title: Re: Signature image v2.3
Post by: geohei on October 27, 2015, 09:01:43 PM
Another one ... my hoster changed from PHP 5.2 to 5.6 (FastCGI). Now i get the following message for signature.php:

Code: [Select]
Warning: Cannot modify header information - headers already sent by (output started at /home/xxx/gallery/includes/db_mysql.php:196) in /home/xxx/signature/signature.php on line 379
I read: http://www.4homepages.de/forum/index.php?topic=3378.0
However I don't see which of the 3 solutions could apply to signature.php.
I didn't change any (!) PHP code.

Which makes it even more strange ... sometimes, the signature shows, but without the random picture on the left side.
Could it be a mysql issue (I believe the hoster also changed this version recently to 5.6)?

Why is that and what can I do?

BTW ... the underlying 4images 1.7.11 gallery seems (!?) to work properly.

Thanks,
Title: Re: Signature image v2.3
Post by: Rembrandt on October 28, 2015, 07:28:34 AM
Hi!
....

Why is that and what can I do?

Saved the "signature.php" in ASCII (single byte) Encoding without BOM.

mfg Andi

Title: Re: Signature image v2.3
Post by: geohei on October 28, 2015, 10:01:43 AM
Saved the "signature.php" in ASCII (single byte) Encoding without BOM.
Thanks for the answer!
Didn't know that ASCII can be with or without BOM.

I checked the script. Notepad++ says ASCII (Encoding > Encode in ASCII).

Also ... nothing changed, except PHP (from 5.2 to 5.6 [both FastCGI]) and MySQL (from 5.1 to 5.6).
For me, it must be PHP or MySQL related.

What do you think?

BTW ... check my signature with multiple browser refreshs and have a look. Sometimes nothing shows (when the error hits) and sometimes it's a blank signature (without random picture on the left side).

When invoking the script manually (using the browser http://xxx/signature.php), it shows ...

Code: [Select]
An unexpected error occured. Please try again later.
An unexpected error occured. Please try again later.
An unexpected error occured. Please try again later.
Warning: Cannot modify header information - headers already sent by (output started at /home/xxx/gallery/includes/db_mysql.php:196) in /home/xxx/signature/signature.php on line 379
Warning: Cannot modify header information - headers already sent by (output started at /home/xxx/gallery/includes/db_mysql.php:196) in /home/xxx/signature/signature.php on line 380
Warning: Cannot modify header information - headers already sent by (output started at /home/xxx/gallery/includes/db_mysql.php:196) in /home/xxx/signature/signature.php on line 381
Warning: Cannot modify header information - headers already sent by (output started at /home/xxx/gallery/includes/db_mysql.php:196) in /home/xxx/signature/signature.php on line 382
Warning: Cannot modify header information - headers already sent by (output started at /home/xxx/gallery/includes/db_mysql.php:196) in /home/xxx/signature/signature.php on line 383
Warning: Cannot modify header information - headers already sent by (output started at /home/xxx/gallery/includes/db_mysql.php:196) in /home/xxx/signature/signature.php on line 384
‰PNG ...
Title: Re: Signature image v2.3
Post by: geohei on October 30, 2015, 07:21:20 AM
For troubleshooting ... which MySQL and PHP versions do you have, which are known to be working with signature.php?

... later ....

What about .htaccess?
Do I need entries in .htaccess?

... later ...

Also ... putting "error_reporting(E_ALL);" in line 2 of signatures.php didn't help.
No extra output compared to the output without the debugging option.

Thanks,
Title: Re: Signature image v2.3
Post by: geohei on November 06, 2015, 06:12:28 PM
Got it !!!

First ...
http://www.4homepages.de/forum/index.php?topic=24177.0
... then...
http://stackoverflow.com/questions/15358412/mysql-restore-db-syntax-error-in-procedure
... and finally ... I searched "TYPE = HEAP" and deleted it in signature.php, and that was it!
All like described in #465 above.
Title: Re: Signature image v2.3
Post by: Jan-Lukas on November 15, 2015, 04:45:12 PM
möchte hier mal auf mein "kleines" Problem hinweisen

Ich habe ja 2 Images Galerien, auf einem Server (Hosteurope) unter 2 verschiedenen Domains.
Wenn ich die beiden Signaturen auf einer Seite einbaue, kommt es zu folgendem Problem.
Beim aktualisieren, kommt es sehr oft vor, das beide Signaturen die gleichen Daten bekommen (verschiedene Datenbanken)

Bin da ein wenig ratlos, habe mal beide Signaturen eingebaut, damit ihr es sehen könnt.
Title: Re: Signature image v2.3
Post by: Sunny C. on November 17, 2015, 01:31:54 PM
@Jan,
das kann ich bestätigen.

Das Problem ist der Browser.
Beide Signaturen heissen gleich: katalog.png > Führt zu Probleme in der Cache, war jedenfalls bei mir so.
Eine davon umbenennen und das Problem ist behoben.

Signatur 1: http://www.ue-ei-portal-sammlerkatalog.de/katalog.png
Signatur 2: http://www.online-fremdfigurenkatalog.de//katalog.png (Ein Slash zu viel)

LG
Title: Re: Signature image v2.3
Post by: geohei on January 21, 2018, 09:32:26 AM
Hi.

I just changed my web server from PHP 5.6 to 7.0.
signature.php (v2.3) isn't working anymore.
The rest of 4images works fine.

Is there any "classic" trap I was falling into?

Otherwise, I post the exact erros.

Thanks,

... later ...

I noticed that ...

Code: [Select]
/signature/go
... works, but ...

Code: [Select]
/signature/signature.png
... creates this error:

Code: [Select]
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /4images/includes/db_mysql.php:37 Stack trace:
#0 /signature/signature.php(142): Db->__construct('<myhost>', '<myuser>', '<mypassword>', '<mydatabase>')
#1 {main} thrown in /4images/includes/db_mysql.php on line 37

<myhost>, <myuser>, <mypassword> and <mydatabase> are of course correct.

... later ...

I found the solution.

Changing this line in signature ...

Code: [Select]
...
  include(ROOT_PATH.'includes/db_mysqli.php');
...

(i.s.o. db_mysql.php)
Title: Re: Signature image v2.3
Post by: mahsabk on April 17, 2018, 01:25:08 PM
how can i have an email signiture?