rt_extremities2 plus polskie litery
Strona 1 z 2 12 OstatniOstatni
Wyniki 1 do 10 z 17

Temat: rt_extremities2 plus polskie litery

  1. #1
    Przeglądacz
    Dołączył
    28-09-2007
    Wpisy
    91
    Punkty
    10

    Domyślny rt_extremities2 plus polskie litery

    Witam, zainstalowałem template rt_extremities2 i brakuje polskich liter, ale tylko menu, inny tekst jest prawidłowy. Temat ten jest popularny na forum i dostosowałem sie do następujących wskazówek:
    http://forum.joomla.org/index.php?topic=14796.0;wap2

    i nie pomogło
    oto zawartość pliku index.php z templaty:

    Kod PHP:
    <?php
    defined
    '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
    // needed to seperate the ISO number from the language file constant _ISO
    $iso split'='_ISO );
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; <?php echo _ISO?>" />
    <?php
    if ( $my->id ) {
        
    initEditor();
    }
    mosShowHead();
    require(
    $mosConfig_absolute_path."/templates/" $mainframe->getTemplate() . "/templateConfig.inc.php");
    require(
    $mosConfig_absolute_path."/templates/" $mainframe->getTemplate() . "/rt_splitmenu.php");
    $forcehilite false;
    $topnav rtShowHorizMenu($menu_name);
    $sidenav rtShowSubMenu($menu_name);
    $tabcolor rtGetTabColor();
    $hilightid rtGetHilightid();
    ?>


    <link rel="shortcut icon" href="./images/favicon.ico" />
    <link href="./templates/<?php echo $mainframe->getTemplate(); ?>/css/template_css.css" rel="stylesheet" type="text/css" />
    <link href="./templates/<?php echo $mainframe->getTemplate(); ?>/css/<?php echo $template_style?>_color.css" rel="stylesheet" type="text/css" />
    <link href="./templates/<?php echo $mainframe->getTemplate(); ?>/sifr/sIFR-screen.css" rel="stylesheet" type="text/css" media="screen" />
    <link href="./templates/<?php echo $mainframe->getTemplate(); ?>/sifr/sIFR-print.css" rel="stylesheet" type="text/css" media="print" />
    <!--[if lte IE 6]>
    <link href="./templates/<?php echo $mainframe->getTemplate(); ?>/css/template_ie.css" rel="stylesheet" type="text/css" />
    <![endif]-->
    <script src="./templates/<?php echo $mainframe->getTemplate(); ?>/sifr/sifr.js" type="text/javascript"></script>
    <script src="./templates/<?php echo $mainframe->getTemplate(); ?>/sifr/sifr-addons.js" type="text/javascript"></script>
    </head>
    <body class="page_bg <?php echo $menu_side?> <?php echo $template_style?>">
    <a name="up" id="up"></a>
    <div id="grunge_middle">
        <div id="grunge_bottom">
            <div id="grunge_top">
                <div id="wrapper">
                    <div id="header">
                        <a href="<?php echo $mosConfig_live_site;?>"><img src="<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->getTemplate(); ?>/images/ex2_header_<?php echo $template_style?>.jpg" alt="<?php echo $mosConfig_sitename?>" title="<?php echo $mosConfig_sitename?>" height="78" width="378" border="0" /></a>
                        <div id="user4">
                            <?php mosLoadModules('user4',-1); ?>
                        </div>
                    </div>
                    <div id="content_pad">
                        <div id="nav_menu">
                            <?php echo $topnav?>
                        </div>
                        <table class="nopad">
                            <tr valign="top">
                                <?php if ($menu_side=="left" && (trim($sidenav) || mosCountModules("left"))) { ?>
                                <td class="left">
                                    <?php echo $sidenav?>
                                    <?php mosLoadModules('left', -2); ?>
                                </td>
                                <?php ?>
                                <td class="content">
                                    <?php if ($position_banner=="first") { ?>
                                        <?php if ($template_banner=="module") { ?>
                                            <?php if (mosCountModules('banner')) { ?>
                                                <div id="banner">
                                                    <?php mosLoadModules('banner', -1); ?>
                                                </div>
                                            <?php ?>
                                        <?php } else { ?>
                                            <div id="banner">
                                                <div id="bannerimage"></div>
                                            </div>
                                        <?php ?>
                                    <?php ?>
                                    <?php if (mosCountModules('user1') || mosCountModules('user2') || mosCountModules('user3')) { ?>
                                    <div id="userblocks">
                                    <table cellspacing="10" cellpadding="0" width="100%">
                                        <tr valign="top">
                                            <?php if (mosCountModules('user1')) { ?>
                                            <td width="33%">
                                                <?php mosLoadModules('user1',-2); ?>
                                            </td>
                                            <?php ?>
                                            <?php if (mosCountModules('user2')) { ?>
                                            <td width="33%">
                                                <?php mosLoadModules('user2',-2); ?>
                                            </td>
                                            <?php ?>
                                            <?php if (mosCountModules('user3')) { ?>
                                            <td width="33%">
                                                <?php mosLoadModules('user3',-2); ?>
                                            </td>
                                            <?php ?>
                                        </tr>
                                    </table>
                                    </div>
                                    <?php ?>
                                    <?php if ($position_banner=="second") { ?>
                                        <?php if ($template_banner=="module") { ?>
                                            <?php if (mosCountModules('banner')) { ?>
                                                <div id="banner">
                                                    <?php mosLoadModules('banner', -1); ?>
                                                </div>
                                            <?php ?>
                                        <?php } else { ?>
                                            <div id="banner">
                                                <div id="bannerimage"></div>
                                            </div>
                                        <?php ?>
                                    <?php ?>
                                    <div id="content">
                                        <?php mosPathWay(); ?>
                                        <?php mosMainBody(); ?>
                                    </div>
                                    <?php if (mosCountModules('bottom')) { ?>
                                    <div id="bottom">
                                        <?php mosLoadModules('bottom',-2); ?>
                                    </div>
                                    <?php ?>
                                    <div id="footer">
                                        Design by <a href="http://www.rockettheme.com">RocketTheme</a>
                                    </div>
                                </td>
                                <?php if ($menu_side=="right" && (trim($sidenav) || mosCountModules("right"))) { ?>
                                <td class="right">
                                    <?php echo $sidenav?>
                                    <?php mosLoadModules('right', -2); ?>
                                </td>
                                <?php ?>
                            </tr>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <?php 
    mosLoadModules
    'debug', -);
    require(
    $mosConfig_absolute_path."/templates/" $mainframe->getTemplate() . "/sifr/sifr-" $template_style ".js.php");
    ?>
    </body>
    </html>

    -

  2. Pani Reklamowa
    Pani Reklamowa jest aktywna
    Avatar Panny Google

    Dołączył
    19-08-2010
    Skąd
    Internet
    Postów
    milion
    Pochwał
    setki
  3. #2
    Przeglądacz
    Dołączył
    28-09-2007
    Wpisy
    91
    Punkty
    10

    Domyślny

    Bardzo proszę o pomoc, Brak polskich liter ale tylko jeżeli słowo występuje w nazwie menu w przeciwnym razie wyświetlają sie polskie litery

  4. #3
    Przeglądacz
    Dołączył
    28-09-2007
    Wpisy
    91
    Punkty
    10

    Domyślny

    widze że chyba niedoczekam sie odpowiedzi...

  5. #4
    Wyjadacz GOGOKOM awatar
    Dołączył
    08-08-2007
    Skąd
    Bydgoszcz
    Wpisy
    715
    Punkty
    32

    Domyślny

    Jeżeli nie potrzebujesz obecnego kodowania strony
    <meta http-equiv="Content-Type" content="text/html; <?php echo _ISO; ?>" /> to zmień je na polskie znaki i po problemie
    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-2" />
    GOGOKOM http://mazwal.pl http://kadp.edu.pl - konferencja, Komornik Bydgoszcz http://komornikbydgoszcz.eu
    http://ciasteczka.org.pl - wszystko o i dookoła nich. http://alfa.bydgoszcz.eu - księgowość Bydgoszcz - mój księgowy a dobry księgowy to skarb
    http://twojremont.bydgoszcz.pl - Bydgoszcz firma remontowa, remontowo wykończeniowa.

  6. #5
    Przeglądacz
    Dołączył
    28-09-2007
    Wpisy
    91
    Punkty
    10

    Domyślny

    Niestety nie pomogło, próbowałem już tego.
    oto adres mojej strony:
    www.witaga.com w lewym górnym rogu jest zielona nazwa menu '' meny główne" a wyswietla "meny gwne" nie wyswietla tylko polskich znaków jezeli są wyswietlane w kolorach templaty...
    oto plik index.php templaty po dodaniu
    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-2" />

    Czekam na podpowiedz...


    Kod PHP:
    <?php
    defined
    '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
    // needed to seperate the ISO number from the language file constant _ISO
    $iso split'='_ISO );
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-2" />
    <?php
    if ( $my->id ) {
        
    initEditor();
    }
    mosShowHead();
    require(
    $mosConfig_absolute_path."/templates/" $mainframe->getTemplate() . "/templateConfig.inc.php");
    require(
    $mosConfig_absolute_path."/templates/" $mainframe->getTemplate() . "/rt_splitmenu.php");
    $forcehilite false;
    $topnav rtShowHorizMenu($menu_name);
    $sidenav rtShowSubMenu($menu_name);
    $tabcolor rtGetTabColor();
    $hilightid rtGetHilightid();
    ?>


    <link rel="shortcut icon" href="./images/favicon.ico" />
    <link href="./templates/<?php echo $mainframe->getTemplate(); ?>/css/template_css.css" rel="stylesheet" type="text/css" />
    <link href="./templates/<?php echo $mainframe->getTemplate(); ?>/css/<?php echo $template_style?>_color.css" rel="stylesheet" type="text/css" />
    <link href="./templates/<?php echo $mainframe->getTemplate(); ?>/sifr/sIFR-screen.css" rel="stylesheet" type="text/css" media="screen" />
    <link href="./templates/<?php echo $mainframe->getTemplate(); ?>/sifr/sIFR-print.css" rel="stylesheet" type="text/css" media="print" />
    <!--[if lte IE 6]>
    <link href="./templates/<?php echo $mainframe->getTemplate(); ?>/css/template_ie.css" rel="stylesheet" type="text/css" />
    <![endif]-->
    <script src="./templates/<?php echo $mainframe->getTemplate(); ?>/sifr/sifr.js" type="text/javascript"></script>
    <script src="./templates/<?php echo $mainframe->getTemplate(); ?>/sifr/sifr-addons.js" type="text/javascript"></script>
    </head>
    <body class="page_bg <?php echo $menu_side?> <?php echo $template_style?>">
    <a name="up" id="up"></a>
    <div id="grunge_middle">
        <div id="grunge_bottom">
            <div id="grunge_top">
                <div id="wrapper">
                    <div id="header">
                        <a href="<?php echo $mosConfig_live_site;?>"><img src="<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->getTemplate(); ?>/images/ex2_header_<?php echo $template_style?>.jpg" alt="<?php echo $mosConfig_sitename?>" title="<?php echo $mosConfig_sitename?>" height="78" width="378" border="0" /></a>
                        <div id="user4">
                            <?php mosLoadModules('user4',-1); ?>
                        </div>
                    </div>
                    <div id="content_pad">
                        <div id="nav_menu">
                            <?php echo $topnav?>
                        </div>
                        <table class="nopad">
                            <tr valign="top">
                                <?php if ($menu_side=="left" && (trim($sidenav) || mosCountModules("left"))) { ?>
                                <td class="left">
                                    <?php echo $sidenav?>
                                    <?php mosLoadModules('left', -2); ?>
                                </td>
                                <?php ?>
                                <td class="content">
                                    <?php if ($position_banner=="first") { ?>
                                        <?php if ($template_banner=="module") { ?>
                                            <?php if (mosCountModules('banner')) { ?>
                                                <div id="banner">
                                                    <?php mosLoadModules('banner', -1); ?>
                                                </div>
                                            <?php ?>
                                        <?php } else { ?>
                                            <div id="banner">
                                                <div id="bannerimage"></div>
                                            </div>
                                        <?php ?>
                                    <?php ?>
                                    <?php if (mosCountModules('user1') || mosCountModules('user2') || mosCountModules('user3')) { ?>
                                    <div id="userblocks">
                                    <table cellspacing="10" cellpadding="0" width="100%">
                                        <tr valign="top">
                                            <?php if (mosCountModules('user1')) { ?>
                                            <td width="33%">
                                                <?php mosLoadModules('user1',-2); ?>
                                            </td>
                                            <?php ?>
                                            <?php if (mosCountModules('user2')) { ?>
                                            <td width="33%">
                                                <?php mosLoadModules('user2',-2); ?>
                                            </td>
                                            <?php ?>
                                            <?php if (mosCountModules('user3')) { ?>
                                            <td width="33%">
                                                <?php mosLoadModules('user3',-2); ?>
                                            </td>
                                            <?php ?>
                                        </tr>
                                    </table>
                                    </div>
                                    <?php ?>
                                    <?php if ($position_banner=="second") { ?>
                                        <?php if ($template_banner=="module") { ?>
                                            <?php if (mosCountModules('banner')) { ?>
                                                <div id="banner">
                                                    <?php mosLoadModules('banner', -1); ?>
                                                </div>
                                            <?php ?>
                                        <?php } else { ?>
                                            <div id="banner">
                                                <div id="bannerimage"></div>
                                            </div>
                                        <?php ?>
                                    <?php ?>
                                    <div id="content">
                                        <?php mosPathWay(); ?>
                                        <?php mosMainBody(); ?>
                                    </div>
                                    <?php if (mosCountModules('bottom')) { ?>
                                    <div id="bottom">
                                        <?php mosLoadModules('bottom',-2); ?>
                                    </div>
                                    <?php ?>
                                    <div id="footer">
                                        Design by <a href="http://www.rockettheme.com">RocketTheme</a>
                                    </div>
                                </td>
                                <?php if ($menu_side=="right" && (trim($sidenav) || mosCountModules("right"))) { ?>
                                <td class="right">
                                    <?php echo $sidenav?>
                                    <?php mosLoadModules('right', -2); ?>
                                </td>
                                <?php ?>
                            </tr>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <?php 
    mosLoadModules
    'debug', -);
    require(
    $mosConfig_absolute_path."/templates/" $mainframe->getTemplate() . "/sifr/sifr-" $template_style ".js.php");
    ?>
    </body>
    </html>

  7. #6
    Wyjadacz GOGOKOM awatar
    Dołączył
    08-08-2007
    Skąd
    Bydgoszcz
    Wpisy
    715
    Punkty
    32

    Domyślny

    Sprawdź kodowanie samego pliku otwórz go edytorem z funkcją konwertowania kodowania znaków (EdHTML), sprawdź jeszcze w modułach może źle wpisałeś nazwę menu i dlatego pokazuje co jest.
    GOGOKOM http://mazwal.pl http://kadp.edu.pl - konferencja, Komornik Bydgoszcz http://komornikbydgoszcz.eu
    http://ciasteczka.org.pl - wszystko o i dookoła nich. http://alfa.bydgoszcz.eu - księgowość Bydgoszcz - mój księgowy a dobry księgowy to skarb
    http://twojremont.bydgoszcz.pl - Bydgoszcz firma remontowa, remontowo wykończeniowa.

  8. #7
    Przeglądacz
    Dołączył
    28-09-2007
    Wpisy
    91
    Punkty
    10

    Domyślny

    hmm edytorem z funkcją edhtml, mam dreamweaver 8 ale za bardzo to go nie umiem uzywac, a co do poprawnej nazwy menu to jest ok.

  9. #8
    Bywalec
    Dołączył
    02-08-2007
    Wpisy
    333
    Punkty
    31

    Domyślny

    Nagłówek menu to swf. Czcionka która jest użyta może nie mieć polskich liter dlatego takie efekty się robią.
    pozdrowienia,
    Marek K.

  10. #9
    Przeglądacz
    Dołączył
    28-09-2007
    Wpisy
    91
    Punkty
    10

    Domyślny

    No to wiemy gdzie tkwi problem, teraz tylko małe pytanie, gdzie zmienić czcionkę?? W katalogu template oprocz pliku index.php mam plik sr_splitmeny.php oto jego treść, jeżeli w nim to gdzie należy zmienić czcionke??:
    Kod PHP:
    <?php
    /**
    * @version $Id: md_submenu.php,v 1.2 2005/04/28 04:56:49 rhuk Exp $
    * @package Mambo
    * @copyright (C) 2000 - 2005 Miro International Pty Ltd
    * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
    * Mambo is Free Software
    */

    /** ensure this file is being included by a parent file */
    defined'_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

    if (!
    defined'_MOS_SUBMENU_MODULE' )) {
        
    /** ensure that functions are declared only once */
        
    define'_MOS_SUBMENU_MODULE');
        
    $hilightid = -1;
        
    $menuname null;
        
        
    $tab_colors = array();
        
    $tab_color 'white';
        
    $tab_index 0;
        
        
    /**
        * Utility function for writing a menu link
        */
        
    function rtGetTabColor() {
            global 
    $tab_color;
            return 
    $tab_color;
        }
        

        function 
    rtGetHilightid() {
            global 
    $hilightid;
            return 
    $hilightid;
        }
        
        function 
    rtGetSubMenuLink$mitem$level$hilight=false $color_index=false) {
            global 
    $Itemid$mosConfig_live_site$mainframe$hilightid$menuname$tab_colors$tab_color$tab_index$forcehilite;
            
    $txt '';
            
    $id '';

            switch (
    $mitem->type) {
                case 
    'separator':
                case 
    'component_item_link':
                break;
                case 
    'content_item_link':
                
    $temp split("&task=view&id="$mitem->link);
                
    $mitem->link .= '&Itemid='$mainframe->getItemid($temp[1]);
                break;
                case 
    'url':
                if ( 
    eregi'index.php\?'$mitem->link ) ) {
                    if ( !
    eregi'Itemid='$mitem->link ) ) {
                        
    $mitem->link .= '&Itemid='$mitem->id;
                    }
                }
                break;
                case 
    'content_typed':
                default:
                
    $mitem->link .= '&Itemid='$mitem->id;
                break;
            }
         
    error_reporting(0);  
            if (
    $color_index) {
                
    $id .= $tab_colors[($tab_index)%count($tab_colors)];
                
    $tab_index++;
                
            }
            
    // Active Menu highlighting
            
    $current_itemid trimmosGetParam$_REQUEST'Itemid') );
            if ( !
    $current_itemid && !$hilight ) {
                
    //$id = '';
            
    } else if (($forcehilite && $hilight) || (($current_itemid == $mitem->id || $hilight) && !$forcehilite)) {
                if (
    $level == 0) {
                    
    $tab_color $id;
                    
    $menuname $mitem->name;
                    
    $hilightid $mitem->id;
                } 
                
    $id .= 'active_menu';
            } 
            
            
    $id ' class="' $id '"';
            
    $mitem->link ampReplace$mitem->link );

            if ( 
    strcasecmpsubstr$mitem->link,0,), 'http' ) ) {
                
    $mitem->link sefRelToAbs$mitem->link );
            }

            switch (
    $mitem->browserNav) {
                
    // cases are slightly different
                
    case 1:
                
    // open in a new window
                
    $txt '<li'$id '><a href="'$mitem->link .'" target="_blank">'$mitem->name ."</a></li>\n";
                break;

                case 
    2:
                
    // open in a popup window
                
    $txt "<li"$id "><a href=\"#\" onclick=\"javascript: window.open('"$mitem->link ."', '', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=780,height=550'); return false\">"$mitem->name ."</a></li>\n";
                break;

                case 
    3:
                
    // don't link it
                
    $txt '<li'$id '><span class="seperator">'$mitem->name ."</span></li>\n";
                break;

                default:    
    // formerly case 2
                // open in parent window
                
    $txt '<li'$id '><a href="'$mitem->link .'">'$mitem->name ."</a></li>\n";
                break;
            }

            return 
    $txt;
        }

        
        
        function 
    rtShowHorizMenu(  $menutype) {
            global 
    $database$my$cur_template$Itemid$hilightid$forcehilite;
            global 
    $mosConfig_absolute_path$mosConfig_shownoauth;
            
            
    $topnav '';

            if (
    $mosConfig_shownoauth) {
                
    $sql "SELECT m.* FROM #__menu AS m"
                
    "\nWHERE menutype='"$menutype ."' AND published='1' AND parent=0"
                
    "\nORDER BY ordering";
            } else {
                
    $sql "SELECT m.* FROM #__menu AS m"
                
    "\nWHERE menutype='"$menutype ."' AND published='1' AND access <= '$my->gid' AND parent=0"
                
    "\nORDER BY ordering";
            }
            
    $database->setQuery$sql );

            
    $topmenu $database->loadObjectList'id' );
            
            
    //work out if this should be highlighted
            
    $sql "SELECT m.* FROM #__menu AS m"
            
    "\nWHERE menutype='"$menutype ."' AND published='1'"
            
    $database->setQuery$sql );
            
    $subrows $database->loadObjectList'id' );
            
    $maxrecurse 5;
            
    $parentid $Itemid;

            
    //this makes sure toplevel stays hilighted when submenu active
            
    while ($maxrecurse-- > 0) {
                
    $parentid getParentRow($subrows$parentid);
                if (isset(
    $parentid) && $parentid >= && $subrows[$parentid]) {
                    
    $hilightid $parentid;
                } else {
                    break;    
                }
            }

  11. #10
    Przeglądacz
    Dołączył
    28-09-2007
    Wpisy
    91
    Punkty
    10

    Domyślny

    i dalsza część pliku sr_splitmeny.php bo teks był za długi aby go wprowadzic jako jedna odpowiedz:
    Kod PHP:
    $links = array();
            
    $i 0;
            foreach (
    $topmenu as $menuitem) {
                
    $hilight false;
                if (isset(
    $forcehilite) && $forcehilite && $forcehilite == $i++) {
                        
    $hilight true;
                } else {
                    if (
    $menuitem->id == $hilightid) {
                        
    $hilight true;    
                    }
                }
                
    $links[] = rtGetSubMenuLink$menuitem0$hilighttrue );
            }
            



            
    $menuclass 'toplevel';
            if (
    count$links )) {
        
                
    $topnav .= '<ul id="'$menuclass .'">';
                foreach (
    $links as $link) {
                    
    $topnav .= $link;
                }
                
    $topnav .= '</ul>';
                
            }
            return 
    $topnav;
        }
        
        function 
    getParentRow($rows$id) {
            if (isset(
    $rows[$id]) && $rows[$id]) {
                if(
    $rows[$id]->parent 0) {
                    return 
    $rows[$id]->parent;
                }    
            }
            return -
    1;
        }
        
        
    /**
        * Vertically Indented Menu
        */
        
    function rtShowSubMenu(  $menutype$pre=NULL$post=NULL  ) {
            global 
    $database$my$cur_template$Itemid;
            global 
    $mosConfig_absolute_path$mosConfig_live_site$mosConfig_shownoauth;
            
            
    $sidenav '';

            
    /* If a user has signed in, get their user type */
            
    $intUserType 0;
            if(
    $my->gid){
                switch (
    $my->usertype) {
                    case 
    'Super Administrator':
                    
    $intUserType 0;
                    break;
                    case 
    'Administrator':
                    
    $intUserType 1;
                    break;
                    case 
    'Editor':
                    
    $intUserType 2;
                    break;
                    case 
    'Registered':
                    
    $intUserType 3;
                    break;
                    case 
    'Author':
                    
    $intUserType 4;
                    break;
                    case 
    'Publisher':
                    
    $intUserType 5;
                    break;
                    case 
    'Manager':
                    
    $intUserType 6;
                    break;
                }
            } else {
                
    /* user isn't logged in so make their usertype 0 */
                
    $intUserType 0;
            }

            if (
    $mosConfig_shownoauth) {
                
    $sql "SELECT m.* FROM #__menu AS m"
                
    "\nWHERE menutype='"$menutype ."' AND published='1'"
                
    "\nAND parent > 0"
                
    "\nORDER BY parent,ordering";
            } else {
                
    $sql "SELECT m.* FROM #__menu AS m"
                
    "\nWHERE menutype='"$menutype ."' AND published='1' AND access <= '$my->gid'"
                
    "\nAND parent > 0"
                
    "\nORDER BY parent,ordering";
            }
            
    $database->setQuery$sql );
            
    $rows $database->loadObjectList'id' );
        

            
    // establish the hierarchy of the menu
            
    $children = array();
            
    // first pass - collect children
            

            
    foreach ($rows as $v ) {
                
    $pt $v->parent;
                
    $list = @$children[$pt] ? $children[$pt] : array();
                
    array_push$list$v );
                
    $children[$pt] = $list;
            }
                    
            

            
    // second pass - collect 'open' menus
            
    $open = array( $Itemid );
            
    $count 20// maximum levels - to prevent runaway loop
            
    $id $Itemid;
            while (--
    $count) {
                if (isset(
    $rows[$id]) && $rows[$id]->parent 0) {
                    
    $id $rows[$id]->parent;
                    
    $open[] = $id;
                } else {
                    break;
                }
            }
            
            if (isset(
    $children[$id]) && $children[$id]) {
                
    $sidenav rtRecurseSubMenu$id1$children$open);
            }
            return 
    $sidenav;

        }

        
    /**
        * Utility function to recursively work through a vertically indented
        * hierarchial menu
        */
        
    function rtRecurseSubMenu$id$level, &$children, &$open) {
            global 
    $Itemid$menuname;
            
            
    $output "";
            
    $sub_class "submenu";
            
            if (@
    $children[$id]) {
                
    //$n = min( $level, count( $indents )-1 );
                
    if ($level == ) {
                    
    $output .= "<div class=\"moduletable\"><h3>" $menuname " Menu</h3>\n";
                    
    $output .= "<ul class=\"" $sub_class "\">\n";
                } else {
                    
    $output .= "<ul>\n";
                }

                
                foreach (
    $children[$id] as $row) {
                    
    $output .= rtGetSubMenuLink$row$level );
                    if ( 
    in_array$row->id$open )) {
                        
    $output .= rtRecurseSubMenu$row->id$level+1$children$open );
                    }
                }
                
                
                
    $output .= "</ul>\n";

                if (
    $level == 1) {
                    
    $output .= "</div>\n";
                }
            }
            return 
    $output;
        }
        
        function 
    beginsWith$str$sub ) {
       return ( 
    substr$str0strlen$sub )-) == $sub );
        }

    }

    ?> 

Strona 1 z 2 12 OstatniOstatni

Reguły pisania

  • Nie możesz zakładać nowych tematów
  • Nie możesz dodawać wypowiedzi
  • Nie możesz dodawać załączników
  • Nie możesz poprawiać swoich postów
  •