Thread: PHP Addressing

Results 1 to 10 of 11

Hybrid View

  1. #1
    Join Date
    Nov 2009
    Location
    Aransas Pass, TX
    Posts
    101
    Plugin Contributions
    1

    Default Re: PHP Addressing

    Quote Originally Posted by DrByte View Post
    I understand *what* you're asking, but am wondering *why* you're asking it.

    Is there a particular reason why you're quoting an IP address?
    Is there a particular reason why you're using absolute URLs instead of relative URLs?
    My goal is to make it fully relocateable. Change the configure.php file and everything is relocated.

    Any help cleaninig up define_amazon_1_content would be greatly appeciated. I want to be able to work on my site locally rather than live. (I have killed my store several times. Not a good thing.)

    amazon_1_defines
    <?php
    define('BOX_HEADING_AMAZON_1', '');
    define('DEFINE_AMAZON_1_NAME', 'define_amazon_1_content');
    ?>

    amazon_1
    <?php
    $define_sidebox = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/', DEFINE_AMAZON_1_NAME, 'false');

    if (isset($ezpage_id) && in_array($ezpage_id,explode(",",'1'))) {

    require($template->get_template_dir('tpl_amazon.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_amazon.php');
    $title = BOX_HEADING_AMAZON_1;
    $title_link = false;
    require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
    }
    ?>

    tpl_amazon
    <?php
    $content = '';
    $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">';
    $content .= file_get_contents($define_sidebox);
    $content .= '</div>';
    ?>

    define_amazon_1_content
    <li style="margin-left:20px;"><a href="http://67.222.96.12/~technomo/index.php?main_page=page&id=1" target="_self"><b>Cameras & Accessories</b></a></li>
    <li style="margin-left:30px;"><a href="http://astore.amazon.com/techno_photography-20?_encoding=UTF8&node=32" target="iframe">Accessories</a></li>
    <li style="margin-left:30px;"><a href="http://astore.amazon.com/techno_photography-20?_encoding=UTF8&node=33" target="iframe">Binoculars, Telescopes & Optics</a></li>
    <li style="margin-left:30px;"><a href="http://astore.amazon.com/techno_photography-20?_encoding=UTF8&node=34" target="iframe">Camcorders</a></li>
    <li style="margin-left:30px;"><a href="http://astore.amazon.com/techno_photography-20?_encoding=UTF8&node=35" target="iframe">Cases & Bags</a></li>
    <li style="margin-left:30px;"><a href="http://astore.amazon.com/techno_photography-20?_encoding=UTF8&node=36" target="iframe">Digital Photo Frames</a></li>
    <li style="margin-left:30px;"><a href="http://astore.amazon.com/techno_photography-20?_encoding=UTF8&node=37" target="iframe">Digital SLRs</a></li>
    <li style="margin-left:30px;"><a href="http://astore.amazon.com/techno_photography-20?_encoding=UTF8&node=38" target="iframe">Lenses</a></li>
    <li style="margin-left:30px;"><a href="http://astore.amazon.com/techno_photography-20?_encoding=UTF8&node=39" target="iframe">Point-and-Shoot Digital Cameras</a></li>
    <li style="margin-left:30px;"><a href="http://astore.amazon.com/techno_photography-20?_encoding=UTF8&node=40" target="iframe">Surveillance Cameras</a></li>
    <li style="margin-left:20px;"><a href="http://67.222.96.12/~technomo/index.php?main_page=page&id=2" target="_self"><b>Computers</b></a></li>
    <li style="margin-left:20px;"><a href="http://67.222.96.12/~technomo/index.php?main_page=page&id=3" target="_self"><b>Electronics</b></a></li>
    <li style="margin-left:20px;"><a href="http://67.222.96.12/~technomo/index.php?main_page=page&id=4" target="_self"><b>Toys & Games</b></a></li>
    <li style="margin-left:20px;"><a href="http://67.222.96.12/~technomo/index.php?main_page=page&id=5" target="_self"><b>Wireless Accessories</b></a></li>

  2. #2
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: PHP Addressing

    Since you were asking in regard specifically to ez-pages links, I suggest using the approach suggested by clydejones.
    .

    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.

 

 

Similar Threads

  1. v154 canonical addressing for individual products
    By Pepperfire in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 16 Mar 2015, 04:18 PM
  2. Addressing the YOUR_TEMPLATE issue
    By mrcastle in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 4 Mar 2010, 09:21 PM
  3. Enable plus addressing for emails
    By mephy in forum General Questions
    Replies: 0
    Last Post: 10 Apr 2008, 11:50 PM

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