WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.

Donate with PayPal buttonSpenden mit dem PayPal-Button

  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Need some help with the show_menu function call for multilingual site
  • Print
Pages: [1]   Go Down

Author Topic: Need some help with the show_menu function call for multilingual site  (Read 3681 times)

Fredflintstone

  • Guest
Need some help with the show_menu function call for multilingual site
« on: March 07, 2009, 10:13:01 AM »
Hi,

Im making a multilingual site and i got the menus sorted out without any problem.
However, i want to show the extra menu with flags to select another language from every page.
I know you have to add ann additional menu in the index.php of your template but if i copy the given code (from the multi lingual tutorial) i get the code instead of the menu in my site.

Can anyone help me?

This is the code as in the multi lingual tutorial;
Code: [Select]
show_menu(1, 0, 1, true, "[a]<img src=" .WB_URL .
  "/media/flags/[menu_title].gif />[/a]", '', '', '', false, '', 0);

And this is the code of my index.php of my template;
Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title><?php page_title(); ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php if(defined(&#39;DEFAULT_CHARSET&#39;)) { echo DEFAULT_CHARSET; } else { echo &#39;utf-8&#39;; }?>" />    
<meta name="description" content="<?php page_description(); ?>" />
<meta name="keywords" content="<?php page_keywords(); ?>" />
<meta name="generator" content="Microsoft FrontPage 6.0">
<link href="<?php echo TEMPLATE_DIR; ?>/style.css" rel="stylesheet" type="text/css" media="screen" />
<?php if(function_exists(&#39;register_frontend_modfiles&#39;)) { register_frontend_modfiles(&#39;css&#39;); } ?>
</head>

<body>
<div id="container">
    <div id="kopf">
    </div>
    <div id="navi">
        <h2><?php echo $TEXT[&#39;MENU&#39;]; ?></h2>
        <?php if(SHOW_MENU) { /* Only shown menu if we need to */ ?>
            <?php show_menu(1, 1); ?>
        <?php } ?>
        <h2>Portfolio</h2>
             <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
          codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0"
          ID=Showcase_3 WIDTH=175 HEIGHT=170>
          <PARAM NAME=movie VALUE="/wb/Showcase_3.swf">
          <PARAM NAME=quality VALUE=high>
          <PARAM NAME=loop VALUE=true>
          <EMBED src="/wb/Showcase_3.swf" loop=true quality=high
           WIDTH=175 HEIGHT=170 TYPE="application/x-shockwave-flash"
           PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
          </EMBED>
  </OBJECT>


        <?php if(SHOW_SEARCH) { /* Only show search box if search is enabled */ ?>
            <h2><?php echo $TEXT[&#39;SEARCH&#39;]; ?></h2>
            <form name="search" action="<?php echo WB_URL; ?>/search/index<?php echo PAGE_EXTENSION; ?>" method="post">
            <input type="text" name="string" /><br /><br />
            <input type="submit" name="submit" value="<?php echo $TEXT[&#39;SEARCHING&#39;]; ?>" />
            </form>
        <?php } ?>
        <br />
        <?php if(FRONTEND_LOGIN AND !$wb->is_authenticated()) { ?>
            <h2><?php echo $TEXT[&#39;LOGIN&#39;]; ?></h2>
            <form name="login" action="<?php echo LOGIN_URL; ?>" method="post">
            <?php echo $TEXT[&#39;USERNAME&#39;]; ?>:
            <input type="text" name="username" />
            <?php echo $TEXT[&#39;PASSWORD&#39;]; ?>:
            <input type="password" name="password" /><br /><br />
            <input type="submit" name="submit" value="<?php echo $TEXT[&#39;LOGIN&#39;]; ?>" /><br />
            <a href="<?php echo FORGOT_URL; ?>"><?php echo $TEXT[&#39;FORGOT_DETAILS&#39;]; ?></a>
            <?php if(is_numeric(FRONTEND_SIGNUP)) { ?>
                <a href="<?php echo SIGNUP_URL; ?>"><?php echo $TEXT[&#39;SIGNUP&#39;]; ?></a>
            <?php } ?>
            </form>
        <?php } elseif(FRONTEND_LOGIN AND $wb->is_authenticated()) { ?>
            <h2><?php echo $TEXT[&#39;LOGGED_IN&#39;]; ?></h2>
            <form name="logout" action="<?php echo LOGOUT_URL; ?>" method="post">
            <?php echo $TEXT[&#39;WELCOME_BACK&#39;]; ?>,<br /> <a href="<?php echo PREFERENCES_URL; ?>">
            <?php echo $wb->get_display_name(); ?></a><br /><br />
            <input type="submit" name="submit" value="<?php echo $MENU[&#39;LOGOUT&#39;]; ?>" />
            </form>
        <?php } ?>
    </div>
    <hr />
    <div id="inhalt">
        <h3><?php page_title(&#39;&#39;,&#39;[PAGE_TITLE]&#39;); ?></h3>
        <div class="storycontent">
            <br/><?php page_content(); ?>
        </div>
    </div>        
    <div id="footer">
        <p>Powered by&nbsp;<a href="http://www.WebsiteBaker.org/" target="_blank">WebsiteBaker</a>&nbsp;-&nbsp;&copy;&nbsp;<?php page_title(&#39;&#39;,&#39;[WEBSITE_TITLE]&#39;); ?></p>
    </div>
</div>
</html>

Can anyone insert the right code into the right place for me ?

Thank you

Edwin
Logged

Offline naturalp

  • Posts: 31
Re: Need some help with the show_menu function call for multilingual site
« Reply #1 on: March 10, 2009, 06:36:53 PM »
Did you get a reply from anyone re this as I think I will be going down the same route soon and would love to know..?
Logged

Offline BerndJM

  • Posts: 1764
  • Gender: Male
Re: Need some help with the show_menu function call for multilingual site
« Reply #2 on: March 10, 2009, 07:39:22 PM »
Hi,

think the code-example in the tutorial is a little buggy.
Give this a try:
Code: [Select]
show_menu(1, 0, 1, true, '[a]<img src="' .WB_URL .'/media/flags/[menu_title].gif" />[/a]', '', '', '', false, '', 0);Be aware of the ' and "

Regards Bernd
Logged
In theory, there is no difference between theory and practice. But, in practice, there is.

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Need some help with the show_menu function call for multilingual site
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2