| ############################################################################### |
| ############################################################################### |
| # TabMenu.pl # |
| # TabMenu.pm # |
| |
| # $Date: 01.05.16 $ # |
| ############################################################################### |
| ############################################################################### |
| # YaBB: Yet another Bulletin Board # |
| # YaBB: Yet another Bulletin Board # |
| # Open-Source Community Software for Webmasters # |
| # Open-Source Community Software for Webmasters # |
| # Version: YaBB 2.5.2 # |
| # Version: YaBB 2.6.12 # |
| # Packaged: October 21, 2012 # |
| # Packaged: January 5, 2016 # |
| # Distributed by: http://www.yabbforum.com # |
| # Distributed by: http://www.yabbforum.com # |
| # =========================================================================== # |
| # =========================================================================== # |
| # Copyright (c) 2000-2012 YaBB (www.yabbforum.com) - All Rights Reserved. # |
| # Copyright (c) 2000-2016 YaBB (www.yabbforum.com) - All Rights Reserved. # |
| # Software by: The YaBB Development Team # |
| # Software by: The YaBB Development Team # |
| # with assistance from the YaBB community. # |
| # with assistance from the YaBB community. # |
| # Your source for web hosting, web design, and domains. # |
| |
| ############################################################################### |
| ############################################################################### |
| |
| our $VERSION = '2.6.12'; |
| |
| |
| $tabmenuplver = 'YaBB 2.5.2 $Revision: 1.0 $'; |
| $tabmenupmver = 'YaBB 2.6.12 $Revision: 1710 $'; |
| if ($action eq 'detailedversion') { return 1; } |
| if ( $action eq 'detailedversion' ) { return 1; } |
| |
| |
| &LoadLanguage('TabMenu'); |
| LoadLanguage('TabMenu'); |
| |
| get_micon(); |
| |
| |
| $tabsep = qq~<img src="$imagesdir/tabsep211.png" border="0" alt="" style="float: left; vertical-align: middle;" />~; |
| $tabsep = q{}; |
| $tabfill = qq~<img src="$imagesdir/tabfill.gif" border="0" alt="" style="vertical-align: middle;" />~; |
| $tabfill = q{}; |
| |
| |
| sub mainMenu { |
| sub mainMenu { |
| if ($action eq "addtab" && $iamadmin) { require "$sourcedir/AdvancedTabs.pl"; &AddNewTab; } |
| my @acting = ( |
| elsif ($action eq "edittab" && $iamadmin) { require "$sourcedir/AdvancedTabs.pl"; &EditTab; } |
| [ |
| elsif ($action ne "") { |
| 'search2', 'favorites', |
| if ($action eq "search2") { |
| 'shownotify', 'im', |
| $tmpaction = "search"; |
| 'imdraft', 'imoutbox', |
| } elsif ($action eq "favorites" || $action eq "shownotify" || $action eq "im" || $action eq "imdraft" || $action eq "imoutbox" || $action eq "imstorage" || $action eq "imsend" || $action eq "imsend2" || $action eq "imshow" || $action eq "profileCheck" || $action eq "myviewprofile" || $action eq "myprofile" || $action eq "myprofileContacts" || $action eq "myprofileOptions" || $action eq "myprofileBuddy" || $action eq "myprofileIM" || $action eq "myprofileAdmin" || $action eq "myusersrecentposts") { |
| 'imstorage', 'imsend', |
| $tmpaction = "mycenter"; |
| 'imsend2', 'imshow', |
| } elsif ($action eq "messagepagetext" || $action eq "messagepagedrop" || $action eq "threadpagetext" || $action eq "threadpagedrop" || $action eq "post" || $action eq "notify" || $action eq "boardnotify" || $action eq "sendtopic" || $action eq "modify") { |
| 'profileCheck', 'myviewprofile', |
| $tmpaction = "home"; |
| 'myprofile', 'myprofileContacts', |
| } elsif ($action eq "guestpm2") { |
| 'myprofileOptions', 'myprofileBuddy', |
| $tmpaction = "guestpm"; |
| 'myprofileIM', 'myprofileAdmin', |
| } else { $tmpaction = $action; } |
| 'myusersrecentposts', 'messagepagetext', |
| |
| 'messagepagedrop', 'threadpagetext', |
| } else { |
| 'threadpagedrop', 'post', |
| $tmpaction = "home"; |
| 'notify', 'boardnotify', |
| } |
| 'sendtopic', 'modify', |
| |
| 'guestpm2' |
| $tab{'home'} = qq~<span |><a href="$scripturl" title = "$img_txt{'103'}" style="padding: 3px 0 4px 0;">$tabfill$img_txt{'103'}$tabfill</a></span>~; |
| ], |
| $tab{'help'} = qq~<span |><a href="$scripturl?action=help" title = "$img_txt{'119'}" style="padding: 3px 0 4px 0; cursor:help;">$tabfill$img_txt{'119'}$tabfill</a></span>~; |
| [ |
| if ($maxsearchdisplay > -1) { |
| 'search', 'mycenter', 'mycenter', 'mycenter', |
| $tab{'search'} = qq~<span |><a href="$scripturl?action=search" title = "$img_txt{'182'}" style="padding: 3px 0 4px 0;">$tabfill$img_txt{'182'}$tabfill</a></span>~; |
| 'mycenter', 'mycenter', 'mycenter', 'mycenter', |
| } |
| 'mycenter', 'mycenter', 'mycenter', 'mycenter', |
| if (!$ML_Allowed || ($ML_Allowed == 1 && !$iamguest) || ($ML_Allowed == 2 && $staff) || ($ML_Allowed == 3 && ($iamadmin || $iamgmod))) { |
| 'mycenter', 'mycenter', 'mycenter', 'mycenter', |
| $tab{'ml'} = qq~<span |><a href="$scripturl?action=ml" title = "$img_txt{'331'}" style="padding: 3px 0 4px 0;">$tabfill$img_txt{'331'}$tabfill</a></span>~; |
| 'mycenter', 'mycenter', 'mycenter', 'home', |
| } |
| 'home', 'home', 'home', 'home', |
| if ($iamadmin) { |
| 'home', 'home', 'home', 'home', |
| $tab{'admin'} = qq~<span |><a href="$boardurl/AdminIndex.$yyaext" title = "$img_txt{'2'}" style="padding: 3px 0 4px 0;">$tabfill$img_txt{'2'}$tabfill</a></span>~; |
| 'guestpm' |
| } |
| ], |
| if ($iamgmod) { |
| ); |
| if (-e "$vardir/gmodsettings.txt") { require "$vardir/gmodsettings.txt"; } |
| |
| if ($allow_gmod_admin) { |
| ## Mod hook 1 ## |
| $tab{'admin'} = qq~<span |><a href="$boardurl/AdminIndex.$yyaext" title = "$img_txt{'2'}" style="padding: 3px 0 4px 0;">$tabfill$img_txt{'2'}$tabfill</a></span>~; |
| |
| } |
| if ( $action eq 'addtab' && $iamadmin ) { |
| } |
| require Sources::AdvancedTabs; |
| if ($sessionvalid == 0 && !$iamguest) { |
| AddNewTab(); |
| my $sesredir; |
| } |
| unless (!$testenv || $action eq "revalidatesession" || $action eq "revalidatesession2") { |
| elsif ( $action eq 'edittab' && $iamadmin ) { |
| $sesredir = $testenv; |
| require Sources::AdvancedTabs; |
| $sesredir =~ s/\=/\~/g; |
| EditTab(); |
| $sesredir =~ s/;/x3B/g; |
| } |
| $sesredir = qq~;sesredir=$sesredir~; |
| elsif ( $INFO{'board'} || $INFO{'num'} ) { $tmpaction = q{}; } |
| } |
| elsif ( $action ne q{} ) { |
| $tab{'revalidatesession'} = qq~<span |><a href="$scripturl?action=revalidatesession$sesredir" title = "$img_txt{'34a'}" style="padding: 3px 0 4px 0;">$tabfill$img_txt{'34a'}$tabfill</a></span>~; |
| for my $i ( 0 .. $#{ $acting[0] } ) { |
| } |
| my $img0 = $acting[0]->[$i]; |
| if ($iamguest) { |
| my $img1 = $acting[1]->[$i]; |
| my $sesredir; |
| if ( $action eq $img0 ) { |
| if ($testenv) { |
| $tmpaction = $img1; |
| $sesredir = $testenv; |
| } |
| $sesredir =~ s/\=/\~/g; |
| else { $tmpaction = $action; } |
| $sesredir =~ s/;/x3B/g; |
| } |
| $sesredir = qq~;sesredir=$sesredir~; |
| } |
| } |
| else { |
| $tab{'login'} = qq~<span |><a href="~ . ($loginform ? "javascript:if(jumptologin>1)alert('$maintxt{'35'}');jumptologin++;window.scrollTo(0,10000);document.loginform.username.focus();" : "$scripturl?action=login$sesredir") . qq~" title = "$img_txt{'34'}" style="padding: 3px 0 4px 0;">$tabfill$img_txt{'34'}$tabfill</a></span>~; |
| $tmpaction = 'home'; |
| if ($regtype) { |
| } |
| $tab{'register'} = qq~<span |><a href="$scripturl?action=register" title = "$img_txt{'97'}" style="padding: 3px 0 4px 0;">$tabfill$img_txt{'97'}$tabfill</a></span>~; |
| |
| } |
| my $tabhtml_l = q~ <li><span|><a href=~; |
| if ($PMenableGuestButton && $PM_level > 0 && $PMenableBm_level > 0) { |
| my $tabhtml_r = qq~</span></li>\n~; |
| $tab{'guestpm'} = qq~<span |><a href="$scripturl?action=guestpm" title = "$img_txt{'pmadmin'}" style="padding: 3px 0 4px 0;">$tabfill$img_txt{'pmadmin'}$tabfill</a></span>~; |
| $tab{'home'} = qq~$tabhtml_l"$scripturl" title="$img_txt{'103'}">$img_txt{'103'}</a>$tabhtml_r~; |
| } |
| $tab{'help'} = qq~$tabhtml_l"$scripturl?action=help" title="$img_txt{'119'}" class="help">$img_txt{'119'}</a>$tabhtml_r~; |
| } else { |
| |
| $tab{'mycenter'} = qq~<span |><a href="$scripturl?action=mycenter" title = "$img_txt{'mycenter'}" style="padding: 3px 0 4px 0;">$tabfill$img_txt{'mycenter'}$tabfill</a></span>~; |
| if ( $maxsearchdisplay > -1 && $advsearchaccess eq 'granted' ) { |
| $tab{'logout'} = qq~<span |><a href="$scripturl?action=logout" title = "$img_txt{'108'}" style="padding: 3px 0 4px 0;">$tabfill$img_txt{'108'}$tabfill</a></span>~; |
| $tab{'search'} = qq~$tabhtml_l"$scripturl?action=search" title="$img_txt{'182'}">$img_txt{'182'}</a>$tabhtml_r~; |
| } |
| } |
| |
| if ( $Show_EventButton == 2 || ( !$iamguest && $Show_EventButton == 1 ) ) { |
| # Advanced Tabs starts here |
| $tab{'eventcal'} = qq~$tabhtml_l"$scripturl?action=eventcal;calshow=1" title="$img_txt{'eventcal'}">$img_txt{'eventcal'}</a>$tabhtml_r~; |
| for (my $i = 0; $i < @AdvancedTabs; $i++) { |
| } |
| if ($AdvancedTabs[$i] =~ /\|/) { |
| if ( $Show_BirthdayButton == 2 |
| my ($tab_key,$tmptab_url, $isaction, $username_req, $tab_access, $tab_newwin, $exttab_url) = split(/\|/, $AdvancedTabs[$i]); |
| || ( !$iamguest && $Show_BirthdayButton == 1 ) ) |
| if (!$tab_access || ($tab_access < 2 && !$iamguest) || ($tab_access < 3 && $iamgmod) || $iamadmin) { |
| { |
| if ($tmptab_url == 1) { $tab_url = $scripturl; } |
| $tab{'birthdaylist'} = qq~$tabhtml_l"$scripturl?action=birthdaylist" title="$img_txt{'birthdaylist'}">$img_txt{'birthdaylist'}</a>$tabhtml_r~; |
| elsif ($tmptab_url == 2) { $tab_url = qq~$boardurl/AdminIndex.$yyaext~; } |
| } |
| else { $tab_url = $tmptab_url; } |
| if ( !$ML_Allowed |
| if ($isaction) { $tab_url .= qq~?action=$tab_key~; } |
| || ( $ML_Allowed == 1 && !$iamguest ) |
| if ($username_req) { $tab_url .= qq~;username=$useraccount{$username}~; } |
| || ( $ML_Allowed == 2 && $staff ) |
| if ($exttab_url) { $tab_url .= qq~;$exttab_url~; } |
| || ( $ML_Allowed == 3 && ( $iamadmin || $iamgmod ) ) |
| my $newwin = $tab_newwin ? qq~ target="_blank"~ : ""; |
| || ( $ML_Allowed == 4 && ( $iamadmin || $iamgmod || $iamfmod ) ) ) |
| &GetTabtxt unless $tab_lang; |
| { |
| #$tab{$tab_key} = qq~<span |><a href="$tab_url"$newwin title = "$tabtxt{$tab_key}" style="padding: 3px 0 4px 0;">$tabfill $tabtxt{$tab_key} $tabfill</a></span>~; |
| $tab{'ml'} = qq~$tabhtml_l"$scripturl?action=ml" title="$img_txt{'331'}">$img_txt{'331'}</a>$tabhtml_r~; |
| $yytabmenu .= qq~<span ~ . ($AdvancedTabs[$i] eq $tmpaction ? qq~class="selected"~ : "") . qq~><a href="$tab_url"$newwin title = "$tabtxt{$tab_key}" style="padding: 3px 0 4px 0;">$tabfill $tabtxt{$tab_key} $tabfill</a></span>$tabsep~; |
| } |
| } |
| if ($iamadmin) { |
| } elsif ($tab{$AdvancedTabs[$i]}) { |
| if ($do_scramble_id) { $user = cloak($username); } |
| my ($first, $last) = split(/\|/, $tab{$AdvancedTabs[$i]}); |
| else { $user = $username; } |
| $yytabmenu .= $first . (($AdvancedTabs[$i] eq $tmpaction && $last) ? qq~class="selected"~ : "") . $last . $tabsep; |
| $tab{'admin'} = qq~$tabhtml_l"$boardurl/AdminIndex.$yyaext?action=admincheck;username=$user" title="$img_txt{'2'}">$img_txt{'2'}</a>$tabhtml_r~; |
| } |
| } |
| } |
| if ($iamgmod) { |
| |
| get_gmod(); |
| if ($iamadmin) { |
| if ($allow_gmod_admin) { |
| my ($seladdtab, $seledittab); |
| if ($do_scramble_id) { $user = cloak($username); } |
| if ($action eq "addtab") { $seladdtab = qq~class="selected"~; } |
| else { $user = $username; } |
| elsif ($action eq "edittab") { $seledittab = qq~class="selected"~; } |
| $tab{'admin'} = qq~$tabhtml_l"$boardurl/AdminIndex.$yyaext?action=admincheck;username=$user" title="$img_txt{'2'}">$img_txt{'2'}</a>$tabhtml_r~; |
| $yytabadd = qq~<div style="float: right; width: 100px; height: 21px; text-align: right;">~; |
| } |
| $yytabadd .= qq~$tabsep<span style="padding-top: 1px;"$seladdtab><a href="$scripturl?action=addtab" title = "$tabmenu_txt{'newtab'}" style="float: left;">$tabfill<img src="$imagesdir/tabadd.gif" height="23" width="20" border="0" alt="$tabmenu_txt{'newtab'}" title="$tabmenu_txt{'newtab'}" style="display: inline;" />$tabfill</a></span>$tabsep~; |
| } |
| $yytabadd .= qq~<span style="padding-top: 1px;"$seledittab><a href="$scripturl?action=edittab" title = "$tabmenu_txt{'edittab'}" style="float: left;">$tabfill<img src="$imagesdir/tabedit.gif" height="23" width="20" border="0" alt="$tabmenu_txt{'edittab'}" title="$tabmenu_txt{'edittab'}" />$tabfill</a></span>$tabsep~; |
| if ( $sessionvalid == 0 && !$iamguest && !$INFO{'set'}) { |
| $yytabadd .= qq~</div>~; |
| my $sesredir; |
| } else { |
| if ( $testenv |
| $yytabadd = qq~ ~; |
| && $action ne 'revalidatesession' |
| } |
| && $action ne 'revalidatesession2' ) |
| |
| { |
| |
| $sesredir = $testenv; |
| |
| $sesredir =~ s/\=/\~/gxsm; |
| |
| $sesredir =~ s/;/x3B/gxsm; |
| |
| $sesredir = qq~;sesredir=$sesredir~; |
| |
| } |
| |
| $tab{'revalidatesession'} = qq~$tabhtml_l"$scripturl?action=revalidatesession$sesredir" title="$img_txt{'34a'}">$img_txt{'34a'}</a>$tabhtml_r~; |
| |
| } |
| |
| if ($iamguest) { |
| |
| my $sesredir; |
| |
| if ($testenv) { |
| |
| $sesredir = $testenv; |
| |
| $sesredir =~ s/\=/\~/gxsm; |
| |
| $sesredir =~ s/;/x3B/gxsm; |
| |
| $sesredir = qq~;sesredir=$sesredir~; |
| |
| } |
| |
| $tab{'login'} = qq~$tabhtml_l"~ |
| |
| . ( |
| |
| $loginform |
| |
| ? "javascript:if(jumptologin>1)alert('$maintxt{'35'}');jumptologin++;window.scrollTo(0,10000);document.loginform.username.focus();" |
| |
| : "$scripturl?action=login$sesredir" |
| |
| ) . qq~" title="$img_txt{'34'}">$img_txt{'34'}</a>$tabhtml_r~; |
| |
| if ($regtype) { |
| |
| $tab{'register'} = qq~$tabhtml_l"$scripturl?action=register" title="$img_txt{'97'}">$img_txt{'97'}</a>$tabhtml_r~; |
| |
| } |
| |
| if ( $PMenableGuestButton && $PM_level > 0 && $PMenableBm_level > 0 ) { |
| |
| $tab{'guestpm'} = qq~$tabhtml_l"$scripturl?action=guestpm" title="$img_txt{'pmadmin'}">$img_txt{'pmadmin'}</a>$tabhtml_r~; |
| |
| } |
| |
| } |
| |
| else { |
| |
| $tab{'mycenter'} = qq~$tabhtml_l"$scripturl?action=mycenter" title="$img_txt{'mycenter'}">$img_txt{'mycenter'}</a>$tabhtml_r~; |
| |
| $tab{'logout'} = qq~$tabhtml_l"$scripturl?action=logout" title="$img_txt{'108'}">$img_txt{'108'}</a>$tabhtml_r~; |
| |
| } |
| |
| |
| |
| ## Tab Mod Hook ## |
| |
| |
| |
| $yytabmenu = qq~<ul>\n~; |
| |
| # Advanced Tabs starts here |
| |
| for my $i ( 0 .. $#AdvancedTabs ) { |
| |
| if ( $AdvancedTabs[$i] =~ /[|]/xsm ) { |
| |
| my ( |
| |
| $tab_key, $tmptab_url, $isaction, $username_req, |
| |
| $tab_access, $tab_newwin, $exttab_url |
| |
| ) = split /[|]/xsm, $AdvancedTabs[$i]; |
| |
| if ( !$tab_access |
| |
| || ( $tab_access < 2 && !$iamguest ) |
| |
| || ( $tab_access < 3 && $iamgmod ) |
| |
| || $iamadmin ) |
| |
| { |
| |
| if ( $tmptab_url == 1 ) { $tab_url = $scripturl; } |
| |
| elsif ( $tmptab_url == 2 ) { |
| |
| $tab_url = qq~$boardurl/AdminIndex.$yyaext~; |
| |
| } |
| |
| else { $tab_url = $tmptab_url; } |
| |
| if ($isaction) { $tab_url .= qq~?action=$tab_key~; } |
| |
| if ($username_req) { |
| |
| $tab_url .= qq~;username=$useraccount{$username}~; |
| |
| } |
| |
| if ($exttab_url) { $tab_url .= qq~;$exttab_url~; } |
| |
| my $newwin = $tab_newwin ? q~ target="_blank"~ : q{}; |
| |
| if ( !$tab_lang ) { GetTabtxt(); } |
| |
| |
| |
| $yytabmenu .= q~ <li><span~ |
| |
| . ( |
| |
| $AdvancedTabs[$i] eq $tmpaction |
| |
| ? q~ class="selected"~ |
| |
| : q{} |
| |
| ) |
| |
| . qq~><a href="$tab_url"$newwin title="$tabtxt{$tab_key}">$tabtxt{$tab_key}</a>$tabhtml_r~; |
| |
| } |
| |
| } |
| |
| elsif ( $tab{ $AdvancedTabs[$i] } ) { |
| |
| my ( $first, $last ) = split /\|/xsm, $tab{ $AdvancedTabs[$i] }; |
| |
| $yytabmenu .= $first |
| |
| . ( |
| |
| ( $AdvancedTabs[$i] eq $tmpaction && $last ) |
| |
| ? q~ class="selected"~ |
| |
| : q{} |
| |
| ) . $last; |
| |
| } |
| |
| } |
| |
| $yytabmenu .= q~ </ul>~; |
| |
| |
| |
| if ( $iamadmin && $addtab_on == 1 ) { |
| |
| my ( $seladdtab, $seledittab ); |
| |
| if ( $action eq 'addtab' ) { $seladdtab = q~ class="selected"~; } |
| |
| elsif ( $action eq 'edittab' ) { $seledittab = q~ class="selected"~; } |
| |
| $yytabadd = |
| |
| qq~<ul class="advtabs"><li id="addtab"><span$seladdtab><a href="$scripturl?action=addtab" title="$tabmenu_txt{'newtab'}">$micon{'tabadd'}</a>$tabhtml_r~; |
| |
| $yytabadd .= |
| |
| qq~<li id="edittab"><span$seledittab><a href="$scripturl?action=edittab" title="$tabmenu_txt{'edittab'}">$micon{'tabedit'}</a></span></li>\n</ul>~; |
| |
| } |
| |
| else { |
| |
| $yytabadd = q~ ~; |
| |
| } |
| |
| return; |
| |
| } |
| |
| |
| |
| sub GetTabtxt2 { |
| |
| $tab_lang = $language ? $language : $lang; |
| |
| if ( -e "$langdir/$tab_lang/tabtext.txt" ) { |
| |
| fopen( TABTXT, "$langdir/$tab_lang/tabtext.txt" ); |
| |
| @tabtext = <TABTXT>; |
| |
| fclose(TABTXT); |
| |
| chomp @tabtext; |
| |
| for ( @tabtext ) { |
| |
| if ( $_ ne q{} ) { |
| |
| ($key, $val ) = split /\t/xsm, $_; |
| |
| $tabtxt{$key} = $val; |
| |
| } |
| |
| } |
| |
| } |
| |
| elsif ( -e "$langdir/English/tabtext.txt" ) { |
| |
| fopen( TABTXT, "$langdir/English/tabtext.txt" ); |
| |
| @tabtext = <TABTXT>; |
| |
| fclose(TABTXT); |
| |
| chomp @tabtext; |
| |
| for ( @tabtext ) { |
| |
| if ( $_ ne q{} ) { |
| |
| ($key, $val ) = split /\t/xsm, $_; |
| |
| $tabtxt{$key} = $val; |
| |
| } |
| |
| } |
| |
| if ( -e "$langdir/$tab_lang/Main.lng" ) { |
| |
| fopen( TABTXT, ">$langdir/$tab_lang/tabtext.txt" ); |
| |
| print {TABTXT} map { "$_\t$tabtxt{$_}\n" } keys %tabtxt |
| |
| or croak "$croak{'print'} TABTXT"; |
| |
| fclose(TABTXT); |
| |
| } |
| |
| } |
| |
| return; |
| } |
| } |
| |
| |
| sub GetTabtxt { |
| sub GetTabtxt { |
| $tab_lang = $language ? $language : $lang; |
| $tab_lang = $language ? $language : $lang; |
| if (fopen(TABTXT, "$langdir/$tab_lang/tabtext.txt")) { |
| if ( -e "$langdir/$tab_lang/tabtext.txt" ) { |
| %tabtxt = map /(.*)\t(.*)/, <TABTXT>; |
| fopen( TABTXT, "$langdir/$tab_lang/tabtext.txt" ); |
| fclose(TABTXT); |
| %tabtxt = map { /(.*)\t(.*)/xsm } <TABTXT>; |
| } elsif (fopen(TABTXT, "$langdir/English/tabtext.txt")) { |
| fclose(TABTXT); |
| %tabtxt = map /(.*)\t(.*)/, <TABTXT>; |
| for (keys %tabtxt) { |
| fclose(TABTXT); |
| chomp $tabtxt{$_} |
| fopen(TABTXT, ">$langdir/$tab_lang/tabtext.txt"); |
| } |
| print TABTXT map "$_\t$tabtxt{$_}\n", keys %tabtxt; |
| } |
| fclose(TABTXT); |
| elsif ( -e "$langdir/English/tabtext.txt" ) { |
| } |
| fopen( TABTXT, "$langdir/English/tabtext.txt" ); |
| |
| %tabtxt = map { /(.*)\t(.*)/xsm } <TABTXT>; |
| |
| fclose(TABTXT); |
| |
| if ( -e "$langdir/$tab_lang/Main.lng" ) { |
| |
| fopen( TABTXT, ">$langdir/$tab_lang/tabtext.txt" ); |
| |
| print {TABTXT} map { "$_\t$tabtxt{$_}\n" } keys %tabtxt |
| |
| or croak "$croak{'print'} TABTXT"; |
| |
| fclose(TABTXT); |
| |
| } |
| |
| } |
| |
| return; |
| } |
| } |
| |
| |
| 1; |
| 1; |
| |
| |