Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17
  1. #11
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Retrieving complete URL from page ($_GET[?]?)

    Correct. Getting the active ez-page link to highlight was trivial, but the internal link pages are another matter.

  2. #12
    Join Date
    May 2006
    Posts
    725
    Plugin Contributions
    0

    Default Re: Retrieving complete URL from page ($_GET[?]?)

    Hello,

    Im actually doing the same thing but for my custom navigation. I managed to get the category link button to be highlighted by using $current_category_id =='1 (or any number of the category)'. The problem is that this also highlights the home link button. Im not sure why this is. I have $current_page_base =='index' for the home link button. Is this correct? Any help would be great.

    Thanks

  3. #13
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Retrieving complete URL from page ($_GET[?]?)

    The trouble with $current_page_base =='index' is that category and product listing pages also are 'index'. You need a more particular method. Actually, $this_is_home_page is effective for that.

    I would need to see what you have to offer more specific advice on other links.

  4. #14
    Join Date
    May 2006
    Posts
    725
    Plugin Contributions
    0

    Default Re: Retrieving complete URL from page ($_GET[?]?)

    Thanks a lot!!! That sorted it :)

  5. #15
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Retrieving complete URL from page ($_GET[?]?)

    I thought I had this mod complete, with internal links in the ez-pages menus highlighting correctly when active, but have discovered a situation that I can't explain.
    This is the function:
    PHP Code:
    //call as   active_page_class($var_linksList[$i]['id'],$var_linksList[$i]['altURL']);
    function active_page_class($ezpid,$alturl) {
      global 
    $this_is_home_page;
      
    $active '';
      if(
    $_GET['main_page'] == 'page') {
        
    $active = ($_GET['id'] == $ezpid)? ' class="activeEZPage"''';
      }elseif(
    $alturl) {
        
    $alturl str_replace(HTTP_SERVER DIR_WS_CATALOG,'/',$alturl);
        
    $active = ((strstr($_SERVER['REQUEST_URI'],$alturl) and !strstr('/index.php?main_page=index',$alturl)) or ($this_is_home_page and strstr('/index.php?main_page=index',$alturl)))?' class="activeILPage"''';
      }
      return 
    $active;

    I have discovered that the two demo category pages I have enabled for footer links do not highlight when active.
    Debug output gives this:
    uri:/fr-zc139gfresh/index.php?main_page=index&cPath=3_10
    alt:/index.php?main_page=index&cPath=3_10

    The
    $active = ((strstr($_SERVER['REQUEST_URI'],$alturl)
    should be finding the relative link ($alturl) in $_SERVER['REQUEST_URI']. It is clearly there when the strings are echoed, but echoing the strstr() as shown gives null. I am at a loss to understand why these two apparently identical string parts are not being found to match.

    I observe that these links contain an & while none of the correctly functioning ones do. Could this be related to the v1.3.9g HTML bug? (My local test site is currently v1.3.9g.) I have not edited anything in admin beyond the essentials.
    One of the links which I opened to set the footer display (possibly more than once) now shows in view source
    /index.php?main_page=index&amp;amp;cPath=21">Gift Certificates</a>
    while the other shows the correct
    /index.php?main_page=index&amp;cPath=3_10">Action DVDs</a>
    Neither of them highlights; of course, the defective one does not link correctly.

  6. #16
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Retrieving complete URL from page ($_GET[?]?)

    Got it.

    The strings are not identical because the ZC link has the ampersand coded as &amp; while the URI is just &. It doesn't show up when echoed to the page, but does when echoed to an HTML comment and looked at in view source.

  7. #17
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Retrieving complete URL from page ($_GET[?]?)

    Amended line:
    Code:
        $alturl = htmlspecialchars_decode(str_replace(HTTP_SERVER . DIR_WS_CATALOG,'/',$alturl));

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. use SSL to complete order from another, different URL, that is not?
    By Johnnycopilot in forum Built-in Shipping and Payment Modules
    Replies: 7
    Last Post: 20 Sep 2012, 10:02 PM
  2. where is the $_GET['referer'] from?
    By linjuming in forum General Questions
    Replies: 2
    Last Post: 27 Jun 2012, 09:25 PM
  3. Replies: 0
    Last Post: 12 Feb 2010, 07:10 PM
  4. retrieving old orders from admin folders
    By ShopShogun in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 11 Nov 2009, 07:06 PM
  5. Retrieving customers' passwords from DB
    By ckosloff in forum Managing Customers and Orders
    Replies: 4
    Last Post: 3 May 2008, 03:51 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