Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15
  1. #11
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Creating a Jump Menu using the zen_draw_form function

    PHP Code:
    <?php for ($i=1$n=sizeof($var_linksList); $i<=$n$i++) {  ?>
    <option value="<?php echo $var_linksList[$i]['link'];?>"><?php echo $var_linksList[$i]['name'];?></option>
    <?php ?><?php // end FOR loop ?>
    I think their was a copy and paste error in my version of the code, an extra curly bracket.

    see what happens if you remove this:
    <?php } // end FOR loop ?>

  2. #12
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Creating a Jump Menu using the zen_draw_form function

    Quote Originally Posted by rbarbour View Post
    PHP Code:
    <?php for ($i=1$n=sizeof($var_linksList); $i<=$n$i++) {  ?>
    <option value="<?php echo $var_linksList[$i]['link'];?>"><?php echo $var_linksList[$i]['name'];?></option>
    <?php ?><?php // end FOR loop ?>
    I think their was a copy and paste error in my version of the code, an extra curly bracket.

    see what happens if you remove this:
    <?php } // end FOR loop ?>
    Yep.. that did the trick!! You rock!!

    Quote Originally Posted by gjh42 View Post
    PHP Code:
    if (!isset($var_links_list)) {
      include(
    DIR_WS_MODULES zen_get_module_directory('ezpages_bar_header.php'));

    This would fetch all ez-page links set for the header; you might actually want a customized version of ezpages_bar_header.php and even customized db fields and admin entry so you can set what appears in this particular menu.
    It's a little more than my brain can handle today trying to figure out how to create customized db fields and admin entry for this. It would be nice because this would allow me to set specific EZ Pages JUST for the jump menu.. May eventually spend some time trying to figure out how to apply a sort order to the various menu items..

    but that's a later issue/project..

    However, I did follow Glenn's advice and created a customized ezpages_bar_header.php for the jump menu (/includes/modules/MY_CUSTOM_TEMPLATE/ezpages_jump_menu_header.php).
    The difference is this code:
    Code:
    // test if bar should display:
    if (EZPAGES_STATUS_HEADER == '1' or (EZPAGES_STATUS_HEADER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) {
      if (isset($var_linksList)) {
        unset($var_linksList);
      }
    was modified as follows:
    Code:
    // test if bar should display:
    if (EZPAGES_STATUS_HEADER_JUMP_MENU == '1') {
      if (isset($var_linksList)) {
        unset($var_linksList);
      }
    I added an additional EZ Pages configuration item, and now this will allow me to separate the EZ Pages jump menu display from the EZ Pages Header Menu..

    All in all so far this is working as I would like.. Thanks to you both..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  3. #13
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Creating a Jump Menu using the zen_draw_form function

    Quote Originally Posted by DivaVocals View Post
    Yep.. that did the trick!! You rock!!
    Glad it worked!

    Quote Originally Posted by DivaVocals View Post
    It's a little more than my brain can handle today trying to figure out how to create customized db fields and admin entry for this. It would be nice because this would allow me to set specific EZ Pages JUST for the jump menu.. May eventually spend some time trying to figure out how to apply a sort order to the various menu items..

    but that's a later issue/project..
    I am just curious as to why you didn't just add those links as ez-pages with internal links?

    Quote Originally Posted by DivaVocals View Post
    However, I did follow Glenn's advice and created a customized ezpages_bar_header.php for the jump menu (/includes/modules/MY_CUSTOM_TEMPLATE/ezpages_jump_menu_header.php).
    The difference is this code:
    Code:
    // test if bar should display:
    if (EZPAGES_STATUS_HEADER == '1' or (EZPAGES_STATUS_HEADER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) {
      if (isset($var_linksList)) {
        unset($var_linksList);
      }
    was modified as follows:
    Code:
    // test if bar should display:
    if (EZPAGES_STATUS_HEADER_JUMP_MENU == '1') {
      if (isset($var_linksList)) {
        unset($var_linksList);
      }
    I added an additional EZ Pages configuration item, and now this will allow me to separate the EZ Pages jump menu display from the EZ Pages Header Menu..

    All in all so far this is working as I would like.. Thanks to you both..

  4. #14
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Creating a Jump Menu using the zen_draw_form function

    Quote Originally Posted by rbarbour View Post
    PHP Code:
    <?php for ($i=1$n=sizeof($var_linksList); $i<=$n$i++) {  ?>
    <option value="<?php echo $var_linksList[$i]['link'];?>"><?php echo $var_linksList[$i]['name'];?></option>
    <?php ?><?php // end FOR loop ?>
    I think their was a copy and paste error in my version of the code, an extra curly bracket.

    see what happens if you remove this:
    <?php } // end FOR loop ?>
    Quote Originally Posted by gjh42 View Post
    PHP Code:
    if (!isset($var_links_list)) {
      include(
    DIR_WS_MODULES zen_get_module_directory('ezpages_bar_header.php'));

    This would fetch all ez-page links set for the header; you might actually want a customized version of ezpages_bar_header.php and even customized db fields and admin entry so you can set what appears in this particular menu.
    Quote Originally Posted by rbarbour View Post
    Glad it worked!



    I am just curious as to why you didn't just add those links as ez-pages with internal links?
    Because I can take advantage of existing code that uses Admin config settings to turn these links on or off.. If the Contact us defined page is turned off, I certainly wouldn't want it displayed in a menu.

    Plus there's another reason.. This way my client doesn't have to know how to create internal EZ Page links.. (this has ALWAYS been problematic.. invariably I have to explain to a client AGAIN how to create EZ Pages using internal links..) PLUS this way the admin settings are in synch with the menu..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  5. #15
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Creating a Jump Menu using the zen_draw_form function

    Quote Originally Posted by DivaVocals View Post
    Because I can take advantage of existing code that uses Admin config settings to turn these links on or off.. If the Contact us defined page is turned off, I certainly wouldn't want it displayed in a menu.

    Plus there's another reason.. This way my client doesn't have to know how to create internal EZ Page links.. (this has ALWAYS been problematic.. invariably I have to explain to a client AGAIN how to create EZ Pages using internal links..) PLUS this way the admin settings are in synch with the menu..
    Gotcha.

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. v151 [NOT A BUG] SSL in function zen_draw_form wrong code
    By truonghoang in forum Bug Reports
    Replies: 6
    Last Post: 15 Apr 2014, 10:26 PM
  2. Creating a jump menu for outside links
    By delia in forum General Questions
    Replies: 9
    Last Post: 27 Apr 2010, 01:30 PM
  3. Where does zen_draw_form function definition reside?
    By MaxPowers in forum General Questions
    Replies: 1
    Last Post: 23 May 2007, 12:34 AM
  4. How to done this jump to page function
    By JohnsonY in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 17 May 2007, 05:41 AM
  5. Creating a drop down menu for the diff type of CC's using zen basic mod.
    By estrange in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 17 Jan 2007, 04:40 AM

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