4images Forum & Community
Welcome, Guest. Please login or register.
Did you miss your activation email?
August 17, 2018, 09:25:15 AM

Login with username, password and session length
Search:     Advanced search
Togle to toolbar
Translate this page with =>
Translate this page >
* Home Help Search Login Register
 
+  4images Forum & Community
|-+  4images Modifications / Modifikationen
| |-+  Mods & Plugins (Releases & Support) (Moderators: mawenzi, Rembrandt)
| | |-+  Signature image v2.3
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: «« « 1 ... 25 26 27 28 [29] 30 31 32 » »» Print
Current Topic Rating: *****
Author Topic: Signature image v2.3  (Read 491450 times)
Lunique
Full Member
***
Offline Offline

Posts: 109

Thank You
-Given: 8
-Receive: 0

V 1.7.7


View Profile
« Reply #420 on: October 28, 2009, 05:40:05 PM »

Is it possible to change the font size?
I don't know where to get gdf-fonts so I can only use the ones already working and changing them in this line does not bring the result I need
$fsize = 3; //font type (1 to 5 for build-in fonts and 6 to XX for your custom fonts (see $font array above)


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


Can someone please help me?
Logged
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 577

mmm PHP...


View Profile WWW
« Reply #421 on: October 29, 2009, 03:32:46 AM »

gdf fonts don't have sizes like ttf, one font is one size, if you need bigger/smaller size, you need new font...
http://www.devtrolls.com/gdf_fonts/
Logged

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)
GaYan
Sr. Member
****
Offline Offline

Posts: 301

Thank You
-Given: 6
-Receive: 26

♫ | G2 | ♫


View Profile WWW
« Reply #422 on: November 07, 2009, 04:27:57 PM »

hey..i have a doubt Smile .. when i click on the PNG..it doestnot take me to the image URL Sad hw to fix this ?
Logged

I'm Back Smile
Hagen-Roderich
Full Member
***
Offline Offline

Posts: 127

Thank You
-Given: 18
-Receive: 10


View Profile WWW
« Reply #423 on: November 07, 2009, 05:28:41 PM »



1
[url=http://nuwaragedara.com/Gallery/signature.png?go=1][img]http://nuwaragedara.com/Gallery/signature.png[/img][/url]
Logged

GaYan
Sr. Member
****
Offline Offline

Posts: 301

Thank You
-Given: 6
-Receive: 26

♫ | G2 | ♫


View Profile WWW
« Reply #424 on: November 07, 2009, 05:30:13 PM »

Thanks..it worked Smile !
Logged

I'm Back Smile
GaYan
Sr. Member
****
Offline Offline

Posts: 301

Thank You
-Given: 6
-Receive: 26

♫ | G2 | ♫


View Profile WWW
« Reply #425 on: November 07, 2009, 06:29:58 PM »

I Didn't See many Colorful Templates for the mod Signature Image v2.23
so here are some templates (PNG) created by G2 Design Labz

i Have Attached Them Smile Download and Enjoy Smile

* 6.png (57.46 KB - downloaded 88 times.)
* 7.png (36.37 KB - downloaded 84 times.)
* 5.png (48.61 KB - downloaded 61 times.)
* 4.png (49.63 KB - downloaded 50 times.)
* 3.png (40.61 KB - downloaded 53 times.)
* 2.png (48.18 KB - downloaded 59 times.)
Logged

I'm Back Smile
d1eter
Newbie
*
Offline Offline

Posts: 42

Thank You
-Given: 12
-Receive: 0


View Profile
« Reply #426 on: February 02, 2010, 03:30:16 AM »

this is a cool mod...
thanx V@no..!!





.

Logged
alekseyn1
Full Member
***
Offline Offline

Posts: 102

Thank You
-Given: 13
-Receive: 9


View Profile WWW
« Reply #427 on: February 03, 2010, 02:01:18 AM »

weird... did all as instructed...

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

error I get is:

1
2
3
4
5
6
7
8
9
10
11
12
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  Cool) 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  Cool

* signatures.zip (4.94 KB - downloaded 23 times.)
« Last Edit: February 03, 2010, 03:09:21 AM by alekseyn1 » Logged

GaYan
Sr. Member
****
Offline Offline

Posts: 301

Thank You
-Given: 6
-Receive: 26

♫ | G2 | ♫


View Profile WWW
« Reply #428 on: February 16, 2010, 05:12:55 AM »

Major Bug Found - Please Correct This as soon as possible

in signature.php

find
1
Copyright © V@no 2004-2005

And replace with

1
Copyright © V@no 2004-2010
  Wink

  Mr. Green  Mr. Green

Logged

I'm Back Smile
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 577

mmm PHP...


View Profile WWW
« Reply #429 on: February 16, 2010, 06:57:15 AM »

Oh. You are absolutely right! Fixed in v2.3  Mr. Green
Also fixed $noimage displayed instead of image icon if image doesn't have thumbnail, it should now display icon, based on image extension instead.
Logged

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)
Hagen-Roderich
Full Member
***
Offline Offline

Posts: 127

Thank You
-Given: 18
-Receive: 10


View Profile WWW
« Reply #430 on: February 26, 2010, 09:16:26 AM »

How to add the "cat_name" under the acual shown picture?  Rolling Eyes
Logged

Sumale.my
Addicted member
******
Offline Offline

Posts: 1773

Thank You
-Given: 168
-Receive: 85

Neverdie


View Profile
« Reply #431 on: May 04, 2010, 11:49:13 PM »

Please Help
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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
Logged
Jan-Lukas
Addicted member
******
Offline Offline

Posts: 1280

Thank You
-Given: 153
-Receive: 51


View Profile WWW
« Reply #432 on: May 05, 2010, 12:46:03 AM »

kann es sein, das die Adresse so heißen muss ?
signatures/signature.png, sonst lege es einfach ins root, habe ich auch gemacht

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


meine

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

LG

Edit: was hast denn da alles eingebaut ?

signature.php on line 384

meine hat gerade mal 254 Zeilen ?
Logged

Danke Harald



Sumale.my
Addicted member
******
Offline Offline

Posts: 1773

Thank You
-Given: 168
-Receive: 85

Neverdie


View Profile
« Reply #433 on: May 05, 2010, 12:54:33 AM »

Die ist Standard, bis vorhin ging sie auch noch. Ich habe dieses mal nichts gemacht, daher meine Frage!
Meine hat sogar 386 Zeilen

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
<?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($handle4096);
      
$imgid intval($buffer);
    }
    
fclose($handle);
  }
  
$nozip 1;
  
define('GET_CACHES'1);
  include(
ROOT_PATH.'global.php');
  require(
ROOT_PATH.'includes/sessions.php');
  
$user_access get_permission();
  
$url $site_sess->url(ROOT_PATH."index.php""&");
  if (
$imgid && $random_image)
  {
    
$sql "SELECT cat_id
            FROM "
.IMAGES_TABLE."
            WHERE image_id = 
$imgid";
    if (
$row $site_db->query_firstrow($sql))
    {
      if (
check_permission("auth_viewcat"$row['cat_id']) || check_permission("auth_viewimage"$row['cat_id']))
      {
        
$url = (check_permission("auth_viewimage"$row['cat_id']) && check_permission("auth_viewcat"$row['cat_id'])) ? $site_sess->url(ROOT_PATH."details.php?image_id=".$imgid) : ((check_permission("auth_viewcat"$row['cat_id'])) ? $site_sess->url(ROOT_PATH."categories.php?cat_id=".$row['cat_id']) : $url);
      }
    }
  }
  if (!
function_exists("redirect"))
  {
    function 
redirect($url) {
      global 
$script_url$site_sess;
      if (
strpos($url'://') === false) {
        
$url $script_url.'/'.$url;
      }
      
$location = @preg_match('/Microsoft|WebSTAR|Xitami/'getenv('SERVER_SOFTWARE')) ? 'Refresh: 0; URL=' 'Location: ';
      if (
is_object($site_sess)) {
        
$url $site_sess->url($url"&");
      }
      
header($location.$url);
      exit;
    }
  }
  
redirect($url);
}
$imageid 0;
$time = @filemtime($tmpfname);
if (
$handle = @fopen($tmptname"r"))
{
  if (!
feof($handle))
  {
    
$buffer fgets($handle4096);
    
$imageid intval($buffer);
  }
  
fclose($handle);
}
$current_time time();
if (!
$time || (($current_time $time) > $expire || ($current_time $time) < 0) || $debug)
{
  
$show = array();
  include(
ROOT_PATH.'config.php');
  include(
ROOT_PATH.'includes/constants.php');
  include(
ROOT_PATH.'includes/db_mysql.php');
  
define('MEDIA_PATH'ROOT_PATH.MEDIA_DIR);
  
define('THUMB_PATH'ROOT_PATH.THUMB_DIR);
  
define('MEDIA_TEMP_PATH'ROOT_PATH.MEDIA_TEMP_DIR);
  
define('THUMB_TEMP_PATH'ROOT_PATH.THUMB_TEMP_DIR);
  
define('TEMPLATE_PATH'ROOT_PATH.TEMPLATE_DIR."/".$template);
  
define('ICON_PATH'ROOT_PATH.TEMPLATE_DIR."/".$template."/icons");
  include(
ROOT_PATH.'includes/functions.php');
  
$site_db = new Db($db_host$db_user$db_password$db_name);

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

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

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

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

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

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

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

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

  
if (!empty($fonts_dir) && count($fonts))
  {
    foreach (
$fonts as $key => $val)
    {
      
imageloadfont($fonts_dir.$val);
    }
  }
  
$total_online $show['reg_online'] + $show['guests_online'];
  
$online " (".$show['reg_online']." Mitglieder".(($show['reg_online'] > || !$show['reg_online'])? "s" "")." und ".$show['guests_online']." G&auml;ste".(($show['guests_online'] > || !$show['guests_online'])? "s" "").")";
  
$far $offset2+$tiny+(strlen($lang_new_user))*($fsize+4);
  
//array with data:
  //[0] - font type
  //[1] - offset
  //[2] - text
  //[3] - color (i.e. "text_color" will use $text_color variable)
  
$stats = array(
                  array(array(
$fsize$offset2+$tiny$lang_images"text_color"), array($fsize$far$show['total_images']." (".$show['total_new_images']." 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 ($im000);
  
$red ImageColorAllocate ($im25500);
//  ImageString($im, 3, $offset2+(($width-$offset2)/2)-(strlen($sitename)*7/2), 4, $sitename, $text_color);
  
ImageString($im3$offset2+$tiny4$sitename$text_color);
  
$i $start;
  foreach (
$stats as $key)
  {
    if (
$key[0][2] == $lang_online && !$total_online)
    {
      continue;
    }
    foreach (
$key as $val)
    {
      
ImageString($im$val[0], $val[1], $i$val[2], $$val[3]);
    }
    
$i $i $spacing;
  }
  if (
$random_image)
  {
    
$image_info getimagesize($thumb);
    
$types = array(=> "gif"=> "jpeg"=> "png");
    
$th "imagecreatefrom".$types[$image_info[2]];
    
$width_start $image_info[0];
    
$height_start $image_info[1];
    
$dimension $offset2-$offset*2;
    if (
$height $image_info[1] < $offset && $height $offset2 $offset)
    {
      
$dimension $height $offset*2;
    }
    
$width_end $dimension;
    
$height_end $dimension;
    if ((
$width_start $width_end || $height_start $height_end) && $width_start && $height_start && $width_end && $height_end)
    {
       
$ratio $width_start $height_start;
      if (
$ratio 1)
      {
        
$width_end $dimension;
        
$height_end round(($dimension/$width_start) * $height_start);
      }
      else
      {
        
$width_end round(($dimension/$height_start) * $width_start);
        
$height_end $dimension;
       }
    }
    elseif (
$width_start || $height_start)
    {
       
$width_end $width_start;
       
$height_end $height_start;
    }
    
$temp imagecreateTrueColor($width_end$height_end);
    if (
$image $th($thumb))
    {
      
imagecopyresampled($temp$image0000$width_end$height_endImageSX($image), ImageSY($image));
    }
    
$posx round(($offset2-$width_end)/2);
    
$posy round(($height-$height_end)/2);
    
imagecopymerge($im,$temp$posx$posy00$width_end$height_end100);
    
ImageRectangle($im$posx-1$posy-1$posx+$width_end-1$posy+$height_end-1$text_color);
  }
  
$function "Image".$type;
  
$function($im,$tmpfname,(($type == "png") ? $quality)); 
  
ImageDestroy($im);
  
$handle = @fopen($tmptname"wb");
  
$contents = @fwrite($handle, (($random_image) ? $imagedata['image_id'] : 0));
  @
fclose($handle);
//end compilling new image
header('Last-Modified: '.gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate'); // HTTP/1.1
header('Cache-Control: pre-check=0, post-check=0, max-age=0'); // HTTP/1.1
header("Content-disposition: filename=signature".MD5(time()).".".$type);
header("Content-Type: image/".$type);
header("Content-Length: ".filesize($tmpfname));
readfile($tmpfname);
?>
Logged
Hagen-Roderich
Full Member
***
Offline Offline

Posts: 127

Thank You
-Given: 18
-Receive: 10


View Profile WWW
« Reply #434 on: June 04, 2010, 01:45:38 PM »

No image found, if name of image is not the same as the name of the thumbnail.
On my page sometimes the images are saved as "*.JPG" and the thumbs as "*.jpg".

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

Is this possible for the Signature MOD too?
Logged

Pages: «« « 1 ... 25 26 27 28 [29] 30 31 32 » »» Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.056 seconds with 19 queries.