vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Forum stats on signature image (https://vborg.vbsupport.ru/showthread.php?t=50848)

tkeil69575 03-25-2003 10:00 PM

Forum stats on signature image
 
[high]Remember the forum rules here at vB.org and don't exceed the signature dimensions: https://vborg.vbsupport.ru/showthrea...threadid=50062 . Signatures in violation of the rules will be suspended. --filburt1[/high]

Hi all,

What this hack does:
Calls up your Forum statistics (like No. of Members, Threads and Posts) and creates a new image on your server using GD which you can use as a signature image, where ever you like - have a look at my signature and you'll see what I mean. This is only my 2nd hack - so be kind to me ;)

In order to have the image created, say every 15 minutes you will need to set up a cronjob. Infos are provided in the instructions.txt, and alternatives for those who do not have access to crontab on their server.

Support:
Because I'm pretty busy, I will provide only limited support. Will look in here once a week or so.

Credits:
to kars10 for kicking me in the ass ;) and getting me to code this - thanks karsten

greets
tina

Update 23.06.2003
- global.php no longer required, thus when signature image is being created it no longer shows up in "who is onlne"
- quality of image output improved
- debug modus with email notification integrated
- tested with gd2

corsacrazy 03-26-2003 06:43 PM

im not too sure how to create this cron job mate?

tkeil69575 03-26-2003 06:46 PM

hi corsacrazy,

you will only need to set up a cronjob if you want the image created automatically every 15 minutes. Its not a must. Read the instructions corsacrazy. It does not tell how to do it exactly, because that goes beyond the scope I can offer, but it tells you alternatives if you do not have access to telnet or webmin or ssh to create you own cronjob.

greets
tina

Fi_InCogNiTo 03-26-2003 06:47 PM

Sorry, I'm still a little new, but what is a cron job?

tkeil69575 03-26-2003 06:49 PM

Quote:

Today at 09:47 PM Fi_InCogNiTo said this in Post #4
Sorry, I'm still a little new, but what is a cron job?
A cron job is a script that runs at periodic intervals. In this case you would set it up to call up signature.php every 15 Minutes for example.

corsacrazy 03-26-2003 07:00 PM

cheers :D
works great

i realied u can query n e thing u wont in there ! i put members online and newest member ! also for the total registered this doesnt count the mods or admins or n e other usergoup ONLY people in registered group "2" to fix that just copy the get total members query from your index.php

tkeil69575 03-26-2003 07:05 PM

Hi corsacrazy,
yes thanks for the info about the usergroup. I forgot to remove that. I've updated the hack just now, and yes your right of course, theoretically you can query anything you want :)

tina

filburt1 03-26-2003 07:05 PM

Just for the record, I started the trend :p

tkeil69575 03-26-2003 07:08 PM

Quote:

Today at 10:05 PM filburt1 said this in Post #8
Just for the record, I started the trend :p
hihi filburt,
would you like credits? ;)
I'd be glad to give them to you.

tina

corsacrazy 03-26-2003 07:12 PM

($img, 255, 255, 255);//RGB values - Backgroundcolor of stats

how wood i make that #fffffff (white ) ?

tkeil69575 03-26-2003 07:15 PM

The white Backgroundcolor is set transparent on line 53

try replacing:
PHP Code:

imagecolortransparent($img$bg_color);  // Set Background transparent 

with:
PHP Code:

//imagecolortransparent($img, $bg_color);  // Set Background transparent 

then the background of the stats will remain white. or better try replacing the background color 255,255,255 with an RGB value which is not part of you sig.jpg

tkeil69575 03-26-2003 07:23 PM

just a note do not directly link you image to http://www.youdomain.com/signature.php but preferably to the image created by signature.php which is located at http://www.yourdomain.com/images/signatur/signatur.jpg otherwhise the load on your server might get a bit high if you have you signature image placed in many threads in some forum.

greets tina

Fi_InCogNiTo 03-26-2003 07:29 PM

I just noticed something on my board. When I use this as my sig, it shows this on who's online 4 times right now(prolly refreshes)

See attached

Kars10 03-26-2003 07:30 PM

I see lots of cool signatures here!! :)
Great work Tina... ;)

Regards
Kars

[high]* Kars10 kicks install![/high]

Fi_InCogNiTo 03-26-2003 07:32 PM

Maybe linking it to the jpg the php makes will solve this? I think the 14 guests viewing the php is from here ;)

Kars10 03-26-2003 07:34 PM

@ Fi_InCogNiTo, you must run the signature.php, otherwise your stats would not update... ;)

Kars

Fi_InCogNiTo 03-26-2003 07:37 PM

No, it's updated. I mean if you link to the php file instead of your jpg file, everyone who views the sig(even outside the forum) will show on Who's Online at your own forum. Look at my site and check whos online ;)

Oh boy, if this falls into the wrong hands, someone could gather a lotta IPs with this lol

iggy123 03-26-2003 08:47 PM

well I am totally lost!!! THnx anyway

Davey 03-26-2003 08:49 PM

Yes this is extremely dangerous.
From just viewing this thread, Fi_InCogNiTo can now see my IP in his admin log, or online.php.
This hack *might* not be such a good idea.....

Dave.

Gardener 03-26-2003 08:53 PM

Quote:

Today at 09:29 PM Fi_InCogNiTo said this in Post #13
I just noticed something on my board. When I use this as my sig, it shows this on who's online 4 times right now(prolly refreshes)




See attached

Are you linking to the image or the php file. I know on my site I have a cron job set to run every 10 mins. and it shows up on who's online.

Fi_InCogNiTo 03-26-2003 08:59 PM

Quote:

Today at 05:53 PM Gardener said this in Post #20


Are you linking to the image or the php file. I know on my site I have a cron job set to run every 10 mins. and it shows up on who's online.


That was when I was linking to the php. I am now linking to the jpg and found a better use for it ;)

Thanks for the idea. I can now use this for advertising =D

Good hack.

Kars10 03-26-2003 09:16 PM

You must link to the JPG, not to the signature.php. ;)

Kars

Erwin 03-26-2003 09:27 PM

Great work. I may use this...

Dan 03-26-2003 10:13 PM

I may use it if I can set up cronjobs over at phpwebhosting.....

/me clicks the install button for future references

TheEDIGuy 03-26-2003 10:34 PM

Excellent hack. Clicked Install.

N!ck 03-26-2003 10:38 PM

GRRRRRRRRRRRR!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Btw, it's not smart to call global.php. You're going to have all kinds of illegitimate guests.

And filburt1, I'm sorry. It appears I caused a domino effect, and now everyone will have one of these things. I didn't share though (except for with Overgrow, which I don't regret). I promise.

Link14716 03-26-2003 11:46 PM

Mine is in my sig. Before I cron it, I need to get this to work correctly.

See how my image is? I need to make it actually look right...

http://www.vggmn.com/forums/signature/sig.jpeg

Any ideas?

mr e 03-27-2003 12:13 AM

try replacing this
PHP Code:

imagejpeg($img"./$ausgabedatei",$komprimierung); 

with this
PHP Code:

imagejpeg($img"./$ausgabedatei",$komprimierung100); //last # is the quality of jpeg 


Link14716 03-27-2003 12:23 AM

Doesn't seem to work... :(

djr 03-27-2003 12:26 AM

you need to replace this:
PHP Code:

$img imagecreate($width,$height); 

with this:
PHP Code:

$img imagecreatetruecolor($width,$height); 

- djr

Spitfireisgod 03-27-2003 12:27 AM

supar *installs*

Link14716 03-27-2003 12:31 AM

Thanks, djr! I found that at the PHP Online manual, put it in, saw that it worked, and then saw your post. Damn, I should've waited, would've saved me some time. :)

Thanks.

[high]* Link14716 clicks install.[/high]

GoTTi 03-27-2003 02:37 AM

got a error when i run signature.php:

Warning: imagecreatefromjpeg: Unable to open './images/signatur/sig.jpg' for reading in /home/SITE/public_html/forums/signature.php on line 44

Warning: imagecopy(): supplied argument is not a valid Image resource in /home/SITE/public_html/forums/signature.php on line 51

on line 44 it is:

$vorlage = imagecreatefromjpeg("./$vorlagedatei");

Is this calling for some GD use?

Velocd 03-27-2003 03:33 AM

Neat-o, the trendy dynamic signature hack is about to get a whole lot trendier. ;)

I like the concept of updating a signature with dynamic stats, though I'll probably modify it to go further such as iRC stuff, etc.

[high]* Velocd clicks install[/high]

Velocd 03-27-2003 03:34 AM

@Da_Gotti: Didn't you recieve a similar problem with my vB Photo, then I had told you that it required the use of GD 2.0?

Yeah, this hack absolutely has to have GD2.0 installed, or else you're just gonna keep getting those errors.

mr e 03-27-2003 03:39 AM

just update php to 4.3.0, that comes with gd 2.0

Mental Stamina 03-27-2003 04:00 AM

such a dope concept
much respect on conceiving and coding this
-Stamina

afterlab 03-27-2003 04:46 AM

Great hack! I intend to implement tons of features alongside this hack. Thanks for sharing!

ricoche 03-27-2003 06:00 AM

I really like this hack. Thanks very much!

Ricoche :bunny:

Kars10 03-27-2003 06:59 AM

Quote:

Today at 01:38 N!ck said this in Post #26
GRRRRRRRRRRRR!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

And filburt1, I'm sorry. It appears I caused a domino effect, and now everyone will have one of these things. I didn't share though (except for with Overgrow, which I don't regret). I promise.


Whats the Problem with that?? This hack here is orginal coding by Tina and not by Filburt1. Filburts is other code.

So cool down.

Kars ;)


All times are GMT. The time now is 04:52 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01397 seconds
  • Memory Usage 1,819KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete