Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Dec 2007
    Posts
    85
    Plugin Contributions
    0

    Default Multiple (flash) headers with multiple languages

    Hi all,

    I've altered my header with flash content. To do so I created the map MyTemplate/common and copied an altered version of the tlp_header file in there. All works fine.

    Now, I have installed a second language pack (English & Dutch). Since my flash header contains navigation, I would like to use 2 types of headers --> English and Dutch, depending on the selected language by the user.

    I didn't manage to get it done myself... Hope one of you can inform me on how to go about with this issue.

    Thanks in advance!
    Jurjen
    Zen Cart v1.3.8

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Multiple (flash) headers with multiple languages

    How much do you need to change? Is it *only* the flash you want to change?
    (I gather the rest of your content already changes languages properly?)
    Can you post your tpl_header.php contents here?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Dec 2007
    Posts
    85
    Plugin Contributions
    0

    Default Re: Multiple (flash) headers with multiple languages

    Thanks for you reply.
    Yes, everything else changes properly, and I only want to change the flash header to another lanuage when the user chooses so.

    My tlp_header:

    <?php
    /**
    * Common Template - tpl_header.php
    *
    * this file can be copied to /templates/your_template_dir/pagename<br />
    * example: to override the privacy page<br />
    * make a directory /templates/my_template/privacy<br />
    * copy /templates/templates_defaults/common/tpl_footer.php to /templates/my_template/privacy/tpl_header.php<br />
    * to override the global settings and turn off the footer un-comment the following line:<br />
    * <br />
    * $flag_disable_header = true;<br />
    *
    * @package templateSystem
    * @copyright Copyright 2003-2006 Zen Cart Development Team
    * @copyright Portions Copyright 2003 osCommerce
    * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    * @version $Id: tpl_header.php 4813 2006-10-23 02:13:53Z drbyte $
    */
    ?>

    <?php
    // Display all header alerts via messageStack:
    if ($messageStack->size('header') > 0) {
    echo $messageStack->output('header');
    }
    if (isset($_GET['error_message']) && zen_not_null($_GET['error_message'])) {
    echo htmlspecialchars(urldecode($_GET['error_message']));
    }
    if (isset($_GET['info_message']) && zen_not_null($_GET['info_message'])) {
    echo htmlspecialchars($_GET['info_message']);
    } else {

    }
    ?>


    <!--bof-header logo and navigation display-->
    <?php
    if (!isset($flag_disable_header) || !$flag_disable_header) {
    ?>

    <div id="headerWrapper">
    <!--bof-navigation display-->
    <div id="navMainWrapper">
    <div id="navMain">
    <ul class="back">
    <li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a></li>
    <?php if ($_SESSION['customer_id']) { ?>
    <li><a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a></li>
    <li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a></li>
    <?php
    } else {
    if (STORE_STATUS == '0') {
    ?>
    <li><a href="<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGIN; ?></a></li>
    <?php } } ?>

    <?php if ($_SESSION['cart']->count_contents() != 0) { ?>
    <li><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a></li>
    <li><a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT; ?></a></li>
    <?php }?>
    </ul>
    </div>
    <div id="navMainSearch"><?php require(DIR_WS_MODULES . 'sideboxes/search_header.php'); ?></div>
    <br class="clearBoth" />
    </div>
    <!--eof-navigation display-->

    <!--bof-branding display-->
    <div id="logoWrapper">

    <script type="text/javascript" src="includes/templates/charroutemplate/jscript/swfobject.js"></script>
    <div id="flashcontent">
    This text is replaced by the Flash movie.
    </div>
    <script type="text/javascript">
    var so = new SWFObject("includes/templates/charroutemplate/images/flash/charrou.swf", "charrou", "950", "370", "3", "#000000");
    so.write("flashcontent");
    </script>
    </div>
    <br class="clearBoth" />
    <!--eof-branding display-->

    <!--eof-header logo and navigation display-->

    <!--bof-optional categories tabs navigation display-->
    <?php require($template->get_template_dir('tpl_modules_categories_tabs.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_categories_tabs.php'); ?>
    <!--eof-optional categories tabs navigation display-->

    <!--bof-header ezpage links-->
    <?php if (EZPAGES_STATUS_HEADER == '1' or (EZPAGES_STATUS_HEADER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) { ?>
    <?php require($template->get_template_dir('tpl_ezpages_bar_header.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_ezpages_bar_header.php'); ?>
    <?php } ?>
    <!--eof-header ezpage links-->
    </div>
    <?php } ?>


    Thanks,
    Jurjen

  4. #4
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Multiple (flash) headers with multiple languages

    Try replacing this:
    Code:
    new SWFObject("includes/templates/charroutemplate/images/flash/charrou.swf", "charrou",
    with this:
    Code:
    new SWFObject("<?php echo HEADER_SWF; ?>", "charrou",
    and then in your /includes/languages/english/charroutemplate/header.php file, add this:
    Code:
    define('HEADER_SWF', 'includes/templates/charroutemplate/images/flash/charrou_en.swf');
    and for /includes/languages/dutch/charroutemplate/header.php
    Code:
    define('HEADER_SWF', 'includes/templates/charroutemplate/images/flash/charrou_nl.swf');
    (This assumes you already have a header.php file in each of your charroutemplate language folders ... if you don't already have one, copy it from the /includes/languages/english/header.php and modify appropriately.)
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Dec 2007
    Posts
    85
    Plugin Contributions
    0

    Default Re: Multiple (flash) headers with multiple languages

    Awesome! works perfectly.

    You're the best, thanks a lot!

    Regards,
    Jurjen

  6. #6
    Join Date
    Dec 2007
    Posts
    85
    Plugin Contributions
    0

    Default Re: Multiple (flash) headers with multiple languages

    Hi,

    In IE the changing flash headers work perfectly, but I just found out that now my flash content is not loaded in Firefox... Any ideas?

    Thanks,
    Jurjen

  7. #7
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Multiple (flash) headers with multiple languages

    Quote Originally Posted by jurjenruben View Post
    I just found out that now my flash content is not loaded in Firefox... Any ideas?
    The HTML and JavaScript code you're using to load your flash objects may not be compatible with FireFox.
    You may have to tweak it or find another method of loading your flash scripts which is compatible with multiple browsers.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  8. #8
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: Multiple (flash) headers with multiple languages

    Quote Originally Posted by jurjenruben View Post
    Hi,

    In IE the changing flash headers work perfectly, but I just found out that now my flash content is not loaded in Firefox... Any ideas?

    Thanks,
    Jurjen
    I think you are calling flash incorrectly..below my own code that
    works when browsing using IE7, Firefox and Safari.
    Placed in /includes/templates/mytemplate/common/tpl_header.php
    Code:
    <!--bof-branding display-->
        <script type="text/javascript" src="includes/templates/mytemplate/js/swfobject.js"></script>
        <div id="flashcontent">
          <center>
          <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
            codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0"
            id="Movie3" width="760" height="194">
            <param name="movie" value="Movie3.swf">
            <param name="quality" value="high">
            <param name="bgcolor" value="#FFCCCC">
            <embed name="Movie3" src="Movie3.swf" quality="high" bgcolor="#FFCCCC"
              width="760" height="194"
              type="application/x-shockwave-flash"
              pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
            </embed>
          </object>
    </center>
        <script type="text/javascript">
           var so = new SWFObject("includes/templates/mytemplate/Movie3.swf", "YOUR_HEADER", "760", "194", "7", "#FFCCCC");
           so.write("flashcontent");
    </script>
    </div>
    <!--eof-branding display-->
    HTH

  9. #9
    Join Date
    Dec 2007
    Posts
    85
    Plugin Contributions
    0

    Default Re: Multiple (flash) headers with multiple languages

    Quote Originally Posted by misty View Post
    I think you are calling flash incorrectly..
    I think it works now

    Thanks a lot!!

  10. #10
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: Multiple (flash) headers with multiple languages

    If you post url of your zencart store
    or send me pm with details, will check in
    all 3 browsers for you, just to make sure..

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Getting a little help, multiple products with multiple attribute combinations
    By DaleRG in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 28 Feb 2009, 07:25 PM
  2. shipping rate - multiple zone - with multiple weight
    By sumri in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 27 Mar 2008, 04:49 PM
  3. Need to set up product with multiple units, multiple attributes
    By Lisa in Vermont in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 25 Jul 2007, 01:00 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR