Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Jul 2001
Posts: 808
Coder
Coder
Joined: Jul 2001
Posts: 808
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.
Attachments
127382-siggen.zip (0 Bytes, 50 downloads)

Sponsored Links
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
nice, thanks


- Allen wavey
- What Drives You?
Joined: Feb 2005
Posts: 7
Lurker
Lurker
Offline
Joined: Feb 2005
Posts: 7
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 /> 

Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609
Nice catch!

Joined: Nov 2002
Posts: 554
Code Monkey
Code Monkey
Offline
Joined: Nov 2002
Posts: 554
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');

Last edited by ChAoS; 05/01/2005 1:27 PM.
Sponsored Links
Joined: Jul 2001
Posts: 808
Coder
Coder
Joined: Jul 2001
Posts: 808
[]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 }

Joined: Jul 2001
Posts: 808
Coder
Coder
Joined: Jul 2001
Posts: 808
[]
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";

Joined: Nov 2002
Posts: 554
Code Monkey
Code Monkey
Offline
Joined: Nov 2002
Posts: 554
PHP pro I am not- Coding by chainsaw is my style

Joined: Sep 2003
Posts: 803
Coder
Coder
Offline
Joined: Sep 2003
Posts: 803
Atleast you use a chainsaw. Im using a dull butter knife :-\

Joined: Apr 2003
Posts: 359
Enthusiast
Enthusiast
Joined: Apr 2003
Posts: 359
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.

Sponsored Links
Joined: Jul 2001
Posts: 808
Coder
Coder
Joined: Jul 2001
Posts: 808
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";


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Nettomo
Nettomo
Germany, Bremen
Posts: 417
Joined: November 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)