******************************************************************************
******************************************************************************
* MOD NAME: User Specific Signature Disabling *
******************************************************************************
* DESCRIPTION: Allows users to choose whether or not to show signatures *
* with user's posts. Does not ruin cache :-D. *
******************************************************************************
* BY: Weird Al *
* DATE: July 6, 2003. *
* VERSION: 1.0 *
* ORIGINAL AUTHOR: None that I know of *
* THANKS TO: LK for all the help :) *
******************************************************************************
* REQUIREMENTS: 6.4+ & Mods Wordlets Installed *
* COMPATABILITY: 6.4+ *
* TESTED ON: 6.5, but should work on 6.4+ *
******************************************************************************
* FILES MODIFIED: public_topic_page.pl, ubb_lib_posting.cgi, *
* vars_wordlet_mods.cgi, public_edit_profile.pl, ubb_profile.cgi, *
* ubb_lib_files.cgi, ubb_new_reply.cgi, ubb_new_topic.cgi, ultimatebb.cgi *
* NEW FILES: None *
******************************************************************************
******************************************************************************
* DISCLAIMER: By using this mod, 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 GIVE US A VISIT AT: *
* *
* http://www.ubbdev.com *
* *
******************************************************************************
******************************************************************************
*****************************************************************************************************
* NOTE: FOR THOSE USING QUICK REPLY, I ADDED AN AMENDMENT TO MAKE IT EASIER FOR YOU *
* all steps with '**:-D**' should be skipped and referenced at the bottom *
*****************************************************************************************************
#################################
# Step 1: (in ubb_profile.cgi) #
#################################
FIND:
# Set user timezone offset info
my($old_tz_offset, $old_date_format, $old_time_format) = split(/\|\^\|/, $user_profile[39]);
ADD BEFORE:
my $showsig = ($in{showsig} =~ m/^(0|1)$/ ? $in{showsig} : 1 );
FIND:
|| ($avhide != $oldavhide)
ADD AFTER:
|| ($showsig ne $user_profile[64])
FIND: **:-D**
-value => [$user_profile[0], md5_hex($new_password), $public_name, $daysprune, $in{u}, $pntf_hidden, $avhide, $new_date_format, $new_time_format, $tzoffset
ADD AFTER:
, "" , "", "", "", "", "", $showsig
FIND:
$user_profile[38] = join("|", $avlock, $avban, $avhide);
ADD AFTER:
$user_profile[64] = $showsig;
###################################
# Step 2: (in ubb_lib_posting.cgi #
###################################
FIND:
$get_minute, $FormatTime, $post_body, $edit_link, @user_profile,
ADD AFTER:
$sig_post_body,
FIND:
$post_body .= ("
$vars_wordlets{signature_break}
$user_profile[12]
") unless $vars_config{'jc'}->{'is'};
REPLACE WITH:
$sig_post_body = ("
$vars_wordlets{signature_break}
$user_profile[12]
") unless $vars_config{'jc'}->{'is'};
$sig_post_body = UBBCGI::escape($sig_post_body);
} else {
$sig_post_body = '';
FIND:
} # if/else registered
ADD AFTER:
if($user_status eq $vars_wordlets{unregistered}) {
$sig_post_body = '';
}
##################################
# Step 3: (in ubb_lib_files.cgi #
##################################
FIND: (twice)
my $maxmemfields = 40; #total fields permitted in member file
REPLACE WITH:
my $maxmemfields = 64; #total fields permitted in member file
####################################
# Step 4: (in public_topic_page.pl #
####################################
FIND:
function avatar_line (avatarURL) {
if(ubber_cookie_array[6] != 1) {
return "";
} // end if
} // end function
ADD AFTER:
function sig_line_thingy (sigcontents) {
if(ubber_cookie_array[16] != 0) {
return(sigcontents);
} // end if
} // end function
FIND:
my $AvatarBits = "";
if($Avatar && $vars_display{UseAvatars} eq "yes") {
$AvatarBits = qq~
~;
} # end if
ADD AFTER:
my $sig_show = qq~
~;
FIND:
$post_body
ADD AFTER:
$sig_show
######################################
# Step 5: (in public_edit_profile.pl #
######################################
FIND:
my $email_view_pref2 = "";
if($vars_email{UserMailPref} eq "ON") {
ADD ABOVE:
my $showsig_yes = $user_profile[64] ne '0' ? ' checked="checked"' : '';
my $showsig_no = $user_profile[64] eq '0' ? ' checked="checked"' : '';
FIND: