sub_categories.mod 1.1 Adds sub categories to the main categories of your forum. Keith Prociuk http://www.dxsoftware.com Sources/Admin.pl - $txt{'4'}
- $txt{'4'}
- Edit Sub Categories (create/remove)
YaBB.pl elsif ($action eq 'modifycatorder') { require "$sourcedir/ManageCats.pl"; &ReorderCats; } elsif ($action eq 'modifysubcatorder') { require "$sourcedir/ManageSubCats.pl"; &ReorderSubCats; } elsif ($action eq 'modifycat') { require "$sourcedir/ManageCats.pl"; &ModifyCat; } elsif ($action eq 'modifysubcat') { require "$sourcedir/ManageSubCats.pl"; &ModifySubCat; } elsif ($action eq 'managecats') { require "$sourcedir/ManageCats.pl"; &ManageCats; } elsif ($action eq 'managesubcats') { require "$sourcedir/ManageSubCats.pl"; &ManageSubCats; } Sources/BoardIndex.pl
~; foreach $curcat (@categories) { unless( $openmemgr{$curcat} ) { next; } #### if ($catpic{$curcat} =~ /\//i) {$catpic{$curcat} = qq~ ~;} elsif ($catpic{$curcat}) {$catpic{$curcat} = qq~ ~;} #### $yymain .= qq~
$txt{'20'} $txt{'330'} $txt{'21'} $txt{'22'}
~; #Check to see if the subcat.txt doesn't exist, if it doesn't we still need a forum header or it looks funny if(!(-e "$vardir/subcat.txt")) { $yymain .= qq~ ~; } #Go through the categories and creat the tables if they are needed foreach $curcat (@categories) { unless( $openmemgr{$curcat} ) { next; } fopen(FILE, "$vardir/subcat.txt"); @subcategories = ; fclose(FILE); $newsubcatlist=""; $foundasubcat="false"; #Go through the subcats and check to see if the curcat is found in the subcats file (It is a subcategory) foreach $cursubcat (@subcategories) { chomp($cursubcat); ($cursubcatid,$cursubcatname) = split(/\|/,$cursubcat); #Check if we found a match if ($curcat eq $cursubcatid) { $foundasubcat="true"; #This little code breaks the table away from the previous category if ($curcat ne @categories[0]) { $yymain .= qq~
Forum Name $txt{'330'} $txt{'21'} $txt{'22'}

~; } $yymain .= qq~ ~; } } #This code adds a table header for the very first category if the very first category is not found in subcat.txt if ((-e "$vardir/subcat.txt") && $curcat eq @categories[0] && $foundasubcat eq "false") { $yymain .= qq~
$cursubcatname $txt{'330'} $txt{'21'} $txt{'22'}
~; } $yymain .= qq~
Forum Name $txt{'330'} $txt{'21'} $txt{'22'}