******************************************************************************
******************************************************************************
*Modification Name: Thumbnail *
******************************************************************************
* Description: Adds a tag [thumb] that allows users to post images that *
* are larger than the topic page tables without stretching *
* the tables/page. It DOES NOT reduce the size of the down *
* load. When you click on the thumbed image the fullsize *
* image opens in a new window. *
******************************************************************************
* Author: XPerT (Original idea by Turbanator on UBB 5.x) *
* Email: xpert@netwerkin.com *
* WWW: http://www.netwerkin.com *
* Date: June 11th, 2004 *
* Updated By: Allen Ayres *
* Version: 6.7 *
******************************************************************************
* Requirements: 6.6.0 or newer. *
* Compatability: 6.6.0 or newer. *
* Tested On: 6.7.1 *
******************************************************************************
* Files Modified: ubb_lib.cgi, ubb_lib_posting.cgi *
******************************************************************************
******************************************************************************
* Disclaimer: By using this hack, the user implicitly agrees that they *
* are willingly modifying any and all files at their own *
* risk. Should any errors occur either as a direct or *
* indirect result of said modifications the user agrees not *
* to hold Infopop Corporation or any of the individuals *
* listed above accountable. *
* *
* *
* In Other Words: Please make backup copies of every file you plan to *
* modify prior to modification!! *
* *
* *
* For more tips and tricks for use with the ultimate bulletin board *
* please visit UBBDev at: *
* *
* http://www.ubbdev.com/ *
******************************************************************************
******************************************************************************
###########################
Open ubb_lib.cgi and look for...
###########################
if(($_[1] eq 'ON') || ($_[1] eq "yes") || ($_[1] eq "YES")) {
$match++ if $_[0] =~ s/(\[IMG\])(\S+?)(\[\/IMG\])/&imageize($2)/eisg;
$match++ if $_[0] =~ s/(\[IMAGE\])(\S+?)(\[\/IMAGE\])/&imageize($2)/eisg;
}
###########################
Replace that with
###########################
if(($_[1] eq 'ON') || ($_[1] eq "yes") || ($_[1] eq "YES")) {
$match++ if $_[0] =~ s/(\[IMG\])(\S+?)(\[\/IMG\])/&imageize($2)/eisg;
$match++ if $_[0] =~ s/(\[IMAGE\])(\S+?)(\[\/IMAGE\])/&imageize($2)/eisg;
$match++ if $_[0] =~ s/(\[THUMB\])(\S+?)(\[\/THUMB\])/&thumbize($2)/eisg;
}
###########################
###########################
Find....
###########################
sub imageize {
my $orig = shift;
my $string = &ImageChecker($orig);
my $returner;
if ($string && $orig !~ m/^mailto:/) {
$returner = qq~
~;
} else {
$returner = q![img] ! . $orig . q! [/img]!;
} # end if
} #endsub
###########################
Below that add...
###########################
sub thumbize {
my $orig = shift;
my $string = &ImageChecker($orig);
if($string && $orig !~ m/^mailto:/) {
$returner = qq~
~;
} else {
$returner = q![thumb] ! . $orig . q! [/thumb]!;
} # end if
} #endsub
###########################
Open ubb_lib_posting.cgi and look for...
###########################
# old
$match++ if $message =~ s/(
)/\[IMG\]$2\[\/IMG\]/isg;
###########################
Below that add...
###########################
# thumb
$match++ if $message =~ s/(
<\/a>)/\[THUMB\]$6\[\/THUMB\]/isg;
###########################
That's it! Upload both files, clear cache and enjoy...
You can change the width to anything you like. Be sure to change it in both files.