Forums / Templates, Stylesheets, Page Layout / Problems with 3 new pages not dhowing their page define text

Problems with 3 new pages not dhowing their page define text

Locked

Started by foghornleghorn on 12 Aug 2009, 2:08 AM · Views: 952

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
12 Aug 2009, 2:08 AM
#1
foghornleghorn avatar

foghornleghorn

New Zenner

Join Date:
Aug 2009
Posts:
2
Plugin Contributions:
0

Problems with 3 new pages not dhowing their page define text

New install of 1.38a with most recent security patch. Admin has been renamed to somthing different per normal protocol.

I have a link on the header named HELP and one on the footer named OUT STORY as well on a left-sidebox. Basically I wanted just a few paragraphs for each one to appear on-screen when their respective links are clicked. Another link SHIPPINGINFO in this situation looked to be the perfect template to base these new pages from.

I followed a tutorial from the FAQ area. I copied SHIPPINGINFO files to the appropriate override folders. Of course the filenames were changed as appropriate and the settings inside were changed to match the new page; FILENAMES_OUR_STORY... All of this was editted offline and FTP'd to the server afterwards.

An example using one of the pages:

/includes/extra_datafiles
our_story_filenames.php

/includes/languages/english/XYZ
our_story.php

/includes/languages/english/html_includes
define_our_story.php

/includes/languages/english/html_includes/XYZ
define_our_story.php

/includes/modules/pages/our_story
header_php.php

/includes/templates/XYZ/templates
tpl_our_story_default.php

I believe that's everything. I editted the files that contain the header/footer/sidebox and have it properly calling our_story, etc... And it does bring up a page with the proper bold title. But the text that would normally get displayed under it isn't there for any of these three.

Other notes, I originally couldn't edit the pages in the admin tool, until I added a blank copy of define_our_story.php at /includes/languages/english/html_includes. Not that it is important to me because I prefer to edit offline and ftp.

Also, I don't get any Define Pages listed under Admin/Config/Define Page either.

I've triple-checked all files for typos to no avail. On one of the pages I renamed the define page for it to be PAGE_4 and editted the link accordingly and of course it works.

So, what have I got wrong?

13 Aug 2009, 5:33 AM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Problems with 3 new pages not dhowing their page define text

Look at tpl_our_story_default.php ...

In page 3, you will see it has:

<?php if (DEFINE_PAGE_3_STATUS >= 1 and DEFINE_PAGE_3_STATUS <= 2) { ?>

Do you have something like:

<?php if (DEFINE_OUR_STORY_STATUS >= 1 and DEFINE_OUR_STORY_STATUS <= 2) { ?>

What and where do you have defined:
DEFINE_OUR_STORY_STATUS

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

13 Aug 2009, 5:41 AM
#3
foghornleghorn avatar

foghornleghorn

New Zenner

Join Date:
Aug 2009
Posts:
2
Plugin Contributions:
0

Re: Problems with 3 new pages not dhowing their page define text

Here's the file. Seems to have that line verbatim...

<?php
/**
 * Page Template
 *
 * @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_our_story_default.php 
 */
?>
<div class="centerColumn" id="our_story">
<h1 id="our_storyHeading"><?php echo HEADING_TITLE; ?></h1>

<?php if (DEFINE_OUR_STORY_STATUS >= 1 and DEFINE_OUR_STORY_STATUS <= 2) { ?>
<div id="our_storyMainContent" class="content">
<?php
/**
 * require the html_define
 */
  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>
13 Aug 2009, 1:49 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Problems with 3 new pages not dhowing their page define text

All of the define status for the pages are in the database configuration table where they can be turned on/off in the Admin ...

You are using:
DEFINE_OUR_STORY_STATUS

if it is not defined in either the database or in, for example, our_story_filenames.php ... then it evaluates as 0 or false and is turned off ...

Page 3, for example, is added to the configuration table with this SQL command:

insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('Define Page 3', 'DEFINE_PAGE_3_STATUS', '1', 'Enable the Defined Page 3 Link/Text?<br />0= Link ON, Define Text OFF<br />1= Link ON, Define Text ON<br />2= Link OFF, Define Text ON<br />3= Link OFF, Define Text OFF', '25', '83', now(), now(), NULL, 'zen_cfg_select_option(array('0', '1', '2', '3'),');

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!