Forums / General Questions / Define Pages / EZ Pages

Define Pages / EZ Pages

Locked
Results 1 to 20 of 93
This thread is locked. New replies are disabled.
08 May 2007, 10:30
#1
mulleycat avatar

mulleycat

New Zenner

Join Date:
May 2007
Posts:
4
Plugin Contributions:
0

Define Pages / EZ Pages

How do you add new define pages? I need another one and I'm not sure how to add one. For me, they're simple to manage and are not lost during upgrades using the override system.

If a new define page will work, ignore the EZPage questions. I'll learn more about them later.

I tried using EZPages and it was simple, but I have a lot of questions about them. 1. Where is code stored? 2. Will it be preserved during upgrades? 3. Where do I store images for EZPages? 4. What path do I used to reference the image in an EZPage.

Or should I just order the e-Start your Web Site Book and stop worrying you guys. Will it have all the answers.

Thanks,

-Mulleycat
08 May 2007, 12:45
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Posts:
31,500
Plugin Contributions:
4

Re: Define Pages / EZ Pages

There are about 4 places that you have to add the fact that there exists another page and then the additional files you have to create for html_includes.

Pick one and use the search tools in the admin > tools > developers tools > and this will locate the files that the text is in - - like for privacy
10 May 2007, 10:36
#3
mulleycat avatar

mulleycat

New Zenner

Join Date:
May 2007
Posts:
4
Plugin Contributions:
0

Re: Define Pages / EZ Pages

Thanks kobra for the information,

I had already attempted this without success. I apparently missed FTPing one of the files. I tried again and when I clicked on the link in the <More Information> side box, I got a <Page Not Found> message. I then modified/added every reference to each file (override or not) and now I get a blank page and all the side boxes on the right and all my links and banners at the bottom of the page disappear. I have made many attempts to get this to work. I just can't see what I'm doing wrong. I've been programming for 20 years and know what just 1 bit can do sometimes. I tried to duplicate how page_2 was implemented, I just named it page_5. The new html_includes file does show up in the Define Page Editor in Admin.

Any suggestion would be greatly appreciated.

Below is a list of what I have done so far. I know I went over board modifying even the files I'm overriding. But I'm desperate to get this to work. That's why I bugging you again.

Added new define:
/var/www/html/docs2/includes/languages/english.php
Line #167 : define('BOX_TOOLS_DEFINE_PAGE_5','Page 5');

Added new define:
/var/www/html/docs2/includes/languages/english/define_pages_editor.php
Line #38 : define('TEXT_INFO_PAGE_5', 'Page 5');

Added 2 new defines:
/var/www/html/includes/filenames.php
Line #64 : define('FILENAME_DEFINE_PAGE_5', 'define_page_5');
Line #109 : define('FILENAME_PAGE_5', 'page_5');

Added new define:
/var/www/html/includes/languages/english.php
Line #151 : define('BOX_INFORMATION_PAGE_5', 'Page 5');

Created new file:
/var/www/html/includes/languages/english/mulleycat/page_5.php
Line #19 : // $Id: page_5.php 1969 2005-09-13 06:57:21Z drbyte $

Created new file:
/var/www/html/includes/languages/english/page_5.php
Line #19 : // $Id: page_5.php 1969 2005-09-13 06:57:21Z drbyte $

Added new define:
/var/www/html/includes/languages/mulleycat/english.php
Line #151 : define('BOX_INFORMATION_PAGE_5', 'Zimbabwe Orphans Endeavor');

Created new folder and file:
/var/www/html/includes/modules/pages/page_5/header_php.php
Line #15 : $define_page = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/', FILENAME_DEFINE_PAGE_5, 'false');

Added new line of code
/var/www/html/includes/modules/sideboxes/more_information.php
Line #29 : $more_information[] = '<a href="' . zen_href_link(FILENAME_PAGE_5) . '">' . BOX_INFORMATION_PAGE_5 . '</a>';

Added 2 new defines:
/var/www/html/includes/mulleycat/filenames.php
Line #64 : define('FILENAME_DEFINE_PAGE_5', 'define_page_5');
Line #109 : define('FILENAME_PAGE_5', 'page_5');

Created new file:
/var/www/html/includes/languages/english/html_includes/define_page_5.php
Line #4 : <li>Information and links to (ZOE) Zimbabwe Orphans Endeavor.</li>

Created new file:
/var/www/html/includes/languages/english/html_includes/mulleycat/define_page_5.php
Line #4 : <li>Information and links to (ZOE) Zimbabwe Orphans Endeavor.</li>

Created new file:
/var/www/html/includes/languages/english/mulleycat/page_5.php
Line #22 : define('NAVBAR_TITLE', 'Zimbabwe Orphans Endeavor');
Line #23 : define('HEADING_TITLE', 'Zimbabwe Orphans Endeavor');
Line #25 : define('TEXT_INFORMATION', 'Links and information about (ZOE) Zimbabwe Orphans Endeavor');

Created new file:
/var/www/html/includes/languages/english/page_5.php
Line #22 : define('NAVBAR_TITLE', 'Zimbabwe Orphans Endeavor');
Line #23 : define('HEADING_TITLE', 'Zimbabwe Orphans Endeavor');
Line #25 : define('TEXT_INFORMATION', 'Links and information about (ZOE) Zimbabwe Orphans Endeavor');
10 May 2007, 22:40
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Posts:
31,500
Plugin Contributions:
4

Re: Define Pages / EZ Pages

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
/includes/modules/pages/page_2/header_php.php
/includes/languages/english/page_2.php
/includes/templates/template_default/templates/tpl_page_2_default.php

Add/edit these to include page_5
/includes/modules/sideboxes/more_information.php
/includes/languages/english.php
/includes/filenames.php

Create define_page_5.php in both of these folders
/includes/languages/html_includes
/includes/languages/html_includes/your_template

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
11 May 2007, 03:21
#5
henrietta avatar

henrietta

New Zenner

Join Date:
Mar 2007
Posts:
86
Plugin Contributions:
0

Re: Define Pages / EZ Pages

I am having much the same problem. I have worked through Kobra's suggestions list and am STILL getting this message:

Warning: main(includes/languages/english/html_includes/FILENAME_DEFINE_SIZE_INFO.php) [function.main]: failed to open stream: No such file or directory in /xxxxx/xxxxx/public_html/xxxxx/includes/templates/template_default/templates/tpl_size_info_default.php on line 23
In YOUR LIST of things you have done the very first entry

Added new define:
/var/www/html/docs2/includes/languages/english.php
Line #167 : define('BOX_TOOLS_DEFINE_PAGE_5','Page 5');
does not look right to me (not that THAT means much LOL)

If you are working in the Information box, surely this:

// information box text in sideboxes/information.php

define('BOX_HEADING_INFORMATION', 'Information');
define('BOX_INFORMATION_PAGE_5', 'Page 5');
If you are working in the More Information box, then surely this, there:

// information box text in sideboxes/more_information.php - were TUTORIAL_

define('BOX_HEADING_MORE_INFORMATION', 'More Information');
define('BOX_INFORMATION_PAGE_5', 'Page 5');
11 May 2007, 04:00
#6
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Posts:
31,500
Plugin Contributions:
4

Re: Define Pages / EZ Pages

Henreitta,
FILENAME_DEFINE_SIZE_INFO.php

If following my list - this would be page_5.php...

Get it to function in generic form first and later address titles
11 May 2007, 04:34
#7
henrietta avatar

henrietta

New Zenner

Join Date:
Mar 2007
Posts:
86
Plugin Contributions:
0

Re: Define Pages / EZ Pages

Thank you Kobra

A few differences between Mulleycat's problem and mine:

1. I am not trying to put a page in More Information
2. I am not trying to use an EZ page, therefore cloning one probably wouldn't help.

I ran through your list because you know far more than I, and I was hopeful that your list might point me to something I had missed. Evidently what I am trying to do requires something different.

I know it is possible to do because I did it once before, now if only I could remember HOW I did it my current set of problems would be over.:unsure: So since it IS different I will start a new thread.
11 May 2007, 05:31
#8
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Posts:
31,500
Plugin Contributions:
4

Re: Define Pages / EZ Pages

1. I am not trying to put a page in More Information
2. I am not trying to use an EZ page, therefore cloning one probably wouldn't help.

Actually, what I outlined is not for ezpages but cloning a defines page that cn be edited through the admin.

For not using the "more information" box just change /includes/modules/sideboxes/more_information.php to
/includes/modules/sideboxes/information.php

Additionally, you can reference the about us mod in the downloads section
11 May 2007, 06:06
#9
henrietta avatar

henrietta

New Zenner

Join Date:
Mar 2007
Posts:
86
Plugin Contributions:
0

Re: Define Pages / EZ Pages

Its a big time "DUH moment", just realized you were in Admin and that is why BOX_TOOLS_DEFINE looked strange.
11 May 2007, 06:07
#10
henrietta avatar

henrietta

New Zenner

Join Date:
Mar 2007
Posts:
86
Plugin Contributions:
0

Re: Define Pages / EZ Pages

Thanks again Kobra, I will go check that out right away.
11 May 2007, 07:00
#11
henrietta avatar

henrietta

New Zenner

Join Date:
Mar 2007
Posts:
86
Plugin Contributions:
0

Re: Define Pages / EZ Pages

Seven times I thank YOU Kobra, that awesome mod is exactly how I did the last one but CRS Syndrome had wiped the few remaining brain cells. What once was lost has now been found and I shall sing as I work again instead of muttering.
11 May 2007, 10:31
#12
mulleycat avatar

mulleycat

New Zenner

Join Date:
May 2007
Posts:
4
Plugin Contributions:
0

Re: Define Pages / EZ Pages

Thanks Kobra,

That worked great. I just need to figure out why the heading title is showing up as 'HEADING_TITLE' instead of 'page_5'.

I believe one of my previous problems was that I messed up the tpl_page_5_default.php file. I forgot I had created this file and plus messed up the code. I was able to duplicate the problem with latest tpl_page_5_default.php file. So this was at least part of my trouble where the right sideboxes/etc was disappearing.

Thanks again, I owe you.
11 May 2007, 15:11
#13
kajunto avatar

kajunto

New Zenner

Join Date:
Jan 2007
Posts:
50
Plugin Contributions:
0

Re: Define Pages / EZ Pages

I made all the changes... but i am getting a blank page for page 5. Page 5 heading is there... i can also access page 5 in the admin section under define pages editor. All my html text is there, but is is not showing up. Where should i look to see if i missed something??
11 May 2007, 18:09
#14
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Posts:
31,500
Plugin Contributions:
4

Re: Define Pages / EZ Pages

I made all the changes... but i am getting a blank page for page 5. Page 5 heading is there... i can also access page 5 in the admin section under define pages editor. All my html text is there, but is is not showing up. Where should i look to see if i missed something??

Double check that you have a define_page_5.php file in your includes/languages/html_includes/ - folder even if it is a blank one along with your edited one in your overrides folder
11 May 2007, 19:00
#15
kajunto avatar

kajunto

New Zenner

Join Date:
Jan 2007
Posts:
50
Plugin Contributions:
0

Re: Define Pages / EZ Pages

yes... i have it in:

/public_html/includes/languages/english/html_includes/

and also in:

/public_html/includes/languages/english/html_includes/classic


It's strange, cause it shows up in the admin section under define pages editor... but just a blank page where my html text should be. It has the header and everything else... but it does not show what i have in the define pages editor.
11 May 2007, 19:03
#16
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Posts:
31,500
Plugin Contributions:
4

Re: Define Pages / EZ Pages

Check all of these:
Create/clone these as page_5
/includes/modules/pages/page_2/header_php.php
/includes/languages/english/page_2.php
/includes/templates/template_default/templates/tpl_page_2_default.php

Add/edit these to include page_5
/includes/modules/sideboxes/more_information.php
/includes/languages/english.php
/includes/filenames.php

Create define_page_5.php in both of these folders
/includes/languages/html_includes
/includes/languages/html_includes/your_template

And the about us mod in the downloads section instruction
11 May 2007, 19:32
#17
kajunto avatar

kajunto

New Zenner

Join Date:
Jan 2007
Posts:
50
Plugin Contributions:
0

Re: Define Pages / EZ Pages

checked everything.... changed everything from page_2 to page_5 and added page_5 where it should be added.

only thing i am not sure about is the code for more_information.php... here is what i have:

unset($more_information);

// test if links should display
if (DEFINE_PAGE_2_STATUS <= 1) {
$more_information[] = '<a href="' . zen_href_link(FILENAME_PAGE_2) . '">' . BOX_INFORMATION_PAGE_2 . '</a>';
}
if (DEFINE_PAGE_3_STATUS <= 1) {
$more_information[] = '<a href="' . zen_href_link(FILENAME_PAGE_3) . '">' . BOX_INFORMATION_PAGE_3 . '</a>';
}
if (DEFINE_PAGE_4_STATUS <= 1) {
$more_information[] = '<a href="' . zen_href_link(FILENAME_PAGE_4) . '">' . BOX_INFORMATION_PAGE_4 . '</a>';
}
if (DEFINE_PAGE_5_STATUS <= 1) {
$more_information[] = '<a href="' . zen_href_link(FILENAME_PAGE_5) . '">' . BOX_INFORMATION_PAGE_5 . '</a>';
}

// insert additional links below to add to the more_information box
// Example:
// $more_information[] = '<a href="' . zen_href_link(FILENAME_DEFAULT) . '">' . 'TESTING' . '</a>';


// only show if links are active
if (sizeof($more_information) > 0) {
require($template->get_template_dir('tpl_more_information.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_more_information.php');

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

I am not sure if have this correct, or if i should have put page_5 code where it says: insert additional links below to add to the more_information box.

I tried putting it there instead of where i had it, and it still did not work.
11 May 2007, 19:38
#18
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Posts:
31,500
Plugin Contributions:
4

Re: Define Pages / EZ Pages

You have missed something??? Hard to determine from the forum....
Did you also review the instructions in the about us mod with any enlightenment?
11 May 2007, 19:58
#19
kajunto avatar

kajunto

New Zenner

Join Date:
Jan 2007
Posts:
50
Plugin Contributions:
0

Re: Define Pages / EZ Pages

Looked at the about us mod instructions... not much help... not sure why this is not working... i will start all over from scratch and see if that works.

Everything seems to be correct, the link is in the more information box, when you click the link, it takes you to page 5, the correct header is there, but no html text... it's like it cant find the text.

oh well... i will start all over and see if that helps.

I would try using ez pages, but i dont think that will work in the more information box.
13 May 2007, 03:08
#20
dinosoup avatar

dinosoup

New Zenner

Join Date:
May 2007
Posts:
17
Plugin Contributions:
0

Re: Define Pages / EZ Pages

I was also wondering how to create a new define page and found this post.

Thanks to the instructions given by you guys, I have successfully created a new define page. Except only one step is missing; you have to insert a new row in the "configuration" table in the database.
INSERT  INTO  `zencart`.`zen_configuration` ( `configuration_id` ,
 `configuration_title` ,
 `configuration_key` ,
 `configuration_value` ,
 `configuration_description` ,
 `configuration_group_id` ,
 `sort_order` ,
 `last_modified` ,
 `date_added` ,
 `use_function` ,
 `set_function` 
)
VALUES ( NULL ,  'Define Page 9',  'DEFINE_PAGE_9_STATUS',  '1',  'Enable the Defined Page 9 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',  '85',  NULL ,  '0001-01-01 00:00:00',  NULL ,  'zen_cfg_select_option(array(''0'', ''1'', ''2'', ''3''),'
);