UBB.Dev
Posted By: Zarzal Beta-[6.5] Signature Generator - 04/27/2005 9:26 AM
Mod Name / Version: Signature Generator

Description: Based on the generic page from Josh and the script Fastbanner from Scott Hough I create this litte add-on for UBBthreads. I have the permission from Scott to modify and post it. It need no modification to the board.

It can create banners on the fly with two text inputs. One text is by default the username (pulled from threads). The script will save the banner under the userID as .png file and can be used by the user for a signature.

Example picture: []http://www.dragonclan-forum.de/photopost/data/3049/medium/Capture-1.jpg[/]

It can be used on my board under http://www.dragonclan-forum.de/siggen/siggen.php but you have to register first. Thats why I post the picture.







Working Under: UBB.Threads 6.5

Mod Status: Beta

Any pre-requisites: require GD library with png support installed on the server

Author(s): Zarzal

Date: 04/26/05

Credits: Josh Pet & Scott Hough

Files Altered: none

New Files:

Database Altered: no

Info/Instructions: Installation is easy. Create a directory and upload all files to it include all subdirs. Chmod the directory banners to 777 and the counter.txt file inside the directory to 666. Then edit siggen.php and banner.php and set $threadspath to match your installation. Thats all. To use the script call siggen.php

There are some empty banner included as example and you should create your own templates.

to do:
1) modify the online.php language file to show when some use the generator
2) put a link for siggen above or below the signature edit field in edituser.php
3) add some nice banners
4) try to add a option to change the used font
5) delete the banner file (if exists) when deleting the user from the databse

Disclaimer: Please backup every file that you intend to modify.
If the modification modifies the database, it's a good idea to backup your database before doing so.

Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.


Attached File
127382-siggen.zip  (50 downloads)
Posted By: AllenAyres Re: Beta-[6.5] Signature Generator - 04/28/2005 3:47 AM
nice, thanks
Posted By: Jest Re: Beta-[6.5] Signature Generator - 04/30/2005 10:31 AM
A little typo in the code...

In siggen.php at line 36 there is no "}"

Code
 <br />if(!$user['U_Username']) { <br />   $html = new html; <br />   $html -> not_right("You must be logged in to view this page.",$Cat); <br /> <br />   $html = new html; <br />   $html -> send_header($pagetitle,$Cat,0,$user); <br />


change to this

Code
 <br />if(!$user['U_Username']) { <br />   $html = new html; <br />   $html -> not_right("You must be logged in to view this page.",$Cat); <br />} <br />   $html = new html; <br />   $html -> send_header($pagetitle,$Cat,0,$user); <br /> 
Posted By: AKD96 Re: Beta-[6.5] Signature Generator - 04/30/2005 10:56 PM
Nice catch!
Posted By: ChAoS_dup1 Re: Beta-[6.5] Signature Generator - 05/01/2005 7:40 PM
I am having a problem that when the banner is created it is created with only the permissions of 600 and it cannot be viewed. Once I change the permissions manually on the users first banner then it works

To view in Who's Online do this;

Add to languages/online.php
Code
 <br />$ubbt_lang['siggen'] = "Creating a Signature"; <br />$ubbt_lang['siggenbanner'] = "Viewing a newly created Signature";


Add to banner.php just below
require ("$threadspath/includes/main.inc.php");
Code
 define('THIS_SCRIPT', 'siggenbanner');


Add to siggen.php just below
require ("$threadspath/includes/main.inc.php");
Code
 define('THIS_SCRIPT', 'siggen');
Posted By: Zarzal Re: Beta-[6.5] Signature Generator - 05/01/2005 8:51 PM
[]Jest said:
A little typo in the code...

In siggen.php at line 36 there is no "}"[/]

very strange. I dont know where I lost it. It is in my code on my webspce and I copy it from there for the archive file But you are right, there must be a }
Posted By: Zarzal Re: Beta-[6.5] Signature Generator - 05/01/2005 9:00 PM
[]
I am having a problem that when the banner is created it is created with only the permissions of 600 and it cannot be viewed. Once I change the permissions manually on the users first banner then it works[/]

Thats made by your server. The png file is created from script by the server. My server set it to 775. Maybe you can change the file permissions in banner.php after the png file is created. Should be easy to do for a php-Pro

[]To view in Who's Online do this[/]
Thanks. The easy way is to setup siggen and banner in the language files without any modification to the scripts. It works for me. My example for online.php:

$ubbt_lang['siggen'] = "generate a signature";
$ubbt_lang['banner'] = "preview a signature";
Posted By: ChAoS_dup1 Re: Beta-[6.5] Signature Generator - 05/01/2005 9:17 PM
PHP pro I am not- Coding by chainsaw is my style
Posted By: DrChaos Re: Beta-[6.5] Signature Generator - 05/03/2005 8:34 PM
Atleast you use a chainsaw. Im using a dull butter knife :-\
Posted By: smoknz28 Re: Beta-[6.5] Signature Generator - 05/08/2005 5:39 AM
Nice...digging this hack. I have not installed this hack as I want to wait til the bugs are all worked out. Played with it on your site and looks like it will be a great addition for many Threads forums out there.
Posted By: Zarzal Re: Beta-[6.5] Signature Generator - 05/08/2005 8:32 PM
my Idea for the link inside UBBt:

edit languages/english/editbasic.php and change the key PROF_SIG as follow:

Code
$ubbt_lang['PROF_SIG']  = 	"Signature (up to {$config['Sig_length']}  characters).<br />You may use <a href=\"{$config['phpurl']}/faq.php#html\" target=\"_new\">UBBCode</a> in your signature.<br />You can use our <a href=\"http://insert your path here/siggen/siggen.php\" target=\"_blank\">Signature Generator</a> to create a signature picture";
© UBB.Developers