Automatic Signature maker

Status
Not open for further replies.

Sponge Bob

Active Member
3,153
2009
192
0
Hey People.

I have seen many forums have automatic update on their signature with the number of posts and all other information of their forum.

Please assist me how to do that as i am finding it i want to make one for my forum as well.

I meant something like this
stats.php


I use PHPBB

Thanks
 
22 comments
Its pretty easy to do, i made a few in the past... one for phpbb3 showing posts etc, also one for ipb2.3.x, and also one that shows your ip and stuff but many sites won't allow that one for some reason.

Its just a simple php script using the images functions, and a base image to put it all on.

I will post an example at some point soon, i think i have the old scripts i made on my laptop and was thinking of making one for my ddl site anyway.

They can use quite a lot of resources though if posted on busy sites, its best to use a cron job to update the data every few hours or cache the image to stop this, i personally just make the image cache userside and it seems to do its job.

Here is one a made for a friend long ago http://win7.ws/test.php you can also use mod rewrite to make the extension to say .png so you can post it on forums that disallow dynamic images :)
 
hey i made one for my forum just used the first script here it is but the users online is not showing correctly it just being at 1 user online :S

sig.php
 
Yeah m using PHPBB3 that would be cool for that script from u :)

Hmmm hold on.... I cant take it for free :P Also give me one of your site name i will add it in the affiliate box :)

cheerz
 
Here is my phpbb3 one:


Make a file called sig.php and put inside:
Code:
<?php
/**
 * @author [EMAIL="DEViANCE@EViLDDL.COM"]DEViANCE@EViLDDL.COM[/EMAIL]
 * @script phpBB3 Forum Sig Generator
 * @copyright 2009
 */
//VARIABLES
$phpbb_root_path = ''; //LEAVE iF iN ROOT, OR iF iN DiR USE ../ ETC...
$site_name = "EViLDDL"; //OBViOUS.. NO??
$cache_image = 86400; //CACHE iMAGE FOR NUMBER OF SECS, 0 TO DiSABLE
$im = imagecreatefrompng("base.png"); //SETUP BASE iMAGE LOCATiON - CHANGE TO SAY iMAGES/BASE.PNG iF YOU LiKE
//SETUP COLOURS - MAY AS WELL COMMENT OUT ANY NONE USED COLOURS (YEAH iM ENGLiSH!)
//$white = imagecolorallocate($im, 255, 255, 255);
$black = imagecolorallocate($im, 0, 0, 0);
//$grey = imagecolorallocate($im, 128, 128, 128);
$red = imagecolorallocate($im, 255, 0, 0);
//$green = imagecolorallocate($im, 0, 255, 0);
//$blue = imagecolorallocate($im, 0, 0, 255);
//iNCLUDE WHAT WE NEED
define('IN_PHPBB', true);
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.'.$phpEx); 
//MAKE THE PNG iMAGE
header("Content-type: image/png");
if ($cache_image!=0)
{
header("Expires: ".date("D, j M Y H:i:s", time() + $cache_image)." UTC");
header("Cache-Control: Public");
header("Pragma: Public");
}
imagestring($im, 2, 8, 5, "Posts: ".$config['num_posts'], $black);
imagestring($im, 2, 8, 17, "Topics: ".$config['num_topics'], $black);
imagestring($im, 2, 8, 29, "Members: ".$config['num_users'], $black);
imagestring($im, 2, 8, 41, "Newest: ".$config['newest_username'], $black);
imagestringup($im, 2, 187, 56, $site_name, $red);
imagepng($im);
imagedestroy($im);
//EXiT PHP
exit();
?>

Then in your .htaccess add this:
Code:
RewriteEngine on
RewriteRule ^sig.png$ sig.php

Then save this image as base.png:
25zlfed.png


Both base.png and sig.php should be placed in your forums root dir, you can change this in sig.php though. You can then use it just like any other image yoursite.com/sig.png.

Enjoy :)
 
Hi, sorry i don't have any phpbb3 site now so can't really work on that script any further.

All i can suggest is scanning through he source of phpbb and working it out. I think i didn't add it for a good reason but don't remember what it was tbh.
 
I made one of these about a year ago too. Their pretty easy. You can make it do all sorts of stuff. Mine recognized time and members and their location so would say good morning 'username' to who ever see's it and tell them what the weather was like in their town. It had a database of 50 holidays and knew when to say eg Happy 4th of July or Happy Halloween. It Also would also pull a special background image from a folder depending on the holiday. eg. Green background with shamrocks at St. Patrick's day and Ghosts at Halloween.

I can't find the one that tell's the weather but this is the one that know's the holidays and picks a random image from a collection along with telling you what OS and browser your running and where you are which is fairly accurate.

Remember I did this over a year ago when I was first learning php so it's incredibly basic code and if I was doing it again it would be done way differently. I'm just posting it to give you ideas of what you can do. You'll probably need to mess about with it a bit too to get it to work and to customize it.

http://rapidshare.com/files/293988267/backgroundx4.zip
 
Status
Not open for further replies.
Back
Top