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

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

0 Members and 1 Guest are viewing this topic.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Signature image v2.22
« Reply #375 on: June 17, 2009, 04:37:20 PM »
set to 9 $auth variable. like this:
Code: [Select]
$auth = 9; //permission level for auth_viewimage (0 = All, 2 = Members, 3 = Private or 9 = Admin) Refer in /includes/constants.php
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline harinezumi

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Signature image v2.22
« Reply #376 on: June 17, 2009, 04:50:21 PM »
everything's working fine now  :D
thanks a lot!

Offline Sebas Bonito

  • Sr. Member
  • ****
  • Posts: 271
  • Sebas Bonito
    • View Profile
Re: Signature image v2.22
« Reply #377 on: June 22, 2009, 08:14:50 PM »
Sorry, it doesn't work.

I gues I changed every path correct (GD 2.x exists also), but if I execute the "signature.php" only the URL (e.g. http://www.mydomain.com/signature.php) appears, BUT as an image!

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Signature image v2.22
« Reply #378 on: June 23, 2009, 02:43:09 AM »
usually errors logs can reveal the problem.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Sebas Bonito

  • Sr. Member
  • ****
  • Posts: 271
  • Sebas Bonito
    • View Profile
Re: Signature image v2.22
« Reply #379 on: June 23, 2009, 12:01:52 PM »
Quote
[Tue Jun 23 11:58:08 2009] [error] [client XYZ] PHP Warning: imagepng() [<a href='function.imagepng'>function.imagepng</a>]: open_basedir restriction in effect. File(/srv/www/vhosts/XYZ.de/XYZ/tmp/signature.tmp) is not within the allowed path(s): (/srv/www/vhosts/XYZ.de/httpdocs:/tmp) in /srv/www/vhosts/XYZ.de/httpdocs/XYZ/signature.php on line 328
[Tue Jun 23 11:58:08 2009] [error] [client XYZ] PHP Warning: imagepng() [<a href='function.imagepng'>function.imagepng</a>]: Invalid filename in /srv/www/vhosts/XYZ.de/httpdocs/XYZ/signature.php on line 328
[Tue Jun 23 11:58:08 2009] [error] [client XYZ] PHP Warning: readfile() [<a href='function.readfile'>function.readfile</a>]: open_basedir restriction in effect. File(/srv/www/vhosts/XYZ.de/XYZ/tmp/signature.tmp) is not within the allowed path(s): (/srv/www/vhosts/XYZ.de/httpdocs:/tmp) in /srv/www/vhosts/XYZ.de/httpdocs/XYZ/signature.php on line 339
[Tue Jun 23 11:58:08 2009] [error] [client XYZ] PHP Warning: readfile(/srv/www/vhosts/XYZ.de/XYZ/tmp/signature.tmp) [<a href='function.readfile'>function.readfile</a>]: failed to open stream: Operation not permitted in /srv/www/vhosts/XYZ.de/httpdocs/XYZ/signature.php on line 339

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

Update OMG, newbie-error: I missed a folder in the path. It works now. Thx mate!
« Last Edit: June 23, 2009, 03:12:20 PM by Schnick_und_Schnack »

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Signature image v2.22
« Reply #380 on: June 23, 2009, 03:11:46 PM »
these error means that you need change path in $path variable to a directory where script can write file into. Whatever path you have right now is not good.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Sebas Bonito

  • Sr. Member
  • ****
  • Posts: 271
  • Sebas Bonito
    • View Profile
Re: Signature image v2.22
« Reply #381 on: June 23, 2009, 03:24:47 PM »
done.  8)

How to integrate other variables like "total HITS"?
« Last Edit: June 23, 2009, 04:29:20 PM by Schnick_und_Schnack »

Offline Sebas Bonito

  • Sr. Member
  • ****
  • Posts: 271
  • Sebas Bonito
    • View Profile
Re: Signature image v2.22
« Reply #382 on: June 28, 2009, 04:29:10 PM »
done.  8)

How to integrate other variables like "total HITS"?

Noone an idea?  :oops:

Other question: How to avoid showing pics in "portrait format"?
« Last Edit: June 28, 2009, 08:01:45 PM by Schnick und Schnack »

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: Signature image v2.22
« Reply #383 on: June 28, 2009, 09:23:23 PM »
done.  8)

How to integrate other variables like "total HITS"?

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

and add this to the another arrays

Code: [Select]
                 array(array($fsize, $offset2+$tiny, $lang_hits, "text_color"), array($fsize, $far, $show['hits'], "text_color")),
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi

Offline Sebas Bonito

  • Sr. Member
  • ****
  • Posts: 271
  • Sebas Bonito
    • View Profile
Re: Signature image v2.22
« Reply #384 on: June 28, 2009, 09:36:42 PM »
wonderful! Thx a lot.  8)

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

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

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

UPDATE 2:
Okay, I got it... but the procedure takes very very long:
Code: [Select]
$pic = fopen("signature.png","br");
$filesize = filesize ($pic);
header ("Content-Length: ".$filesize);    
Maybe there is a better way, cause it takes really seconds of seconds... to long in my opinion.
« Last Edit: June 28, 2009, 11:01:11 PM by Schnick und Schnack »

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Signature image v2.23
« Reply #385 on: July 02, 2009, 03:31:32 AM »
Your idea is technically correct, except you get wrong size from the wrong image ;)
I've added this header in the code on first page. Just look at the end of the file.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Sebas Bonito

  • Sr. Member
  • ****
  • Posts: 271
  • Sebas Bonito
    • View Profile
Re: Signature image v2.23
« Reply #386 on: July 02, 2009, 09:33:18 PM »
YES, this works better and has also the right file-size  :lol: thx!

Offline Sebas Bonito

  • Sr. Member
  • ****
  • Posts: 271
  • Sebas Bonito
    • View Profile
Re: Signature image v2.23
« Reply #387 on: July 15, 2009, 02:04:30 PM »
As you can see in my signature below, sometimes it show only around 80-90% of the image.
The rest will be cropped. This happens... I guess every 2nd/3rd time.  :|

Update: one example...

FIRST load


....after RELOAD:
« Last Edit: July 15, 2009, 08:29:34 PM by Schnick und Schnack »

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Signature image v2.23
« Reply #388 on: July 17, 2009, 05:20:03 AM »
I think you should check your server's logs...
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Sebas Bonito

  • Sr. Member
  • ****
  • Posts: 271
  • Sebas Bonito
    • View Profile
Re: Signature image v2.23
« Reply #389 on: July 17, 2009, 08:34:55 AM »
I think you should check your server's logs...

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

Code: [Select]
[Fri Jul 17 08:33:05 2009] [error] [client x] PHP Notice: Undefined offset: 2 in /srv/www/vhosts/de/httpdocs/daeof/signature.php on line 280, referer: http://www.4homepages.de/forum/index.php?topic=6755.new;topicseen
[Fri Jul 17 08:33:05 2009] [error] [client x] PHP Notice: Undefined offset: 3 in /srv/www/vhosts/de/httpdocs/daeof/signature.php on line 280, referer: http://www.4homepages.de/forum/index.php?topic=6755.new;topicseen
[Fri Jul 17 08:33:05 2009] [error] [client x] PHP Notice: Undefined variable: in /srv/www/vhosts/de/httpdocs/daeof/signature.php on line 280, referer: http://www.4homepages.de/forum/index.php?topic=6755.new;topicseen
« Last Edit: July 25, 2009, 12:16:00 AM by Schnick und Schnack »