Zarzal
Enthusiast
   
Reged: 03/30/03
Posts: 437
Loc: Berlin, Germany
|
|
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:
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.
|
AllenAyres
Wizard
  
Reged: 10/12/01
Posts: 5562
Loc: Texas
|
|
nice, thanks
-------------------- - Allen
- Join Team ThreadsDev
- It's not about you.
|
Jest
Lurker
Reged: 02/23/05
Posts: 6
|
|
A little typo in the code...
In siggen.php at line 36 there is no "}"
Code:
if(!$user['U_Username']) {
$html = new html;
$html -> not_right("You must be logged in to view this page.",$Cat);
$html = new html;
$html -> send_header($pagetitle,$Cat,0,$user);
change to this
Code:
if(!$user['U_Username']) {
$html = new html;
$html -> not_right("You must be logged in to view this page.",$Cat);
}
$html = new html;
$html -> send_header($pagetitle,$Cat,0,$user);
-------------------- br
Thomas
www.mobile.si
|
DLWebmaestro
Addict
 
Reged: 01/16/03
Posts: 1696
Loc: North Carolina
|
|
Nice catch!
-------------------- ThreadsDev 2003 Member Spotlight Winner
JoshPet was here.
Miserable Failure
|
ChAoS
Code Monkey
   
Reged: 11/15/02
Posts: 565
Loc: Great Northwest
|
|
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:
$ubbt_lang['siggen'] = "Creating a Signature";
$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');
Edited by ChAoS (05/01/05 01:27 PM)
|
Zarzal
Enthusiast
   
Reged: 03/30/03
Posts: 437
Loc: Berlin, Germany
|
|
Quote:
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 }
|
Zarzal
Enthusiast
   
Reged: 03/30/03
Posts: 437
Loc: Berlin, Germany
|
|
Quote:
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 
Quote:
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";
|
ChAoS
Code Monkey
   
Reged: 11/15/02
Posts: 565
Loc: Great Northwest
|
|
PHP pro I am not- Coding by chainsaw is my style
-------------------- ChAoS
Emerald Forest Gaming Servers
Official STFU Thread
|
DrChaos
Coder
   
Reged: 09/12/03
Posts: 827
Loc: Hollywood Florida.
|
|
Atleast you use a chainsaw. Im using a dull butter knife :-\
|
smoknz28
Enthusiast
Reged: 04/10/03
Posts: 401
Loc: Washington, D.C.
|
|
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.
|
Zarzal
Enthusiast
   
Reged: 03/30/03
Posts: 437
Loc: Berlin, Germany
|
|
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";
|