-
Define Pages Generator addon - Support
About
Define Pages Generator isn't exactly a zencart module, you would probably call it a meta-module, it is a small Windows application that makes it really easy to make new "define pages."
All you need to do is specify the name you want to give your page, the name of your current template and a directory to build the directory / file structure in and it does the rest. This directory structure can then be copied over to a zencart installation to make the define page accessible.
Motivation
Making a new define page seems to be a really fiddly task. However these pages are pretty useful, since unlike ezpages they don't get stored in the database, so they are easier to develop (ie you can use Dreamweaver). With a few simple tweeks, it is quite straight forward to give them a menu structure (ie pretend to nest one inside the other so the breadcrumb shows home::parent::child::....) and you can use php inside the pages which I don't think you can do with ezpages.
Acknowledgements
The code it generates is based on the "About Us" module, which seems to be the main resource for working out how to build a new define page.
Download
The Application can be downloaded from: http://www.zen-cart.com/index.php?ma...roducts_id=804
Important
NOTE: It only runs under Windows and although I am a Linux user there is little likelihood of me porting it over. You need to have the .NET 2.0 framework to run it, you can get this from http://www.microsoft.com/downloads/d...displaylang=en
If you have a question about how to use the application, or you find a bug please let me know.
-
Re: Define Pages Generator - Support
Thank you, thank you, thank you. This tool is a fabulous little gem for creating these pages, it really gets to be a pain to create and keep track of them the other way.
-
Re: Define Pages Generator - Support
Cheers. I'm currently working on a mod that allows you to create menu structures from define pages, so you can make it look like they are nested inside each other. For example putting all the information pages inside a main information page. I think that it works, but at the moment it requires a very small bit of programming to use. I think that this is better than hacking up an admin page, but maybe not so user friendly. If I have some free time i will polish this up and release it.
-
Re: Define Pages Generator - Support
This will come very handy. Great tool. Thank you.
-
Re: Define Pages Generator - Support
Hi banswidthjunkie,
I used the mod the first time yesterday. I must say that it saves me lots of time and headache. Great contribution. Please keep up the good work.
Regards,
yellow1912
-
Re: Define Pages Generator - Support
1 idea: Can you include the option to make sidebox for that page as well?
Regards
yellow1912
-
Re: Define Pages Generator - Support
What do you mean by a sidebox for the page? a sidebox that displays a link to the page?
If you can give me the template code, then I can implement it.
-
Re: Define Pages Generator - Support
Here is the blank sidebox code:
http://www.zen-cart.com/index.php?ma...roducts_id=174
Basically, when I create a new page called about_us for example, I may also want to create a sidebox called about_us as well.
-
Re: Define Pages Generator - Support
All I can say is thank you X a zillion for this mod!
One of the last stores I did wanted so many add-on pages that I had to re-create the about-us mod about 15 times, that's a lot of renaming inside and out. I can't even remember the last time I've used an ez page for anything.
Clients just like seeing those physical pages they can edit after we leave.
Am looking forward to your sidebox add-on as well.
Thank you for the hours of time saving!!
betty
-
Re: Define Pages Generator - Support
My pleasure Betty, I'm waging a personal war on cut and paste :)
-
Re: Define Pages Generator - Support
Hi everyone,
Let me be the first "voice of stupidity" on this thread (smile). I understand how to use the program and the copying of files to my host. What I don't understand is how to incorporate the changes into my main web page. Does everyone just use a plain link, or a sidebox? Can someone give me a helping hand here?
thanks
btw: looks like a great mod...
-
Re: Define Pages Generator - Support
It depends on your need, rite? You can decide to put the link in the navigation bar, at the footer, etc, wherever you want.
-
Re: Define Pages Generator - Support
Quote:
Originally Posted by
yellow1912
It depends on your need, rite? You can decide to put the link in the navigation bar, at the footer, etc, wherever you want.
Thanks for the quick answer... let's just say that I want to put it into the navigation bar... how do I go about doing that? Sorry to be such a dummy about this... :blink: I wil probably forever be learning about zen cart. :smile:
-
Re: Define Pages Generator - Support
you can get a link to the page in the php code using the function "zen_href_link," this is the standard function for getting links in zencart. If you called your page "my page" then in the php
PHP Code:
$link_to_my_page = zen_href_link( FILENAME_MY_PAGE, '' );
will give you the link you need and if you want to use this then you need to stick it in a link:
PHP Code:
echo '<a href="' . $link_to_my_page . '">Link Text</a>';
This will print a link to your page where you put it in the code. To put a link to this page in the navigation bar you will need to find the file that generates the navigation bar and then modify it to your needs.
I'm afraid that as I said in the introduction, this is a meta-mod, so it is something that helps you generate new code for your site. Unfortunately if you want to use this code then you need to do some (basic) programming.
-
Re: Define Pages Generator - Support
Ok thanks for the reply. I will try and see if I can get that working. Thanks so much for your help. Will let you know how things go when I get through with it.
-
Re: Define Pages Generator - Support
Quote:
Originally Posted by
banswidthjunkie
you can get a link to the page in the php code using the function "zen_href_link," this is the standard function for getting links in zencart. If you called your page "my page" then in the php
PHP Code:
$link_to_my_page = zen_href_link( FILENAME_MY_PAGE, '' );
will give you the link you need and if you want to use this then you need to stick it in a link:
PHP Code:
echo '<a href="' . $link_to_my_page . '">Link Text</a>';
This will print a link to your page where you put it in the code. To put a link to this page in the navigation bar you will need to find the file that generates the navigation bar and then modify it to your needs.
I'm afraid that as I said in the introduction, this is a meta-mod, so it is something that helps you generate new code for your site. Unfortunately if you want to use this code then you need to do some (basic) programming.
Thank you again for getting back to me... would you mind letting me know exactly which php file I need to change for the first and second lines of code? Thanks, I appreciate it. Again... sorry for being dumb about this.
-
Re: Define Pages Generator - Support
By the way, on your navbar image, you need to set the background colour as the same red as the right most pixel as the background image, and then you need to set the x-repeat to none, otherwise it looks a bit odd.
-
Re: Define Pages Generator - Support
Quote:
Originally Posted by
banswidthjunkie
By the way, on your navbar image, you need to set the background colour as the same red as the right most pixel as the background image, and then you need to set the x-repeat to none, otherwise it looks a bit odd.
Just so you won't think I'm a complete idiot, I'm a retired software developer. I developed in c++ and VB. However, I'm not that great at PHP. I'm learning a few things as time goes by though. Thanks for the info on the navbar image.
-
Re: Define Pages Generator - Support
Dont worry, I guess it's the same for most of us. I had a hard time trying to get ZC structure and the way it does things, but then now if you say the problem I can tell where should you look into.
Quote:
Originally Posted by
crabdance
Just so you won't think I'm a complete idiot, I'm a retired software developer. I developed in c++ and VB. However, I'm not that great at PHP. I'm learning a few things as time goes by though. Thanks for the info on the navbar image.
-
Re: Define Pages Generator - Support
Thanks for getting back with me on this. What I needed was to know the exact filenames to make the changes to. You said make the changes in "the" php file but did not say which one. The generator creates multiple files and I just need to know which ones to change :blink:
If you can just give me the filenames, I'm sure I can take it from there.
Quote:
Originally Posted by
yellow1912
Dont worry, I guess it's the same for most of us. I had a hard time trying to get ZC structure and the way it does things, but then now if you say the problem I can tell where should you look into.
-
Re: Define Pages Generator - Support
I just realized that maybe I'm not being clear about this. I know that the filenames will be different depending on what name you select when you first use the program. I guess what I really need is the path to the filename ie:
includes/extra_datafiles/my_filename.php
or something like that. Is that making more sense now? Hope so. As always thanks for any help.
-
Re: Define Pages Generator - Support
The (basic) rule is that if your file name is "bAdLy-nameD page" then you capitalise it: "BADLY-NAMED PAGE" and replace non-alphanumeric characters with "_": "BADLY_NAMED_PAGE", then prefix it with the word "FILENAME": "FILENAME_BADLY_NAMED_PAGE"
The next version which i am just putting the finishing tuoches to makes this clear.
The basic trick when dealing with any php website is if you want to edit a bit of generated code:
1) find the id of the closest tag with an id to the bit of code that you want to edit.
2) Search through the entire source code for this string (most text editors and dreamweaver can do this) hopefully the place you find this string will be near to the code you want to modify.
In your case try searching for "navMain" ;)
-
Re: Define Pages Generator - Support
Quote:
Originally Posted by
banswidthjunkie
The (basic) rule is that if your file name is "bAdLy-nameD page" then you capitalise it: "BADLY-NAMED PAGE" and replace non-alphanumeric characters with "_": "BADLY_NAMED_PAGE", then prefix it with the word "FILENAME": "FILENAME_BADLY_NAMED_PAGE"
The next version which i am just putting the finishing tuoches to makes this clear.
The basic trick when dealing with any php website is if you want to edit a bit of generated code:
1) find the id of the closest tag with an id to the bit of code that you want to edit.
2) Search through the entire source code for this string (most text editors and dreamweaver can do this) hopefully the place you find this string will be near to the code you want to modify.
In your case try searching for "navMain" ;)
I'm getting closer to understanding this :wacko: I was able to find the filename with the navMain ID in it. There is some logic there to check and see if the person is logged in or not and what to put on the nav page for either condition.
That leaves me with just one more file to find and edit. What is the path to the filename where I put this in?
$link_to_my_page = zen_href_link( FILENAME_MY_PAGE, '' );
If I know that, I think I can get everything to work. Thanks again for your patience with me on this.
-
Re: Define Pages Generator - Support
basically that depends where you want the link to go exactly, if you want it in the bar at the top of the page, then you probably want to put it in the file you found, if not it might be another file.
You sort of have to follow your nose with this stuff.
-
Re: Define Pages Generator - Support
Quote:
Originally Posted by
banswidthjunkie
basically that depends where you want the link to go exactly, if you want it in the bar at the top of the page, then you probably want to put it in the file you found, if not it might be another file.
You sort of have to follow your nose with this stuff.
Sorry bwj... I'm just not getting it lol... guess I will wait until you come out with the new version and see if I can understand that one better. I don't want to wear out my welcome where your help is concerned. Thanks a bunch for your help. I DO appreciate it. Maybe after the new version comes out I can bug you some more j/k... Thanks and have a great holiday season!!!
-
Re: Define Pages Generator - Support
crabdance, a "page" of ZC contains many files in many folders:
+ The language file in language folder usually define header, title, etc.
+ The modules/pages/header_php.php contains all the functions or any code needed to be run before loading the template.
+ and the template file.
Basically, when you want to create a page in zencart, which you can access using the link index.php?main_page=page_name, you have to create all those files. This mod simply helps you to create that set of file much faster, and that's it. Even with the new version of this mod or not, this is how things are done on ZC, not because the author of the mod wants to make it that way.
-
Re: Define Pages Generator - Support
Quote:
Originally Posted by
yellow1912
crabdance, a "page" of ZC contains many files in many folders:
+ The language file in language folder usually define header, title, etc.
+ The modules/pages/header_php.php contains all the functions or any code needed to be run before loading the template.
+ and the template file.
Basically, when you want to create a page in zencart, which you can access using the link index.php?main_page=page_name, you have to create all those files. This mod simply helps you to create that set of file much faster, and that's it. Even with the new version of this mod or not, this is how things are done on ZC, not because the author of the mod wants to make it that way.
Thanks for letting me know all of this, Yellow. I'm still learning how ZC is put together and what you have just said helps me a lot. I hope that I haven't sounded like I was getting down on the author of the mod. I certainly don't want to do that. I'm just trying to wrap my head around how all this works. BWJ has done a great job with the mod and I don't want to take anything away from him for sure.
The only reason I was "giving up" was that I thought I was making an *ss out of myself for asking so many questions. I thought that maybe I was making too much of this and not getting it straight. I appreciate your help and BWJ's help. You have both helped me to understand some things that would have taken me a while to get.
A big thank you to both of you... you both have been great trying to help me out! I will take the information that you gave me and see if I can try to get it working again.
-
Re: Define Pages Generator - Support
I suppose it it sort of like speaking japanese: if you speak it, it is the most natural thing in the world, if not it sounds like someone repeatedlay saying "desu" very quickly.
There is not much either Yellow or I can say to solve this, it is just a matter of hitting your head against a brick wall until nihongo wo hanashimasu (you can speak japanese). I find drinking lots of Stella helps :)
-
Re: Define Pages Generator - Support
You are welcome. It took me a while to get a hold of ZC as well.
BTW, I made a typo in the post above, should be:
includes/modules/pages/page_name/header_php.php
-
Re: Define Pages Generator - Support
@crabdance <- don't feel like you are being an *ss for asking questions, none of my friends can program and when I try to explain it to them they don't understand. I wouldn't even like to think about how long I have spent learning programing languages. I spent a solid year learning virtually every nuance of C++ on government money and since then I can pick up a new language pretty quickly (although I still get very frustrated with CSS). Programing is hard, my philosphy is that anyone who is willing to give it a go deserves a little patience.
-
Re: Define Pages Generator - Support
Quote:
Originally Posted by
banswidthjunkie
@crabdance <- don't feel like you are being an *ss for asking questions, none of my friends can program and when I try to explain it to them they don't understand. I wouldn't even like to think about how long I have spent learning programing languages. I spent a solid year learning virtually every nuance of C++ on government money and since then I can pick up a new language pretty quickly (although I still get very frustrated with CSS). Programing is hard, my philosphy is that anyone who is willing to give it a go deserves a little patience.
Hi Banswidthjunkie... thanks for making me feel better about the many questions. I understand about how much time you can put into learning programming languages. I have certainly spent a lot of time myself. I don't do it much anymore (by choice lol). Once I understand ZC (or at least enough of it), I hope that I can make contributions too.
If you don't mind... let me try at asking my question again. I understand that I can put: echo '<a href="' . $link_to_my_page . '">Link Text</a>'; in the
includes/templates/template_default/common/tpl_header.php file in the navMain ID section.
Now I just need to know where I should put:
$link_to_my_page = zen_href_link( FILENAME_MY_PAGE, '' );
There must be a standard place where you put this. If you were going to put a link in the nav bar to your page, where would you put this code?
Once again... thanks for the patience and kindness.
-
Re: Define Pages Generator - Support
Oh... I love CSS. Almost all of my site was done with the CSS stylesheet. I still don't understand it really well but I think that it is cool how it works. Here's wishing you better times with the CSS files! :yes:
-
Re: Define Pages Generator - Support
personally, I would put
$link_to_my_page = zen_href_link( FILENAME_MY_PAGE, '' );
on the line above the line where i wrote
echo '<a href="' . $link_to_my_page . '">Link Text</a>';
You should think of php as a printer. Unlike C++, php is a lazyboy easy language. If you step even an inch out of line with C++ it puts you in your place and lets you know who's boss. But php lets you do what you want.
"echo" means print, everything other than echo is stuff you need to do to print.
By the way don't bother watchong Flock with Richard Gere, it's rubbish.
-
Re: Define Pages Generator - Support
Or, why not just:
echo '<a href="' . zen_href_link( FILENAME_MY_PAGE, '' ) . '">Link Text</a>';
-
Re: Define Pages Generator - Support
Ok... I'm trying to get the one liner to work. Give me a bit to play around with it and I will either ask more questions or let you know how things are going.
-
Re: Define Pages Generator - Support
Ok... I have got it to work some. I have created a "4Fun" link in the nav bar and it takes me to "some" page but I'm not sure if it's the right one. Here is what the url window shows in FF: http://tranquillas.com/biz/index.php?main_page=4fun
I went into the "define pages editor" and changed the color of the sample text to red (my background is black)... but the sample text does not appear to show up.
Would either of you mind taking a look at my site and see what I'm talking about. Hey... I'm just tickled that I got something to show up on the nav bar <grin>
thanks for the help.
-
Re: Define Pages Generator - Support
I just noticed that my nav bar title is not working. Who do need to shoot in order to get that working lol...
I will be checking out the code(s) until I hear from either of you.
tanks
-
Re: Define Pages Generator - Support
Seem like some files are not placed in the correct folder.
Make sure you input the correct name of your template when you create new "page".
-
Re: Define Pages Generator - Support
Quote:
Originally Posted by
yellow1912
Seem like some files are not placed in the correct folder.
Make sure you input the correct name of your template when you create new "page".
The files MUST be in the right order because I just did a drag and drop in FileZilla. The correct name for the template is 4fun. Here's where my code is (if that helps).
Quote:
<div id="navMain">
<ul class="back">
<li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a></li>
<?php if ($_SESSION['customer_id']) { ?>
<li><a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a></li>
<li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a></li>
<?php echo '<a href="' . zen_href_link( FILENAME_4FUN, '' ) . '">4Fun</a>'; ?>
<?php
} else {
if (STORE_STATUS == '0') {
?>
<li><a href="<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGIN; ?></a></li>
<?php echo '<a href="' . zen_href_link( FILENAME_4FUN, '' ) . '">4Fun</a>'; ?>
<?php } } ?>
<?php if ($_SESSION['cart']->count_contents() != 0) { ?>
<li><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a></li>
<li><a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT; ?></a></li>
<?php }?>
</ul>
</div>
Hope this helps. At least I made a little ground (smile).
-
Re: Define Pages Generator - Support
Just to let you know... I re-installed the files so that I was SURE that they were going into the right place. Behavior of the web page stays the same....
-
Re: Define Pages Generator - Support
NAVBAR_TITLE is not loaded correctly, look in to includes/languages/english/4fun
See if the file 4fun.php is there, and check the content to see if it's correct
-
Re: Define Pages Generator - Support
Quote:
Originally Posted by
yellow1912
NAVBAR_TITLE is not loaded correctly, look in to includes/languages/english/4fun
See if the file 4fun.php is there, and check the content to see if it's correct
Here is the path to my file:
/public_html/biz/includes/languages/english/4fun/4fun.php
This is the content of that 4fun file:
Quote:
// DON'T EDIT THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
// This is used to display the heading and the navigation bar
define('NAVBAR_TITLE', '4fun');
define('HEADING_TITLE', '4fun');
and good morning!
-
Re: Define Pages Generator - Support
Morning here as well, has to wake up in the middle of the night to complete domain transfer.
Huhm, just checked and seem like you fixed the problem with navbar_title
-
Re: Define Pages Generator - Support
I just noticed some interesting behavior on a test that I just did. Just for grins, I tried putting the 4fun file in the next directory down. That directory would be:
/public_html/biz/includes/languages/english/4fun.php
When I did this... the navbar title started to work. Any idea of what is going on? Because as I said I just copied the directory structure over to my server.
tanks
-
Re: Define Pages Generator - Support
That is the place for default template files, you may want to check your admin panel and see if you are really using the 4fun template.
-
Re: Define Pages Generator - Support
Quote:
Originally Posted by
yellow1912
That is the place for default template files, you may want to check your admin panel and see if you are really using the 4fun template.
How do I check the admin to check this out. What am I looking for. I looked in the "define pages editor" and I can see the 4fun file there. I can edit it and do pretty much anything with it. But it doesn't show up when I click the link in the navMain bar.
-
Re: Define Pages Generator - Support
admin->tools->template selection
-
Re: Define Pages Generator - Support
I just got the page to work. What I did was take the file that was in: /public_html/biz/includes/templates/4fun/templates/tpl_4fun_default.php and move it to /public_html/biz/includes/templates/my_template/templates/
Once I did this the 4fun page started showing up. Any ideas about what is going on? Did we find a bug in the software?
-
Re: Define Pages Generator - Support
It appears that, the template you are using is named "my_template", not "4fun".
^^.
-
Re: Define Pages Generator - Support
Quote:
Originally Posted by
yellow1912
It appears that, the template you are using is named "my_template", not "4fun".
^^.
I just called it "my_template" because I guess I was trying to protect the real name of my template. Don't know if that makes any sense... The "my_template" is the current over-ride template that I am using.
Like I said... everything is working now that I have made the 2 changes. I'm just curious about what was making it not work when it was in the standard directories in the install.
P.S. Hope your swap over goes well..
-
Re: Define Pages Generator - Support
When you created you page using the mod, did you put your template name there?
Because in some previous posts, you mentioned that your template name is "4fun", but now it seems to have a different name?
You have to put the name of the CURRENT template that you are using there for the mod to generates the correct folder name.
-
Re: Define Pages Generator - Support
Quote:
Originally Posted by
yellow1912
When you created you page using the mod, did you put your template name there?
Because in some previous posts, you mentioned that your template name is "4fun", but now it seems to have a different name?
You have to put the name of the CURRENT template that you are using there for the mod to generates the correct folder name.
ok... I feel like a complete idiot about this. I was just coming to this conclusion right before I received this note from you. I just got the software up and running and was looking at the information that it asked for and you are right I did not do things right... pilot error indeed. I did not put the name of my current template into the box in the software where it asks for template name.
Well like Bandswidthjunkie said... sometimes you just have to beat your head against the wall enough till things become clear.
Thanks so much for your help. I'm going to try another page and this time I will put the right template name in there. Will let you know how it turns out.
Thanks so much!
-
Re: Define Pages Generator - Support
I just tried the software again and provided the correct template directory name and everything worked right out of the box. Could not ask for things to come together any easier than that. I had the page up and running in about a minute.
Thanks for everything. You were right, yellow when you suggested there was a problem with the directory structure. My brain is what lol..
Anyway, thanks for hanging in there with me. I know that I've been a pain but I now know how to add things to the nav bar and I think that is something great. Can't say thanks enough..
Good luck with your swap over....
-
Re: Define Pages Generator - Support
Glad we got it worked out.
This mod is really a time saver. Just look at the number of files it creates, normally you have to do that MANUALLY.
Thanks again, bwj.
-
Re: Define Pages Generator - Support
Quote:
Originally Posted by
yellow1912
Glad we got it worked out.
This mod is really a time saver. Just look at the number of files it creates, normally you have to do that MANUALLY.
Thanks again, bwj.
You are right... it really IS a time saver. Plus just less things that your brain has to think about. A BIG thanks to BWJ! Great mod man. I even think I can speak a little Japanese now (smile)... just a little...
Thanks to both of you for all your help.
-
Re: Define Pages Generator - Support
Yes, I think that is why it says in big red letters "Please read the instructions before using" and then on line two of the instructions it says "Enter the name of the template you are using" :wink2:
Anyway I'm glad you got everything sorted out and thanks Yellow for sorting this out while I was asleep.
B
By the way Crabdance, now you've got the hang of this one, maybe you want to give my other mod a go: http://www.zen-cart.com/index.php?ma...roducts_id=830
-
Re: Define Pages Generator - Support
Quote:
Originally Posted by
banswidthjunkie
Yes, I think that is why it says in big red letters "Please read the instructions before using" and then on line two of the instructions it says "Enter the name of the template you are using" :wink2:
Anyway I'm glad you got everything sorted out and thanks Yellow for sorting this out while I was asleep.
B
By the way Crabdance, now you've got the hang of this one, maybe you want to give my other mod a go:
http://www.zen-cart.com/index.php?ma...roducts_id=830
Hi BWJ... yea, I know.. RTFM. If I had only read the instructions I could have saved everyone a bunch of work. And yes, Yellow helped me a lot as well as you. Thanks to the both of you for your patience.
I will look at your other mod. This time I will read the instructions (lol)...
Thanks so much to both of you for helping me get through this all.
good morning!
-
Re: Define Pages Generator - Support
I just looked at your other mod... funny because I just started using lightbox a couple of weeks ago. I really like it. Both your mod and lightbox are pretty neat programs. I think for now I will stick with the lightbox since I already have it installed and working.
Your mod really looks great though. I went to two different sites to look at the mod. Looked great too! You should be very proud/happy with that mod too.
Hope you have a wonderful morning. I'm going back to sleep for a while... didn't get much rest last night.
-
Re: Define Pages Generator - Support
Yeah, slimbox and lightbox do the same job, and to the end user they look pretty much the same. The only difference is that slimbox is a much smaller download, so the page loads quicker, and you can customise the way it opens.
Another nice thing about slimbox is that you can actually open an iframe in that lightbox window, so for example if you had a privacy notice link in your information sidebox it could open in the lightbox so the user wouldn't move away from the page that they are on.
I can't take any credit for the actual effect though, that is the work of someone else.
-
Re: Define Pages Generator - Support
Quote:
Originally Posted by
banswidthjunkie
Yeah, slimbox and lightbox do the same job, and to the end user they look pretty much the same. The only difference is that slimbox is a much smaller download, so the page loads quicker, and you can customise the way it opens.
Another nice thing about slimbox is that you can actually open an iframe in that lightbox window, so for example if you had a privacy notice link in your information sidebox it could open in the lightbox so the user wouldn't move away from the page that they are on.
I can't take any credit for the actual effect though, that is the work of someone else.
I think you should take a lot of credit for porting it over to ZC. I looks great and I bet you spent a lot of time making sure things were working great for the mod. Good work!
-
Re: Define Pages Generator - Support
Hi bwj, here is another idea for the next version:
1. Can the program remembers the location to store the page from the last time I use it?
2. Also, a field to specify the "language" can be helpful some times, of course the default is english.
-
Re: Define Pages Generator - Support
Hi banswidthjunkie,
Thank you for this brilliant little app, it's taken me all of 10 minutes to add 3 new pages to the "more information" side box!
-
Re: Define Pages Generator - Support
-
Re: Define Pages Generator - Support
Does anyone know if there is a maximum amount of pages that you can create in Zen Cart?
-
Re: Define Pages Generator - Support
How many do you plan on creating?
-
Re: Define Pages Generator - Support
I am thinking of creating a gallery within Zen Cart - probably 200+
-
Re: Define Pages Generator - Support
I would have thought that the only limit would come from the number of defined constants. I think that you add 2 per page.
I reckon that 200 wouldn't cause any problems. The only practical issue that I could see is that so many files would get included every time the page loaded that things might get very slow, if you had over 1000 then this might start to happen. I have no idea how php deals with caching or memory.
Just an idea, but managing 200+ pages manually sounds like a nightmare, isn't there another solution?
-
Re: Define Pages Generator - Support
I put up a gallery that only has 12 pages right now (one for each month), but I wanted about four times that many so people would'nt have to scroll down so far and so each page loaded quicker (I am still thinking of implementing this one).
I would have loved to do a gallery using php and having a script that simply calls up the pictures in a directory, and maybe even thumbnails them automatically. I could not find a script that would call up an image and name it correctly (one line with persons name, next line with thier quilt name), so I gave up that search. I resorted javascript and html, but like I say would much rather have found a php solution.
If anyone has any recommendations, maybe you'd help both of us out ;)
-
Re: Define Pages Generator - Support
THIS MOD (DefinePageGenerator) is EXCELLENT!!!!!!!!!!!
Vista has .NET already pre-installed, so it took literally seconds for me to generate a new page! I had to do a file comparison with the remote server to make sure I know which pages to upload, but this took seconds.
This mod is a HUGE time saver. Thanks a ton!!!
-
Re: Define Pages Generator - Support
Quote:
Originally Posted by
nmuta
THIS MOD (DefinePageGenerator) is EXCELLENT!!!!!!!!!!!
Vista has .NET already pre-installed, so it took literally seconds for me to generate a new page! I had to do a file comparison with the remote server to make sure I know which pages to upload, but this took seconds.
This mod is a HUGE time saver. Thanks a ton!!!
glad you like it.
-
Re: Define Pages Generator - Support
Quote:
Originally Posted by
rainthebat
I put up a gallery that only has 12 pages right now (one for each month), but I wanted about four times that many so people would'nt have to scroll down so far and so each page loaded quicker (I am still thinking of implementing this one).
I would have loved to do a gallery using php and having a script that simply calls up the pictures in a directory, and maybe even thumbnails them automatically. I could not find a script that would call up an image and name it correctly (one line with persons name, next line with thier quilt name), so I gave up that search. I resorted javascript and html, but like I say would much rather have found a php solution.
If anyone has any recommendations, maybe you'd help both of us out ;)
There is a little gallery that works with zen cart only 2 small errors that I need to fix.
You can look at it at http://atcakes.com/index.php?main_page=gallery
These are the errors
Notice: Undefined variable: flag_disable_footer in C:\Inetpub\wwwroot\includes\templates\atcakes\common\tpl_footer.php on line 24
Notice: Object of class queryFactoryResult could not be converted to int in C:\Inetpub\wwwroot\includes\application_bottom.php on line 16
-
Re: Define Pages Generator - Support
Quote:
Originally Posted by
ATC
There is a little gallery that works with zen cart only 2 small errors that I need to fix.
You can look at it at
http://atcakes.com/index.php?main_page=gallery
These are the errors
Notice: Undefined variable: flag_disable_footer in C:\Inetpub\wwwroot\includes\templates\atcakes\common\tpl_footer.php on line 24
Notice: Object of class queryFactoryResult could not be converted to int in C:\Inetpub\wwwroot\includes\application_bottom.php on line 16
Notice: Undefined variable: flag_disable_footer in C:\Inetpub\wwwroot\includes\templates\atcakes\common\tpl_footer.php on line 24
I found the fix to this from a old post from DrByte
Any help with Notice: Object of class queryFactoryResult could not be converted to int in C:\Inetpub\wwwroot\includes\application_bottom.php on line 16
Looked all over... any help please ? The gallery looks worth while to me.
-
Re: Define Pages Generator - Support
I think you are going off topic here, please open another topic for this. The thread is dedicated to Define Pages Generator only.
-
Re: Define Pages Generator - Support
-
Re: Define Pages Generator - Support
Will the Define Pages Generator work alright with 1.3.8 and 1.3.8.a?
-
Re: Define Pages Generator - Support
Yes, it outputs all the correct pages for 1.3.8 etc. It will most likely work for many versions to come as well.
-
Re: Define Pages Generator - Support
Hey when I go to use this tool I get this messsage that pops up....
Application attempted to perform an operation not allowed by the security policy. To grant this application the required permission, contact your system administrator, or use the Microsoft .NET Framework Configuration tool.
If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately.
Request for the permission of type
'System.Security.Permissions.FilelOPermission, mscorlib, Version=2.0.0.9, Culture=neutral, PublicKeyToken=b77a5c671934e089
Does any one now how to fix this?
-
Re: Define Pages Generator - Support
I am also very happy to find this great tool. Especially big thanks to you for the good manual.
But now my question to you, BWJ. In site 1 of this thread you wrote:
Quote:
I'm currently working on a mod that allows you to create menu structures from define pages, so you can make it look like they are nested inside each other. For example putting all the information pages inside a main information page.
I'm very interested in creating menus with first and second levels for zen cart. Have you developed such a little tool to do this? That would be great.
-
Re: Define Pages Generator - Support
Excuse me please. After sending my post, I realized, that you didn't mean the menu structure of define pages. You mean the menu structure of Zen Cart.
Sorry.:blush:
-
Re: Define Pages Generator - Support
These are the errors
Notice: Object of class queryFactoryResult could not be converted to int in /xxxxxx/xxxxxx/public_html/final/includes/application_bottom.php on line 16
-
Re: Define Pages Generator - Support
Quote:
Originally Posted by
sandeep
These are the errors
Notice: Object of class queryFactoryResult could not be converted to int in /xxxxxx/xxxxxx/public_html/final/includes/application_bottom.php on line 16
Which has nothing to do with this module.
-
Re: Define Pages Generator - Support
Quote:
Originally Posted by
cs_jono
Hey when I go to use this tool I get this messsage that pops up....
Application attempted to perform an operation not allowed by the security policy. To grant this application the required permission, contact your system administrator, or use the Microsoft .NET Framework Configuration tool.
If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately.
Request for the permission of type
'System.Security.Permissions.FilelOPermission, mscorlib, Version=2.0.0.9, Culture=neutral, PublicKeyToken=b77a5c671934e089
Does any one now how to fix this?
You install .net framework which can be found on microsoft page.
-
Re: Define Pages Generator - Support
Hi I just wanted to say how great I think this program is. I've been unsure for a while whether to use Define Pages or E-Z Pages for a particular project where by many extra pages will be needed. I really wanted to avoid E-Z Pages because of their meaningless URLs but was always put off by the complexity of the Define Pages. This contribution solves this problem. :smile:
-
Re: Define Pages Generator - Support
This generator is amazing. I was sitting here forever individually changing names. Only problem is the new pages aren't showing up in Configuration-->Define Page Status and they also aren't showing up in my Information Sidebox. I did alter the information.php file to include my new pages.
-
Re: Define Pages Generator - Support
Quote:
Originally Posted by
khopek
the new pages aren't showing up in Configuration-->Define Page Status
Check to make sure the file is in both of these locations:
includes/languages/english/html_includes
and
includes/languages/english/html_includes/your_template
-
Re: Define Pages Generator - Support
Sorry I thought you said Define Pages Editor.
I don't think they're supposed to appear under Define Page Status.
-
Re: Define Pages Generator - Support
Oh well then I guess everything is perfect! One thing though, is my zenID supposed to be showing in every link to the new Defines Pages?
-
Re: Define Pages Generator - Support
Quote:
Originally Posted by
banswidthjunkie
About
Define Pages Generator isn't exactly a zencart module, you would probably call it a meta-module, it is a small Windows application that makes it really easy to make new "define pages."
All you need to do is specify the name you want to give your page, the name of your current template and a directory to build the directory / file structure in and it does the rest. This directory structure can then be copied over to a zencart installation to make the define page accessible.
Motivation
Making a new define page seems to be a really fiddly task. However these pages are pretty useful, since unlike ezpages they don't get stored in the database, so they are easier to develop (ie you can use Dreamweaver). With a few simple tweeks, it is quite straight forward to give them a menu structure (ie pretend to nest one inside the other so the breadcrumb shows home::parent::child::....) and you can use php inside the pages which I don't think you can do with ezpages.
Acknowledgements
The code it generates is based on the "About Us" module, which seems to be the main resource for working out how to build a new define page.
Download
The Application can be downloaded from:
http://www.zen-cart.com/index.php?ma...roducts_id=804
Important
NOTE: It only runs under Windows and although I am a Linux user there is little likelihood of me porting it over. You need to have the .NET 2.0 framework to run it, you can get this from
http://www.microsoft.com/downloads/d...displaylang=en
If you have a question about how to use the application, or you find a bug please let me know.
I just used the define pages generator and uploaded the files to my server, and all seems well - accept...
when I go to define pages editor, I can pull up the page, enter the text, which right now I have 'coming soon'
but when I type the URL in to the browser, only a blank page comes up...
http://www.1999-or-less.com/index.php?main_page=faq
I know it must be there, because the 'page not found' doesn't come up, like if you typed in http://www.1999-or-less.com/index.ph..._page=fakepage (page not found because it don't exist)
so my problem is, how do I get the text I type in the define pages editor (ie coming soon) to appear on the page:
http://www.1999-or-less.com/index.php?main_page=faq
thanks
dphillips209##################
-
Re: Define Pages Generator - Support
ok, i've beaten my head over this, and I just can't figure out how to get my NEW page from the generator to show up on the site, in the sidebox on the right that says, Additional Information, and instead of page 2, page 3, etc. www.div8hardware.com
I've created a page called "define_lock_functions.php", and it IS showing up under the TOOLS>DEFINE PAGES EDITOR, and yes i can edit THAT. It is NOT showing up on CONFIG>DEFINE PAGE STATUS. How do I get this to show up?
Also, can anyone tell me how to change the name of the pages that show up on that sidebox?
-
Re: Define Pages Generator - Support
Thanks for this mod, it rocks!!!
Quote:
Originally Posted by
pacdad
ok, i've beaten my head over this, and I just can't figure out how to get my NEW page from the generator to show up on the site, in the sidebox on the right that says, Additional Information, and instead of page 2, page 3, etc.
www.div8hardware.com
I've created a page called "define_lock_functions.php", and it IS showing up under the TOOLS>DEFINE PAGES EDITOR, and yes i can edit THAT. It is NOT showing up on CONFIG>DEFINE PAGE STATUS. How do I get this to show up?
Also, can anyone tell me how to change the name of the pages that show up on that sidebox?
Pages will not show up in CONFIG>DPS. To change the name of the side box, find the php file. I don't do sideboxes but I wanted to put them in the header, I just had to find the tpl_header.php file to change the link in the header. I added this to the php file:
<li><?php echo '<a href="' . zen_href_link(FILENAME_ABOUT_US, '' ) . '">About Us</a>'; ?></li>
where the red text is the name that appears in the header. :cool:
-
Re: Define Pages Generator - Support
Quote:
Originally Posted by
Oakwood
Pages will not show up in CONFIG>DPS.
Thanks for replying Oakwood.
Actually the PAGES do show up in the DPS, it's how you turn them on and off, add/remove the links/text. I'm not trying to change the HEADER of the sideboxes, that I know how to do. It's turning the new created pages on so they'll show up IN the sidebox, and renaming the existing pages in there (and the DPS) that I'm trying to accomplish. Any more thoughts?
-
Re: Define Pages Generator - Support
I was reffering to the header bar (maybe its called nav bar?) at the top (home, log in, etc). I am no pro but I would assume if you found the php file for the sideboxes that you were looking for and implemented that code it would work. I dont know where to tell you to look for the php file because I dont use sideboxes.
Hope that helps.
-
Re: Define Pages Generator - Support
hi,
I have been reading this topic as good as possible, but i still have a question i would like to ask:
i am using the define pages generator (it's great!) to make pages i want to add to the information sidebox. I have put the files in the correct directories and i can see the files in de editor.
I have read a lot of adding pages to a header but how to add the pages to the information box?
what file to change? and what's the code? Can someone give the answer to my questions? That would be great.
e.a. i have a file bedrijven.php what's the line to add to the file(s) i have to change?
-
Re: Define Pages Generator - Support
Quote:
Originally Posted by
khopek
This generator is amazing. I was sitting here forever individually changing names. Only problem is the new pages aren't showing up in Configuration-->Define Page Status and they also aren't showing up in my Information Sidebox. I did alter the information.php file to include my new pages.
hello Khopek and Anno,
i'm new comer in zen-cart. To add the new define page to Define Page Status, you must execute this SQL command in your database (you can use phpmyadmin) :
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 (
'Name of your Form', 'DEFINE_NAME_OF_YOUR_FORM_STATUS', '1', 'Enable Name of Your Form 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', '84', now( ) , now( ) , NULL , 'zen_cfg_select_option(array(\'0\', \'1\', \'2\', \'3\'),');
notes :
- change name_of_your_form with the name of your form
- if you use prefix for the table, i.e : 'zen_', then change the table configuration with zen_configuration in SQL command above
To add your new define page in sidebox, you must edit the sidebox file. For example, open your includes/modules/sideboxes/information.php. Add these lines to your information.php under unset($information); :
if (DEFINE_NAME_OF_YOUR_FORM_STATUS <= 1) {
$information[] = '<a href="' . zen_href_link(FILENAME_NAME_OF_YOUR_FORM) . '">' . BOX_INFORMATION_NAME_OF_YOUR_FORM . '</a>';
}
note :
- also change name_of_your_form with the name of your form
save the file and refresh your Online Catalog.
regards,
siyam junianto
-
Re: Define Pages Generator - Support
banswidthjunkie I just think this app is better then sliced bread it saves so much time.
As a small give back I am posting this snippet of code I use for custom define page meta tags.
I was in need of real meta tags for my Define Pages so I have
come up with this small snippet of code to allow custom meta tags for
all of my define pages. I am using it with v1.3.8
How to setup:
If you are NOT using an overwrite meta_tags file then
copy /includes/modules/meta_tags.php to your /includes/modules/YOUR_TEMPLET/meta_tags.php if you are
then just open /includes/modules/YOUR_TEMPLET/meta_tags.php to edit.
Find: Around Line 336
PHP Code:
// NO "break" here. Allow defaults if not overridden at the per-page level
default:
define('META_TAG_TITLE', (defined('NAVBAR_TITLE') ? NAVBAR_TITLE . PRIMARY_SECTION : '') . TITLE . TAGLINE);
define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . (defined('NAVBAR_TITLE') ? NAVBAR_TITLE : '' ) . SECONDARY_SECTION . KEYWORDS);
define('META_TAG_KEYWORDS', KEYWORDS . METATAGS_DIVIDER . (defined('NAVBAR_TITLE') ? NAVBAR_TITLE : '' ) );
}
Replace with:
PHP Code:
// NO "break" here. Allow defaults if not overridden at the per-page level
default:
/********************************************************************
*
* Define Pages Meta Tags SkipWater 08.08.08
* Due to unknown page names we look for DESCRIPTION_DEFINE_PAGE
* To setup add your meta tag values to:
* /includes/languages/english/YOUR_TEMPLET/define_page_file_name.php
* define('TITLE_DEFINE_PAGE', (defined('NAVBAR_TITLE') ? NAVBAR_TITLE . PRIMARY_SECTION : '') . TITLE); // use as default or change
* define('DESCRIPTION_DEFINE_PAGE','Your Description Here');
* define('KEYWORDS_DEFINE_PAGE','Your Keywords Here');
* If you do not want to use Define Page Custom Meta Tags
* do not declare them in your /includes/languages/english/YOUR_TEMPLET/define_page_file_name.php file.
*
********************************************************************/
if (defined('DESCRIPTION_DEFINE_PAGE')){
define('META_TAG_TITLE', TITLE_DEFINE_PAGE);
define('META_TAG_DESCRIPTION', DESCRIPTION_DEFINE_PAGE);
define('META_TAG_KEYWORDS', KEYWORDS_DEFINE_PAGE);
} else {
define('META_TAG_TITLE', (defined('NAVBAR_TITLE') ? NAVBAR_TITLE . PRIMARY_SECTION : '') . TITLE . TAGLINE);
define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . (defined('NAVBAR_TITLE') ? NAVBAR_TITLE : '' ) . SECONDARY_SECTION . KEYWORDS);
define('META_TAG_KEYWORDS', KEYWORDS . METATAGS_DIVIDER . (defined('NAVBAR_TITLE') ? NAVBAR_TITLE : '' ) );
}
}
Now to add meta tags to your define page open
/includes/languages/english/YOUR_TEMPLET/define_page_file_name.php
Find:
PHP Code:
// This is used to display the heading and the navigation bar
define('NAVBAR_TITLE', 'title');
define('HEADING_TITLE', 'heading title');
add below it:
PHP Code:
// This is used for custom define page meta tags
define('TITLE_DEFINE_PAGE', (defined('NAVBAR_TITLE') ? NAVBAR_TITLE . PRIMARY_SECTION : '') . TITLE); // use as default or change
define('DESCRIPTION_DEFINE_PAGE','Your Description Here');
define('KEYWORDS_DEFINE_PAGE','Your Keywords Here');
Thanks Again:clap:
Skip
-
Re: Define Pages Generator - Support
Hello
I downloaded this mod and Iam trying to use to generate links in my items description for extra information regarding these items for example sample Installed item or Available options, Now My problem is locating the Directory, Iam not sure I understand what you mean by Directory in this File. I tried to use the browse button and was able to create files on my desktop, but when i type in the link of where I want these files to be create i get a message Directory does not exist. Iam typing in www.coolcarpartsonline.com/dev/info/pages which is where I want to create these pages. Please can you explain more about the "directory".
Would this work for my application????
"Creating pages to have link to into my product description."
-
Re: Define Pages Generator - Support
I'm wondering if there is any update necessary for version 1.3.8 for this "meta-module"?
This is an excellent tool. I'm almost afraid I might get carried away and add too many pages to my site, lol.
Thanks for this.
-
Re: Define Pages Generator - Support
Quote:
Originally Posted by
mafiasam
I'm wondering if there is any update necessary for version 1.3.8 for this "meta-module"?
This is an excellent tool. I'm almost afraid I might get carried away and add too many pages to my site, lol.
Thanks for this.
If you are asking about the code I posted No this code should work in all 1.3x versions.
Skip
-
Re: Define Pages Generator - Support
Using 1.3.8
I used the generator to build a SPONSORS page.
I have uploaded the files and checked them a half dozen times. The page actually shows up in the define pages editor and I am able to make changes to it there but the page is completely blank except for the Title.
http://oldwestpokersupplies.com/inde..._page=sponsors
or
http://oldwestpokersupplies.com/sponsors.html
All the files and folders have the correct file attributes. I've done this before but since I upgraded to 1.3.8 I think this is my first time adding a page. I'm just wondering what I am missing.
Does anyone have any ideas?
Salvatore
-
Re: Define Pages Generator - Support
just checked your site but looks like you've got it working now... :clap: