****************************************************************************** ****************************************************************************** * HACK NAME: Custom User Text - Redoucmented for v5.46 * ****************************************************************************** * DESCRIPTION: Allows your users to have custom user text under their * * usernames in threads. * * * ****************************************************************************** * CREATED BY: DannyR dannyboy@xs4all.nl * * DATE: 07/13/1999 * * VERSION: version 1 * ****************************************************************************** * MODIFIED BY: Allen Ayres AllenAyres@ubbdev.com * * MODIFY DATE: 08/28/2000 * * VERSION: 1.5.46 * ****************************************************************************** * REQUIREMENTS: full license * * COMPATABILITY: works with all v5.45x - 5.46, you will need to adapt it * * if you are using a different version. * ****************************************************************************** * FILES ADDED: none * * FILES MODIFIED: cpanel2.cgi, cpanel4.cgi, ubb_library.pl, ubb_library2.pl * * ubbmisc.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 US AT VISIT: * * * * http://www.ubbdev.com/ * * * ****************************************************************************** ****************************************************************************** ############################# CPANEL2.CGI ############################# ## FIND: elsif ($DaysPruneDefault == 1000) { $Days1000 = "SELECTED"; } else { $Days365 = "SELECTED"; } ## PASTE THIS UNDER: if ($allowutext EQ "NO") { $utextoff = "CHECKED"; } elsif ($allowutext EQ "YES") { $utexton = "CHECKED"; } elsif ($allowutext EQ "NOSTATUS") { $utextns = "CHECKED"; } elsif ($allowutext EQ "REPLACE") { $utextrp = "CHECKED"; } else { $utexton = "CHECKED"; } if ($allowutextedit EQ "YES") { $utextediton = "CHECKED"; } else { $utexteditoff = "CHECKED"; } ## FIND: THIS8 ## PASTE THIS UNDER: &InputRadioRow("#f7f7f7", "Show specific user texts with each post ?", "(These texts can be customized for every user bij editing the user permissions from the control panel).", " Yes, Show Them.
Do Not Show Them.
Show Them, but Don't Show User Status
Replace userstatus only if user text for that user exists"); &InputTextRow("#dedfdf", "Maximum Length of user text in number of characters", "" , "maxutext", "6", "3"); &InputRadioRow("#f7f7f7", "Allow users to edit their own user text ?", "You can allow users to edit their own user text here", " Allow users to edit their user text
Do not allow users to edit their user text"); ############################# cpanel4.cgi ############################# ## FIND: $searchrow[4] ## PASTE THIS UNDER: ## FIND: $searchrow[7] ## PASTE THIS UNDER: ## FIND: } ## IF match = 1 $matchDelete = $row2 =~ m/Delete/; if ($matchDelete eq "1") { ($type, $UserNumber) = split(/::/, $Name); if ($Value eq "yes") { $Value = "Delete"; } else { $Value = ""; } $changeline = ("$UserNumber|$Value"); $skippush = "no"; if ($arraylength > 0) { $arrayline = 0; foreach $checker(@changes) { ($this, $that) = split(/\|/, $checker); if ($this eq "$UserNumber") { $skippush = "yes"; $changes[$arrayline] = ("$UserNumber|$that$Value"); } $arrayline++; } # foreach checker } ## if array length greater than 0 if ($skippush eq "no") { push(@changes, $changeline); } $arraylength = @changes; ## PASTE THIS UNDER: } ## IF match = 1 $matchCS = $row2 =~ m/utext/; if ($matchCS ne "") { ($type, $UserNumber) = split(/::/, $Name); if ($Value ne "") { $Value = "$Value"; } else { $Value = ""; } $changeline = ("$UserNumber|$Value"); $skippush = "no"; if ($arraylength > 0) { $arrayline = 0; foreach $checker(@changes) { ($this, $that) = split(/\|/, $checker); if ($this eq "$UserNumber") { $skippush = "yes"; $changes[$arrayline] = ("$UserNumber|$that|$Value"); } $arrayline++; } # foreach checker } ## if array length greater than 0 if ($skippush eq "no") { push(@changes, $changeline); } $arraylength = @changes; ## FIND: &CheckPermissions; $WriteYes = ""; $WriteNo = ""; $AdminYes=""; $AdminNo=""; ## PASTE THIS UNDER: $usertext = $searchrow[15]; ## FIND: $DateReg = $searchrow[10]; ## PASTE THIS UNDER: $usertext = $searchrow[15]; ## FIND: ($thisnumber, $ThisPerm) = split(/\|/, $updatename); ## REPLACE WITH: ($thisnumber, $ThisPerm, $usertext) = split(/\|/, $updatename); ## FIND: print MEMBERSHIP ("$theprofile[14]\n"); ## PASTE THIS UNDER: print MEMBERSHIP ("$usertext\n"); ## FIND: Total Posts ## PASTE THIS UNDER: User Text DONE WITH CPANEL4 ################################ ubb_library.pl ################################ ## FIND: $maxmemfields = 14; # = 15 max fields for member data ## Change that to: (may be higher if you have more custom profile fields) $maxmemfields = 15; # = 15 max fields for member data ################################ ubb_library2.pl ################################ ## FIND: } else { $ThisIcon = qq(); } ## PASTE THIS UNDER: if ($RegName eq "unreg") { $thisutext = ""; } elsif ($allowutext EQ "NOSTATUS") { $thisutext = $thisprofile[15]; $ThisStatus = ""; } elsif ($allowutext eq "REPLACE") { if ( $thisprofile[15] ) { $thisutext = "$thisprofile[15]"; $ThisStatus = ""; } else { $thisutext = ""; } } elsif ($allowutext EQ "YES") { $thisutext = "
$thisprofile[15]"; } else {$thisutext = ""; } ## FIND: face="$FontFace">$ThisStatus $AuthorExtra ## REPLACE WITH: face="$FontFace">$ThisStatus$thisutext
$AuthorExtra ###################################### UBBMISC.CGI ###################################### ## FIND: $AllowMassMail = $thisprofile[14]; ## PASTE THIS UNDER: $usertext = $thisprofile[15]; ## FIND: $DateRegistered = "$profileinfo[10]"; ## PASTE THIS UNDER: $usertext = "$profileinfo[15]"; ## FIND: $Signature = &ConvertReturns("$Signature"); ## PASTE THIS UNDER: $usertxt = &CensorCheck("$in{'usertext'}"); $usertxt =~ s/\"/"/g; $usertxt =~ s//>/g; ## FIND: print MEMBERSHIP ("$in{'AllowMassMail'}\n"); ######## >>>> This is in 2 places, paste under both <<<< ######## ## PASTE THIS UNDER: print MEMBERSHIP ("$in{'usertext'}\n"); ## FIND: $Signature =~ s/()//isg; $Signature =~ s//>/g; ## PASTE THIS UNDER: $usertxt = &CensorCheck("$in{'usertext'}"); $usertxt =~ s/\"/"/g; $usertxt =~ s//>/g; ## FIND: } else { $ThisStatus = "$JrMemberTitle"; } ## PASTE THIS UNDER: if ($allowutext eq "NOSTATUS") { $thisutext = $thisprofile[15]; $ThisStatus = ""; } elsif ($allowutext eq "REPLACE") { if ( $thisprofile[15] ) { $thisutext = "$thisprofile[15]"; $ThisStatus = ""; } else { $thisutext = ""; } } elsif ($allowutext eq "YES") { $thisutext = "$thisprofile[15]"; } else {$thisutext = ""; } ## FIND: $ThisStatus ## REPLACE WITH: $ThisStatus
$thisutext
## FIND: } else { $AllowMailYes = "CHECKED"; $AMM = qq(); } ## PASTE THIS UNDER: if ($allowutextedit EQ "YES") { $utextfield = " User Text (max $maxutext characters long)
This text will replace the status shown below your username when you post a message "; } else { $utextfield = " "; } ## FIND: ## REPLACE WITH: $utextfield