4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started 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:
<?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($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']." member".(($show['reg_online'] > 1 || !$show['reg_online'])? "s" : "")." and ".$show['guests_online']." guest".(($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']." 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 ($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);
?>
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: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:<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():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.
-
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
-
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
-
change
$path = "/tmp/"; // WRITEBLE dir (chmod 777), where compilled image will be stored (dont not requere access from web)
-
what i have to change????
hmm?
thats my server:
(http://wartenaufden15.de/4homepages/ftp.jpg)
my line nr.32 in signature.png
$path = "/tmp/";
my tmp is CHMD 777....
more infos?
ask me!
-
well, try to change
$path = "/tmp/";
to
$path = "./tmp/";
or to
$path = "/home/www/htdocs/wartenaufden15.de/tmp/";
-
@ matrix.
thanx!!
-
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
-
@ Bilal:
I asked that before the "hack".
It seems like that it's quite complicated - you need some additional software installed on your server...
-
indeed.
http://www.onlinestatus.org/
-
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
-
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
-
Before I replaced the Database I there was no problem with GD and the signature-mod :?
-
Have anybody an idea, what I did wrong? The CHMOD of tmp is 777
well, if u say so...
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.
-
Shit happens...
...in my tmp folder I found signature.time and signature.tmp! I have delete this and now it works like before!
THX
-
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! :)
-
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
-
does db_mysql.php exists in your erz/4images/includes/ folder?
-
Yes
-
Please PM me with the code of your signature.php and URL to it, if possible.
-
@Chrissie
hello which grafik konverter you ar using GD or different?
sincerly
vincent
-
Hi, great looking mod. I am getting the following error though :/ -
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?
-
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...
-
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 :(
-
Jetzt scheint es zu funktionieren ! Muss es noch einbinden ! :D
-
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?
-
theoreticaly yes, u must grant sertain privelegies for your mysql account.
-
ok so any ideas on how I do that?
-
ok so any ideas on how I do that?
yes.
You contact your hoster...;)
-
(http://www.misimagenes.net/signature.php)
why ?? only show JPEG icon... :S
-
replace
$not_in_cat = "";
with$not_in_cat = "0";
P.S. I've updated the original code to v2.20.2
-
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 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*
-
Hi can we apply this software to this signature? http://software.redshift.je/?p=m&i=23
-
and the point of doing this is...?
-
use other signatures ramdomly, like if you have other sites you can show the 4images signature and the others from the others sites ramdonly
-
did u actualy see what that script does?
it just simply show u a random image from img folder...
-
oooh ok
-
I'm sorry, but what changed in v2.20.2? :oops:
Just the $not_in_cat stuff? :|
-
correct
-
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
-
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
-
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
-
Hi,
i want to include the Status Indicator into my Signature.
I have put in this
$lang_yahoo = "<img src=\"http://osi.lostinspacehosting.com:81/yahoo/jensfunk\">";
and in the $stats = array( section i have put this in
array(array($fsize, $offset2+$tiny, $lang_yahoo, "text_color"))
But see my Signature, what is wrong???
-
u can try this:
replace // --------- End Config ----------
with:$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: $function = "Image".$type;
Insert above: $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.
-
Hi,
is this all what i must do???
I have make the changes and edit the settings to:
$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
array(array($fsize, $offset2+$tiny, $lang_new_user, "text_color"), array($fsize, $far, $show['new_user'], "text_color"))
to this
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...
-
I dont know why u changed anything below // -------- End config ----------
and the $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 ;)
-
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...
-
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):
-
I have made no other changes in the code...Now i have change the image path, nothing more.....
-
hmmm...ok, lets debug it.
1) in 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: fclose($request);
insert: 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 ;)
-
I have do Step 1 - 3 but no Effect and no errors.
The Image is still loading 40 seconds :(
-
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.
-
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???
-
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 ;)
-
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
-
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 :)
-
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
-
Hello! How change codepage for russian language? is possible? :)
-
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: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 array(array($fsize, $offset2+$tiny, $lang_new_user, "text_color"), array($fsize, $far, $show['new_user'], "text_color"))
with: array(array($fsize, $offset2+$tiny, $lang_new_user, "text_color"), array($fsize, $far, translit($show['new_user']), "text_color"))
Good luck.
-
Thank you Vano for your fastest answer. But cyrillic likes a lot :)
-
ok, now I'm curious...how did u do that? 8O
-
:lol: Very simple... This is graphics of template signature :wink:
-
omg...good thinking! nice :D
-
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.
-
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:
-
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
<a href=http://<deineaddresse>/signature.php?go=1><img src="http://<deineaddresse>/signature.php"></a>
oder in BBCode
[url=http://<deineaddresse>/signature.php?go=1][img]http://<deineaddresse>/signature.php[/img][/url]
-
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
-
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
<a href=http://<deineaddresse>/signature.php?go=1><img src="http://<deineaddresse>/signature.php"></a>
oder in BBCode
[url=http://<deineaddresse>/signature.php?go=1][img]http://<deineaddresse>/signature.php[/img][/url]
danke :mrgreen:,mein gott wie peinlich :roll: :oops:
-
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
-
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 .
-
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
-
since your host is using windows system, u must use the path either as relative or use something like: C:\\tmp\\
-
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
-
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\\ )
-
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
-
1) there are no slashes infront of the path!
$signature_template_dir = "\\signatures\\"; //directory with signature template images WITH TRAILING SLASH!!!
2) try to remove all of the @ signs from the code.
-
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*) ;)
-
@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
-
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
-
hi vincent,
how i could remove the name of the last member!
change this :
array(array($fsize, $offset2+$tiny, $lang_new_user, "text_color"), array($fsize, $far, $show['new_user'], "text_color"))
into this :
//array(array($fsize, $offset2+$tiny, $lang_new_user, "text_color"), array($fsize, $far, $show['new_user'], "text_color"))
mawenzi
-
kann ich die signatur auch in eine html datei includen oder einfügen?
falls ja,wie gehe ich da am besten vor?
-
so cool auch ich kann helfen -- steht auf der seite5 :wink:
Link in HTML
<a href=http://<deineaddresse>/signature.php?go=1><img src="http://<deineaddresse>/signature.php"></a>
oder in BBCode
[url=http://<deineaddresse>/signature.php?go=1][img]http://<deineaddresse>/signature.php[/img][/url]
hast du eine idee zu meinem schriftproblem?
gruss
vincent
-
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 ;)
-
@maikew
was ich noch versucht habe ist es als signatur in einem Email einzubinden - aber das schein nicht zu gehen! :wink:
gruss
vincent
-
das sollte über outlook aber eigentlich gehen,dort kannst du z.b. eigenes html briefpapier erstellen und jeden beliebigen html code einbinden ;)
-
@mawenzi
your part have been changed and yes it works - just it still looks funny wrong!
sincerly
vincent
-
@Vincent
your signature.php.txt-file is still current ... ?
mawenzi
-
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
-
ok, the problem is this line:
$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:$far = $offset2+$tiny+XX;
(replace XX with the offset number in pixels u wish.)
-
V@no
great :lol: :lol: :lol: it works :!:
is it possible to have on the bootem of the image
something like
<--- Picture name / Categorie
-
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
-
sorry, I didnt understand...
-
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: if ($key[0][2] == $lang_online && !$total_online)
{
continue;
}
-
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
-
V@no
great it works
is it possible to have on the bootem of the image
something like
<--- Picture name / Categorie
-
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?
-
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)
-
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:
-
is it possible to have on the bootem of the image
something like
<--- Picture name / Categorie
-
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?
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?
-
@maikew
auf deiner seite steht
Powered by 4images 1.8
hab ich was verpasst? 8O
-
*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
-
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?
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?
[url=http://<deineaddresse>/signature.php?go=1][img]http://<deineaddresse>/signature.php[/img][/url]
per bbcode oder
<a href=http://<deineaddresse>/signature.php?go=1><img src="http://<deineaddresse>/signature.php"></a>
per html
-
/me slaps V@no with correct version number :)
okay, will hier nicht mehr stören, have phun ppl.
-
@ benda
hier der link zu meiner "funpic" signatur :mrgreen:
http://maikew.ma.funpic.de/4images/signature.php
-
/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
-
constants.php
// Script version
define('SCRIPT_VERSION', '1.7.1');
oder wenn nicht der fall ist in template footer.html
-
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
-
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:
<?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);
?>
-
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
-
is it possible it is not working on a Windows server?
I dont see any limitations due to a server's system...
-
so this part ?go=1 i have to add just behind the signature.php
--- i have this script ----------
[url=http://www.foto-kocher.com/signature.php?go=1][img]http://www.foto-kocher.com/signature.php[/img][/url]
vincent
-
everything is discribed in the original post. Yes, right after the signature.php in the url.
-
ok, try to replace
$url = $site_sess->url(ROOT_PATH."index.php", "&");
with:$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.
-
still not working!
and could you please tell me how to add the picture name and catecory?
vincent
-
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.
-
Hello V@no
"Regarding image name" Problem - i think you have the Picture Name below your Randompict!
vincent
-
well, my signature code is completly different then the published one...
-
:P
it looks also different :wink:
ok so i am happy with what i have!
Vincent
-
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....
-
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!
-
did u update these two lines?
$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?
$fonts = array(
6 => "micross8px.gdf",
7 => "micross9px.gdf",
8 => "micross10px.gdf",
9 => "micross12px.gdf"
);
and did u specify your new font in $fsize variable?
-
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 ?
-
did u update these two lines? $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?
$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:
$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)
-
@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:
$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)
-
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
-
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
-
Tnx v@no
(http://www.megapixeln.net/4images/signature.php) (http://www.megapixeln.net/4images/signature.php?go=1)
-
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
-
Could somebody help me.
i have a windows server and apache.
i get these error messages:
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)
-
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?
-
a link to the signature please?
and if u wish u can PM me with its source code.
-
I thiought it should be a signature.png in the signature folder.
not a .gif file.
perhaps that is the reason.
-
V@no: maybe you can post your signature.php there?
there is clock and other features, looks good..
-
hello v@no,
how can i add "total downloads" in my signature?
i try this "$lang_downloads = "Downloads: "; but it's not working :(
-
Did you also added the $lang_downloads string into the $stats string ?
-
yes i try this :oops:
$stats = array(
array(array($fsize, $offset2+$tiny, $lang_downloads, "text_color"), array($fsize, $far, $show['downloads'], "text_color"))
-
$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 ?
-
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:
-
Post your entire SQL statement regarding the total downloads and I will take a look at it.
-
i will post it later,thank you for help :)
-
where can i change the XY co-ords of the image? am guessing somewhere in this part.....
$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?
-
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
-
make sure you specifyed two different names for the temp files in two different signatures:
$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)
-
I will try again.
Thanks
-
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
$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)
-
Isn't supposed to be truetype font?
-
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
<?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($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);
}
}
}
header("Location: ".$url);
exit;
}
$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);
}
$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'] > 1 || !$show['reg_online'])? "s" : "")." and ".$show['guests_online']." guest".(($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']." 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 ($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,$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);
?>
-
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
-
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.
-
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
-
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)
-
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 ???
-
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
-
To redirect to the last random image showed in the signature use: http://<youraddress>/signature.png?go=1
Bitte...
-
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:
-
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:
[url=http://www.url.de/bildergalerie/][img]http://www.url.de/bildergalerie/signature/signature.php[/img][/url]
Dein Vorschlag läuft leider nicht
[url=http://www.url.de/bildergalerie/][img]http://www.url.de/bildergalerie/signature/signature.png?go=1[/img][/url]
Matthias
-
klappt es jetzt?
-
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.
[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?
-
du scheinst was in der htaccess flash gemacht zu haben...
-
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: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:<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...
-
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
-
This is wrong:
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!
-
This is wrong: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
-
I guess I should add that note to the tutorial ;)
-
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
-
You also need this mysql query:
// --- Total comments -----
$sql = "SELECT SUM(image_downloads) AS sum
FROM ".IMAGES_TABLE;
$row = $site_db->query_firstrow($sql);
$show['downloads'] = $row['sum'];
-
That's the ticket, thank you V@no! :D
-
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 // --------- End Config ----------
with:$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: $function = "Image".$type;
Insert above: $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.
-
have the same problem.my icq status won't work too :oops:
-
Warning: Invalid argument supplied for foreach() in /home/frkarlyn/public_html/thegallery/signature.php on line 390
-
Line 390 is :
foreach ($n as $key)
I'm not sure what to do with that.
Any suggestions on what I'm missing?
-
attach your signature.php to your reply (u might need change extension to .txt)
-
Thank you for checking it out! It's much appreciated.
signature.php.txt (changed to .txt for this purpose) is attached.
- Karlyn
-
Hmm...apperently array_rand() function does not work when only one item in the array is present...
replace $n = array_rand($messengers, count($messengers));
with: $n = $messengers;
-
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?
-
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,
-
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
-
ok, replace
foreach ($n as $key)
{
$status = online($messengers[$key], $key);
with: foreach ($n as $key => $val)
{
$status = online($val, $key);
-
V@NO YOU ROCK !!!!!!!!! it works *happydance* :mrgreen: thank you :)
-
*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. :|
-
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 ;))
-
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
-
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 ;)
-
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 :?:
-
then use that host
-
i use this host,but my status on my signature are unknown :oops:
see attached sig.txt
-
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?
-
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 :?:
-
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
-
You must add the bots account into your msn messnegers buddy's list.
-
thank you V@no,but how can i add the bot to my buddylist? i can't find it. :oops:
-
Contacts -> Add contact
:?
P.S. dont know why we are discusing it here, it has nothing to do with the signature...
-
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,
-
You can list the categories IDs that you dont want to see thumbnails from:
$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
-
sorry for this mistake V@no you're right. :oops:
-
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
-
When you are a "Good Learner" ... than it is not a great thing to make your own png (with PS or something else ...) ... :wink:
-
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 ........
-
Hallo,
verry nice MOD :D
Greez Darkness :mrgreen:
-
jetzt kommt einfach gar nichts mehr :?:
// ------- 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 ?
-
<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:
-
I don't undersatand what youre trying to tell me :roll:
-
Try replace
readfile($tmpfname);
with one of the following:echo file_get_contents($tmpfname);
orecho 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.
-
:oops: Im having a problem with
$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
-
is there a question in your message?
-
Parse error: parse error, unexpected T_STRING in /mysite/signature.php on line 66
... coding error? :?:
-
... coding error? :?:
yep
-
Well lol 8O How do i fix it? :mrgreen:
-
Well lol 8O How do i fix it? :mrgreen:
restore backups and try again.
Whatever you've changed in the code produced the error.
-
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? ;)
-
No luck :(
-
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.
-
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...
-
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
-
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
-
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.
-
Thanks a lot I think I will look for better webspace...
hugs Luna
-
Can I show total downloads and Hits ?? If yes, then how ?
I dont want to show Comments coz I don't have any :(
-
very nice mod!
-
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 ;)
-
: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
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.
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
-
You should contact your hoster, they must have changed something recently in the server setup, seems that PHP was not compiled correctly.
-
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
-
@ 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 ...
-
and do you have any remote files (thumbnails/media files)?
-
@ 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 ...
-
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...
-
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'
-
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
-
Are you sure that your host has GD enabled? if not (which is seems like it), you can not use this script...
-
Yes. my GD ist enabled.
Look:
http://www.thepictureworld.de/phpinfo.php
-
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.
-
Chicco
Your sig. works fine for me!
-
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
-
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.
-
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.
-
Die Zeile als solche ist ja schon die Lösung ;)
ändere die Zeile einfach so:
$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?
-
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.
-
ehm... :|
-
@ ivan,
nur zur Richtigstellung ... der Dank gebührt ... martrix ... !
-
A little bug fixed that only affects servers with PHP v5.1.x installed and PNG signature.
Replaced at the end of the file $function($im,$tmpfname,$quality);
With this: $function($im,$tmpfname,(($type == "png") ? 9 : $quality));
-
martrix, du bist natürlich auch der beste :P
So etwas liest sich ja gut :D
-
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.
-
v@no, can you please tell us, how to add image name under the thumbnail on signatures?
:)
-
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 ?
-
Sorry, I have no clue...and tell you the truth, I dont know what are you talking about...
-
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:
-
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!
-
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!
-
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 FROM ".CATEGORIES_TABLE;
with: FROM ".CATEGORIES_TABLE."
WHERE auth_viewcat < ".AUTH_ACL;
-
how added the flag from who are watching (browsing the signature) how in V@no signature !?
-
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:
FROM ".CATEGORIES_TABLE."
WHERE auth_viewcat < 2";
Also this works:
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?
-
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
-
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:
-
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!
-
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:
//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):
@fclose($hande);
...should really be:
@fclose($handle);
:wink:
-
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:
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:
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?
-
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!
-
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!
-
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 ;)
-
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!
-
how change the color of letter to "white" in signature ??
can someone help me ?
-
Search for this line:
$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/
-
Search for this line:
$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
-
This is the command could be used to clean up cache directory:
http://www.4homepages.de/forum/index.php?topic=8476.msg65065#msg65065
-
V@no tnx for nice code....
-
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.
-
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)
-
Sorry, I did not understand your question.
-
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)
-
You follow without understanding V@no to me?
-
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
-
$random_fast = 1; //if your mysql account doesn't have permission to create/delete temporary tables, set this to 0
Set it 0
-
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!
-
The OSI updated to v6 recently, try find a server with updated status.jar
-
ok... first where can i get gd becouse i dont have that :D
-
try google.
-
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.
-
Here you go.... Good luck!
-
Thanks a lot ciprianmp! I need all luck :wink:
-
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
-
not sure what is that your question...then use that path (make sure you added slash at the end)
-
ok ive made it working... Thanks for help :wink:
-
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
-
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 ;)
-
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]
-
great... thank you very much!!!
-
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 :)
-
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: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:<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
-
merci beaucoup pour ce code, très beau travail :mrgreen:
-
hi v@no! i have the next error:
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..
-
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" :?
-
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
-
very good :)
just a little change could save you from needing step 2:
instead of $show['new_cutoff'] = $row['setting_value'];
use $new_cutoff = $row['setting_value'];
no need step 2 anymore ;)
-
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?
-
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
-
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
-
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:
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
-
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]
-
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
-
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... :(
-
last resort, i will try do one myself, but they always get distorted... :(
make sure you save your png templates in 24bit ;)
-
I will try, thanks V@no! :)
-
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
-
How can I make (xxx new) part of the images RED color..
I tried something like this (which of course does not work).
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")),
-
what is this?
$offser2_$tiny
-
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. :(
-
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?
-
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?
-
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)
-
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
-
kannst du den mod rewrite nutzen?
-
kannst du den mod rewrite nutzen?
Welchen mod rewrite?
Gruß
Michael
-
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
-
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
-
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
-
Hallo
Ich bekomme diese Fehlermeldung wenn ich auf die signature.php gehe:
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
-
for Russian:
Не нашел на форуме ответа на вопрос, как сделать чтобы МОД воспринимал русский язык, пришлось разбираться как работает функция ImageString и как ее приучить к русскому языку.
Вот, что нашел и придумал:
Шаг 1
С помощью программы phpfont делаем из любого кириллического шрифта шрифт формата .phpfon
Кладем их в папку /signatures
(У меня это были два шрифта с названиями файлов verdana.phpfont и CourierNew.phpfont)
Шаг 2
В файле signature.php находим строку
ImageString($im, 3, $offset2+$tiny, 4, $sitename, $text_color);
Вставляем Над ней
$m = imageloadfont ('./signatures/verdana.phpfont');
$m2 = imageloadfont ('./signatures/CourierNew.phpfont');
Находим строку
ImageString($im, 3, $offset2+$tiny, 4, $sitename, $text_color);
Заменяем ее на:
ImageString($im, [color=red]$m[/color], $offset2+$tiny, 4, $sitename, $text_color);
Находим строку
ImageString($im, $val[0], $val[1], $i, $val[2], $$val[3]);
Заменяем ее на:
ImageString($im, $m2, $val[1], $i, $val[2], $$val[3]);
Само собой нужно поменять:
$lang_images = "Фотографий : ";
$lang_users = "Участников: ";
$lang_cat = "Категорий: ";
$lang_new_user = "Новый участник: ";
$lang_online = "На сайте: ";
$lang_comments = "Комментариев: ";
и далее по тексту файла английские записи поменять на русские "новые", "зарегистрированные", "активные" и т.п.
ВНИМАНИЕ!!!
У меня база данных в UFT-8 (почему то у меня только в этой кодировке нормально работает поиск :?)
Если у вас база тоже в UTF-8 то нужно немного изменить код, т.к. данные в UTF-8 будут крокозябрами на картинке:
ImageString($im, $m2, $val[1], $i, $val[2], $$val[3]);
На:
ImageString($im, $m2, utf8tocyr($val[1]), $i, utf8tocyr($val[2]), utf8tocyr($$val[3]));
и добавить в конец файла /includes/functions.php (перед закрывающей ?>) следующий код:
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)
-
for Russian:
Yes, then another one can't read it... *g*
-
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.
-
Шаг 2
В файле signature.php находим строку
MacroWorld, привет.
Но такой строки нет в коде, который опубликован на 1 странице данной темы :roll:
Если не сложно, может ты мне дашь готовый файлик signature.php и файлики .phpfont? :oops:
-
Шаг 2
В файле signature.php находим строку
MacroWorld, привет.
Но такой строки нет в коде, который опубликован на 1 странице данной темы :roll:
Если не сложно, может ты мне дашь готовый файлик signature.php и файлики .phpfont? :oops:
Действительно ошибся...
Строку поменял в своем посте.
Искать нужно вот такую:
ImageString($im, 3, $offset2+$tiny, 4, $sitename, $text_color);
-
hat das mal bitte jemand in deutsch? und für version 1.7.4.???
-
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 :(
-
@ufkydpnr
... instead of ...
$dimension = $offset2-$offset*2;
... use this ...
$dimension = 20;
... where "20" is the max. side length of your thumbnail in pixel ...
... and the rest ist testing ...
-
Thank You, but that only does work on some images, and not on others, not sure why :(
-
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
-
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
-
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.
-
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.
-
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!
-
Hi,
your singnature.php include a part of code a second time...
=> this meens the error text...
Test:
search every:
include(ROOT_PATH.'
and test for always only one of this codes:
include once(ROOT_PATH.'
KurtW
-
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!
-
Hallo Ivan,
habe das von dir beschriebene Problem bei mir wie folgt gelöst ...
statt ...
$function($im,$tmpfname,$quality);
verwende ich nun ...
$function($im);
-
Hallo Leute
Habe nach Serverumstellung nun mit Signature ein Problem
Bekomme nur noch Fehler Meldung
[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
-
@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 ... ;)
-
@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
-
Very nice, thanks!
-
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
-
Niemand? :?
-
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
-
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
-
use $imagedata['image_name'] variable
-
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
-
i don't know if this will help
utf8_encode($imagedata['image_name'])
[EDIT]
sometimes i'm stupid :) you need fonts too...
-
But if you are using Windows OS, you can use fonts from it
-
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 ^_^.
-
never mind, thought I published my "other" version where I've used ttf fonts...sorry.
-
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.
-
Can anyone help me add user flag info. and user IP into the signature image.
-
Sorry, my english is bad and i'm don't understand what doing this mod...
Is it watermark?
-
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
-
Gibt es die Anleitung auch in Deutsch ??? :roll:
-
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
-
As of categories, you can replace FROM ".CATEGORIES_TABLE;
with: 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.
-
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;
-
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:
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
-
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
-
Ops, my mistake, sorry.
I've updated my previous post.
-
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...
-
This should do it:
$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;
-
It works perfect! Thanks so much!!!
-
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‚—À¥â›ÓDQTVÛ}?!›±~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
-
login as admin and see if more details about the database error showed.
-
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
-
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
-
thanks man
(http://pho2o.net/signature.png) (http://pho2o.net)
-
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):
// ------- 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!
-
It's because you don't allow view images for guests.
to show latest images, replace ORDER BY RAND()
with:
ORDER BY i.image_date DESC
-
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?
-
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.
-
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
-
set to 9 $auth variable. like this:
$auth = 9; //permission level for auth_viewimage (0 = All, 2 = Members, 3 = Private or 9 = Admin) Refer in /includes/constants.php
-
everything's working fine now :D
thanks a lot!
-
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!
-
usually errors logs can reveal the problem.
-
[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!
-
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.
-
done. 8)
How to integrate other variables like "total HITS"?
-
done. 8)
How to integrate other variables like "total HITS"?
Noone an idea? :oops:
Other question: How to avoid showing pics in "portrait format"?
-
done. 8)
How to integrate other variables like "total HITS"?
$lang_hits = "Hits: ";
$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
array(array($fsize, $offset2+$tiny, $lang_hits, "text_color"), array($fsize, $far, $show['hits'], "text_color")),
-
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:
header('Content-length: 25773');
UPDATE 2:
Okay, I got it... but the procedure takes very very long:
$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.
-
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.
-
YES, this works better and has also the right file-size :lol: thx!
-
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)
-
I think you should check your server's logs...
-
I think you should check your server's logs...
Oupps... yes... there is something...
[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
-
and line 280 is...
Is there any other errors?
-
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!
-
would you'd like to take a look on the whole php?
yes, that could help.
-
<?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($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);
}
}
}
header("Location: ".$url);
exit;
}
$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);
}
$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'] > 1 || !$show['reg_online'])? "s" : "")." and ".$show['guests_online']." guest".(($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, 78, $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($fsize, 78, $lang_comments, "text_color"), array($fsize, $far-7, $show['comments'], "text_color")),
array(array($fsize, 78, $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 ($im, 0, 0, 0);
$red = ImageColorAllocate ($im, 255, 0, 0);
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;
}
$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);
?>
-
the problem is in this part of your code:
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.
-
I've deleted the part
, 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)
-
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.
-
Thx a lot, I gues that has fixed it :idea: 8)
-
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.
-
Very beautiful
-
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?
-
Hi,
how can I get the image to my 4images comments now?
Regards Clubsociety
-
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
-
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)
-
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?
-
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/
-
hey..i have a doubt :) .. when i click on the PNG..it doestnot take me to the image URL :( hw to fix this ?
-
(http://nuwaragedara.com/Gallery/signature.png) (http://nuwaragedara.com/Gallery/signature.png?go=1)
[url=http://nuwaragedara.com/Gallery/signature.png?go=1][img]http://nuwaragedara.com/Gallery/signature.png[/img][/url]
-
Thanks..it worked :) !
-
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 :)
-
this is a cool mod...
thanx V@no..!!
(http://www.batamphotoclub.org/gallery/signature.png)
.
-
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:
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)
-
Major Bug Found - Please Correct This as soon as possible
in signature.php
find
Copyright © V@no 2004-2005
And replace with
Copyright © V@no 2004-2010
:wink:
:mrgreen: :mrgreen:
-
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.
-
How to add the "cat_name" under the acual shown picture? :roll:
-
Please Help
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
-
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 ?
-
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ä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);
?>
-
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?
-
The mod uses 4images' functions that retrieves the thumbnail filename, it should work regardless on extension case.
-
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.
-
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)
i.cat_id NOT IN ($not_in_cat)
with:
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.
-
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?
-
Danke für den tollen MOD!
Funktioniert einwandfrei :D
-
warum wandert dass nicht in die offizielle Version?
Why isn't this in the official version?
:roll:
-
What difference would it make? :D
-
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/'
-
and you sure have this setup?:
./signature.php
./4images/config.php
./4images/<the rest of 4images files>
-
no i have all under
./4images/...
./4images/signature.php
./4images/config.php
./4images/signature/
./4images/<the rest...>
I still use 1.7.6
-
in that case why did you set it to ./4images/ ? ;)
leave it as ./
-
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]
-
I am new here, and all of your suggestion are really helpful.
-
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
-
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 )
-
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
-
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:
$th = "imagecreatefrom".$types[$image_info[2]];
or that?:
$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
-
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
-
thanks , How did u know that i love MTV logo ^-^
-
Works great, thank you!
-
V@no, do you have any idea of other OSI servers/hosts? (onlinestatus.org seems not updated for 3 years now)
-
not work :(
please see link:
http://www.wallward.net/signature.php
-
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:
<?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($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']." member".(($show['reg_online'] > 1 || !$show['reg_online'])? "s" : "")." and ".$show['guests_online']." guest".(($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']." 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 ($im, 255, 255, 255);
$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);
?>
hope it will help you
-
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
-
That was easy enough! Thanks!
-
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'
-
after many try and trace code, I get 3 error
[....
and if you "TYPE = HEAP" removing?
-
Thank you Rembrandt :)
Where should this code be removed?
-
in this mod? 8)
-
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:
-
search and remove in signature.php:
TYPE = HEAP
-
Thank you very much
-
Another one ... my hoster changed from PHP 5.2 to 5.6 (FastCGI). Now i get the following message for signature.php:
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,
-
Hi!
....
Why is that and what can I do?
Saved the "signature.php" in ASCII (single byte) Encoding without BOM.
mfg Andi
-
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 ...
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 ...
-
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,
-
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.
-
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.
-
@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
-
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 ...
/signature/go
... works, but ...
/signature/signature.png
... creates this error:
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 ...
...
include(ROOT_PATH.'includes/db_mysqli.php');
...
(i.s.o. db_mysql.php)
-
how can i have an email signiture?