Results 1 to 5 of 5
  1. #1

    Calling Other Directories through PHP

    Hi all,

    I'm doing a new layout/template for my website. The header has the logo called through some php function (I don't know php to save my life) from the images directory in the respective template directory. How can I do this for other images. I tried to play around with the function but got errors, so is there a function that does this or a way to call it.

    Thanks in advance,

    Pete

    Kebeid.com

  2. #2

    Default Re: Calling Other Directories through PHP

    I just wanna do it this way because it'll keep all the images in one place rather than have the images in each overrided folder.

    I've never found someone asking about this before so maybe it isn't possible to call a file in a different directory through php.

    (sorry I'm postin again - didn't find "edit" button")

    Pete

  3. #3
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Calling Other Directories through PHP

    What you want is possible but unless it is "very important" that you do this I would suggest that you do not. As you will have to touch many files where these calls are made to relocate all images to a common dir. You might find success in locating your new image directory and changing this in the below code "$current_page_base,'images'). '/' " pointing to your new dir. Or you might need to also change the a href="' pointer to your literal address for your images. Again these occur in a multitude of files as there are button images, logo images, header images banner images etc etc.

    I guess I do not see the need to go to all this work when the files and the program are happy where they are.

    From tpl_header.php line #71
    Code:
    <div id="logo"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?></div>
    I just wanna do it this way because it'll keep all the images in one place rather than have the images in each overrided folder.
    Just one last time, do you realize the implication of changing all of these core files and what will happen when a patch or upgrade is required? And you not only must do the catalog files but there are the Admin files as well...

    Much Much Much easier to learn the eloquent override system than what you are about to embark upon. IMO
    Zen-Venom Get Bitten

  4. #4

    Default Re: Calling Other Directories through PHP

    I'm only using this for my template files ... so that I don't have to have the images in the overridden directories and done with the <img> tag (which doesn't work). But the zen_image thing worked after changing parts of it to be my image file.

    Thanks Kobra!

    Pete

  5. #5

    Default Re: Calling Other Directories through PHP

    Oh you know what... I didn't realize that you should just put the path to the images folder of the template (includes/templates/yourtemplate/yourimages) I was thinking too hard about it. The <img> tag suffices and works with that path.

    Pete

 

 

Similar Threads

  1. Can I modify Developers Toolkit to search files in other directories outside just ZC?
    By enzo-ita in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 7 May 2014, 08:52 PM
  2. Calling function from meta_tags.php
    By vatertime in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 8 Sep 2010, 06:24 PM
  3. Calling the results of other classes in another class file.
    By retched in forum General Questions
    Replies: 2
    Last Post: 6 Aug 2010, 08:26 PM
  4. All other directories
    By mimran in forum Installing on a Linux/Unix Server
    Replies: 4
    Last Post: 5 May 2008, 04:41 PM
  5. on_loaded javascript not calling other funtions
    By GraphicHabit in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 2 May 2007, 08:46 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