Page 1 of 5 123 ... LastLast
Results 1 to 10 of 42
  1. #1
    Join Date
    Aug 2006
    Location
    Wales
    Posts
    87
    Plugin Contributions
    0

    Default Making Page_5 work

    Hi,
    I've added posts to several different threads on this issue, but I haven't had a reply as yet, so I thought I'd start a new thread & see if it helped.
    I want to add a few new pages in the More_information sidebox, so I cloned Page_2 in every place I could find it using Developers Tool Box & 2 that I didn't.
    I originally copied Kobra's post from about 2005, but I've added to it.
    I will past it below, with all the changes I've made listed with the places where they were put.

    Creating new pages in Zen Cart, AD 2005

    For illustration use the page_2 as a guide
    Try starting over and in these areas edit or create what is required changing only the reference to page_2 to

    page_5...get it to work in that default generic form before you begin changing things like "Zimbabwe Orphans Endeavor'"
    Just the straight page_5 references to start.

    Create/clone these as page_5

    /admin/includes/languages/english.php ( one line: define('BOX_TOOLS_DEFINE_PAGE_5','Page 5'); )

    /admin/includes/languages/english/define_page_editor.php ( one line: define('TEXT_INFO_PAGE_5', 'Page 5'); )

    /includes/modules/pages/page_2/header_php.php ( cloned folder, changed folder name & edited

    heager_php.php as follows: <?php
    /**
    * Page 5
    *
    * @package page
    * @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: header_php.php 3230 2006-03-20 23:21:29Z drbyte $
    */
    require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php'));
    $breadcrumb->add(NAVBAR_TITLE);

    // include template specific file name defines
    $define_page = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/',

    FILENAME_DEFINE_PAGE_5, 'false');
    ?>

    /includes/languages/english/page_2.php (cloned & edited as follows:
    <?php
    //
    // +----------------------------------------------------------------------+
    // |zen-cart Open Source E-commerce |
    // +----------------------------------------------------------------------+
    // | Copyright (c) 2003 The zen-cart developers |
    // | |
    // | http://www.zen-cart.com/index.php |
    // | |
    // | Portions Copyright (c) 2003 osCommerce |
    // +----------------------------------------------------------------------+
    // | This source file is subject to version 2.0 of the GPL license, |
    // | that is bundled with this package in the file LICENSE, and is |
    // | available through the world-wide-web at the following url: |
    // | http://www.zen-cart.com/license/2_0.txt. |
    // | If you did not receive a copy of the zen-cart license and are unable |
    // | to obtain it through the world-wide-web, please send a note to |
    // | [email protected] so we can mail you a copy immediately. |
    // +----------------------------------------------------------------------+
    // $Id: page_5.php 1969 2005-09-13 06:57:21Z drbyte $
    //

    define('NAVBAR_TITLE', 'Directories');
    define('HEADING_TITLE', 'Search Engine Directories');

    define('TEXT_INFORMATION', 'A list of directories that you might find helpful');
    ?>

    /includes/templates/template_default/templates/tpl_page_2_default.php ( cloned & edited as follows:
    <?php
    /**
    * tpl_page_5_default.php
    *
    * @package templateSystem
    * @copyright Copyright 2003-2005 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_page_5_default.php 3464 2006-04-19 00:07:26Z ajeh $
    */
    ?>
    <div class="centerColumn" id="pageFive">
    <h1 id="pageFiveHeading"><?php echo HEADING_TITLE; ?></h1>

    <?php if (DEFINE_PAGE_5_STATUS >= 1 and DEFINE_PAGE_5_STATUS <= 2) { ?>
    <div id="pageFiveMainContent" class="content">
    <?php
    /**
    * require the html_define for the page_5 page
    */
    require($define_page);
    ?>
    </div>
    <?php } ?>
    <div class="buttonRow back"><?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_BACK, BUTTON_BACK_ALT) . '</a>';

    ?></div>
    </div>

    Add/edit these to include page_5
    /includes/modules/sideboxes/more_information.php ( entry for Page_2 cloned & edited to read:
    if (DEFINE_PAGE_5_STATUS <= 1) {
    $more_information[] = '<a href="' . zen_href_link(FILENAME_PAGE_5) . '">' . BOX_INFORMATION_PAGE_5 . '</a>';
    }

    /includes/languages/english.php ( this added: define('BOX_INFORMATION_PAGE_5', 'Directories'); )

    /includes/filenames.php ( 2 statements added, first: define('FILENAME_DEFINE_PAGE_5',

    'define_page_5'); then: define('FILENAME_PAGE_5', 'page_5'); )

    /includes/templates/template_default/templates/tpl_site_map_default.php ( statement added:
    <?php if (DEFINE_PAGE_5_STATUS <= 1) { ?>
    <li><?php echo '<a href="' . zen_href_link(FILENAME_PAGE_5) . '">' . BOX_INFORMATION_PAGE_5 . '</a>'; ?

    ></li>
    <?php } ?> )


    Create define_page_5.php in both of these folders

    /includes/languages/english/html_includes ( added a define_page_5.php file )

    /includes/languages/english/html_includes/your_template ( added a define_page_5.php file )

    This should net you a generic page_5 in the "More Information" sidebox
    You can then begin using this in your overrides areas

    Once this works you can move on to custom titles etc - one at a time so you can track back if it breaks

    As you can see, it still has the text that Kobra had inserted for instructions on how to clone a Page_2.

    I am using V1.3.02 at the moment.

    The page appears everywhere, except in Config Define Page Status.

    I did do a search on my database to see if there was Page_5 info in there: what I actually did was click search then in the box I put Page_5, selected exact phrase then clicked go - nothing
    I did the same for Page 5 & page 5, PAGE 5 & PAGE_5.
    No results for any of those searches, but I don't really know if I was searching correctly.
    If there is nothing in the database, why not?
    I cloned & added text in every place I could find & would have thought that Zen Cart would have inserted the proper instructions in the database.
    Can anyone help please?

    Thanks in advance

    ######
    http://www.artyfactsforcrafts.com
    Last edited by gayelston; 11 Jan 2008 at 02:28 PM.

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

    Default Re: Making Page_5 work

    Download the about us module and follow the directions making note of each addition and edit then when you get this working you can apply the steps to any other page you want
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Aug 2006
    Location
    Wales
    Posts
    87
    Plugin Contributions
    0

    Default Re: Making Page_5 work

    Quote Originally Posted by kobra View Post
    Download the about us module and follow the directions making note of each addition and edit then when you get this working you can apply the steps to any other page you want
    I did download it, read through it & couldn't understand it.
    When I read your post dated 2005 that included a step by step to cloning Page 2 I understood every word & decided to do it that way.
    I was reminded by a friend that they had done the same for me when we first made a Zen Cart site, but that was a long time ago & I can't remember where his instructions were put because we have a new site now.
    I have just posted a full explanation of everything I have done & was hoping that would help someone guide me.
    I have everything working, except the text appearing in the opened window (though the title does) & the page appearing in Config Define Page Status.
    Now I have it all written down, step by step,: I find this way long-winded but very followable so if we can just get this last bit sorted I will stick with it for the very few pages I need to add.
    For my FAQ pages I think I'll go with EZpages, if I can learn how to add images - but that is the topic for another post -
    Can you help me sort out this last bit please Kobra?
    If it involves doing anything with the db I would need either step by step basic instructions, or pointing in the direction of where to find them
    Thanks very much & sorry to be a pain.
    I thought it ok to start a new thread with this topic becauase I have read loads of post from different people with the same problem.
    Thanks again & regards
    ######
    http://www.artyfactsforcrafts.com

  4. #4
    Join Date
    Aug 2006
    Location
    Wales
    Posts
    87
    Plugin Contributions
    0

    Default Re: Making Page_5 work

    Quote Originally Posted by kobra View Post
    Download the about us module and follow the directions making note of each addition and edit then when you get this working you can apply the steps to any other page you want
    Ok, I've read the "About_Us" readme again & it was this bit that threw me before:
    Add the link to the About_us page into your sideboxes or other locations as desired.
    The URL for it is either:
    - zen_href_link(FILENAME_ABOUT_US)
    or
    - http://www.mysite.com/index.php?main_page=about_us
    But now I look again it seems straightforward.
    I might have a go, but I have 2 pages all ready to go if I can just do that last little bit, so the effort of doing 2 more this way & deleting the other 2 seems a bit wasted.
    Of course, if no-one can help me sort it, then that's the way it will have to be I guess.
    Thanks
    ######
    http://www.artyfactsforcrafts.com

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

    Default Re: Making Page_5 work

    A quick check yeilds the following and I did not step through this to insure that this is complete:

    /admin/includes/languages/english.php ( one line: define('BOX_TOOLS_DEFINE_PAGE_5','Page 5'

    /admin/includes/languages/english/define_page_editor.php ( one line: define('TEXT_INFO_PAGE_5', 'Page 5')

    /includes/modules/pages/page_2/header_php.php ( cloned folder, changed folder name & edited

    /includes/filenames.php 2 places - define('FILENAME_DEFINE_PAGE_2', 'define_page_2'); & define('FILENAME_PAGE_2', 'page_2');

    /includes/languages/english.php - define('BOX_INFORMATION_PAGE_2', 'Page 2');

    /modules/sideboxes/more_information.php - 2 places
    if (DEFINE_PAGE_2_STATUS <= 1) {
    $more_information[] = '<a href="' . zen_href_link(FILENAME_PAGE_2) . '">' . BOX_INFORMATION_PAGE_2 . '</a>';

    /templates/template_default/templates/tpl_page_2_default.php

    /templates/template_default/templates/tpl_site_map_default.php
    <?php if (DEFINE_PAGE_2_STATUS <= '1') { ?>
    <li><?php echo '<a href="' . zen_href_link(FILENAME_PAGE_2) . '">' . BOX_INFORMATION_PAGE_2 . '</a>'; ?></li>
    make the ones in template_default there and in your template override folder
    Zen-Venom Get Bitten

  6. #6
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: Making Page_5 work

    WOW! Creating a new Define Page seems about as bad as installing a Mod in osCommerce.

    Will have to take a look at the About Us mod because there must be an easier way to create a new, stand-alone page - hopefully.

  7. #7
    Join Date
    Aug 2006
    Location
    Wales
    Posts
    87
    Plugin Contributions
    0

    Default Re: Making Page_5 work

    [QUOTE=kobra;488179]A quick check yeilds the following and I did not step through this to insure that this is complete:


    make the ones in template_default there and in your template override folder[/QUOTE

    In /includes/templates/template_default/templates/tpl_page_2_default.php
    I cloned the above, changed the title to read tpl_page_5_default.php & edited as follows:

    <?php
    /**
    * tpl_page_5_default.php
    *
    * @package templateSystem
    * @copyright Copyright 2003-2005 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_page_5_default.php 3464 2006-04-19 00:07:26Z ajeh $
    */
    ?>
    <div class="centerColumn" id="pageFive">
    <h1 id="pageFiveHeading"><?php echo HEADING_TITLE; ?></h1>

    <?php if (DEFINE_PAGE_5_STATUS >= 1 and DEFINE_PAGE_5_STATUS <= 2) { ?>
    <div id="pageFiveMainContent" class="content">
    <?php
    /**
    * require the html_define for the page_5 page
    */
    require($define_page);
    ?>
    </div>
    <?php } ?>
    <div class="buttonRow back"><?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_BACK, BUTTON_BACK_ALT) . '</a>'; ?></div>
    </div>

    I haven't really got an overides folder because I'm using an virtually bog standard install, but a few bits inside some files was changed so I have an original folder & the current folder.
    In that I did this:

    /includes/languages/english/html_includes/your_template ( added a define_page_5.php file ) which was a cloned define_page_2.php that had been edited.

    I have now changed all edited text back to read Page 5, instead of Directories as was the case on one or two of the pages, as when I changed Page 2 to read "Links"

    Is that what you meant?
    If not, could you be a bit more specific because I am bery easily confused :
    Regards
    ######
    http://www.artyfactsforcrafts.com

  8. #8
    Join Date
    Aug 2006
    Location
    Wales
    Posts
    87
    Plugin Contributions
    0

    Default Re: Making Page_5 work

    Is the /includes/templates/template_default/templates/tpl_page_2_default.php page the one that put Page 2 in the db?
    ######
    http://www.artyfactsforcrafts.com

  9. #9
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: Making Page_5 work

    Define Pages are not inserted into the database.
    That is why editting all the various files is required.

    Basically, you are creating page 5 wherever you see a file for Page 2, 3 or 4 within the various directories.

  10. #10
    Join Date
    Aug 2006
    Location
    Wales
    Posts
    87
    Plugin Contributions
    0

    Default Re: Making Page_5 work

    Quote Originally Posted by Website Rob View Post
    Define Pages are not inserted into the database.
    That is why editting all the various files is required.

    Basically, you are creating page 5 wherever you see a file for Page 2, 3 or 4 within the various directories.
    That's what I did, by cloning a Page 2in ALL the various places
    The new page shows everywhere EXCEPT the Config Define Page Status.
    When I select the page from the sidebox, I can see the title on the main page, but none of the text that I entered using the Tools Define Page Editor.
    I even have it on the sitemap.
    Just need to know how to make the last bit work.
    Regards
    ######
    http://www.artyfactsforcrafts.com

 

 
Page 1 of 5 123 ... LastLast

Similar Threads

  1. Making header/logo work in percent
    By Lady Loza in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 16 Oct 2011, 11:06 PM
  2. Help Making Cart Work
    By brcampers in forum Basic Configuration
    Replies: 3
    Last Post: 22 Jan 2011, 08:08 PM
  3. Making module manager work
    By fairway in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 26 Feb 2009, 03:36 AM
  4. Adding page, making it work.
    By trudesign in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 15 Apr 2008, 08:24 PM
  5. Making custom folders work - how?
    By vivaraquel in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 15 Nov 2006, 05:46 AM

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