Hello,
I'm trying to insert the contact form in the news.php page and at the beginning, it works.
`
<?php<br />
if (getNewsTitle()=="Contact"){
printContactForm();
}
?>
`
Problems begins when you read the labels in front of each field(they stay in english heaven if the locale is not). "Gettexts" don't work (where they are in the form.php file).
But, heaven worth, when you try to post (clicking on the send mail button) a fatal error appear : Fatal error: Call to undefined function: getbarenewstitle() in /homepages/36/d227878220/htdocs/themes/highslide/news.php on line 5.
This function is part of the news.php breadcrumb.
Has somebody met this problem ?
Tx a lot everybody and especialy the dev team for their great work on zp !
Starcrouz
Comments
Regarding the field names. I can reproduce this. There is still an unsolved problem with using different translation files. The reason for this is that the contact forms translation is included in the main Zenphoto translation files while the Zenpage-default theme (if you use that) has it's own since it is separate and therefore not included in the main Zenphoto translation files.
Regarding getbarenewstitle(). I think we had one report about that before but I can't reproduce it. Please post some details like php version etc.
thanks for trying to solve this little bug.
I try the codeblock function in order to remove my "if" (I had to add a `<?php printCodeblock(1); ?>` ). It changed nothing, but the if. Fatal error: Call to undefined function: getbarenewstitle().
I use news instead of pages in order to group my news by categories. With categories, I was able to build a menu on top of the site ( You can see it here : http://www.blancetdecore.fr ). It is exact I hack a little bit the concept of news pages because for me news are pages (no news inside !), but I think I had no choice.
About translation files, I'll try to compare translation files from the 2 different locations, thx for the information.
Regarding my main problem (getbarenewstitle()), your are right, one have a very close problem : http://www.zenphoto.org/support/topic.php?id=4101 with contact_form and a zenpage page.php.
If it can be of any help, this is my phpinfo() :
Interessting use of the news. Actually you could have used the pages for that, too, since they can be nested. I would think that that would be more convenient to use. But well, that's what Zenpage is about, use as you feel it's the best for you...:-)
But you gave me the idea that in one of the next versions Zenpage should be able to reflect the page nesting in the breadcrumb with its parent pages instead of just showing the page title. I'll put that on the list.
I'll find a way, no pb.
About pages, I was not aware it was possible nesting them. It was written on top of the page editor, right (I never read explanations, sorry) , but the way it is possible to do it(in zp-core, with drag & drop) is too much weird I think, to be understood easily. Maybe a question when you create a page (sort of "would you like to put this new page inside one of the existing pages ?") should inform better, if I may suggest ?
And about the nesting itself, how do you manage to know which page is in which ? I don't find the method to do it... getPage don't tell it.
Thank you for all the informations.
Starcrouz
The nesting itself is made with two methods:
1. Each page has an id and if a sub page a parentid that is the id of the direct parent.
2. Each page has a sort order attached that reflects the level and position like this:
0 (top level page 1)
0-0 (first sub level page)
0-1 (second sub level page)
0-1-1 (first sublevel page of the second sublevel page)
1 (second top level page)
1-0 (first sublevel page to the 2nd top level page)
and so on.
This setup is already there by the jQUery function I adapted for sorting. You get the info about both the current page with this two template functions `getPageSortoder()` or `getPageParentID()`. Or you use the `$current_zenpage->getPages()` to get the full array of all pages to check.
I have a breadcrumb function for pages on my list (and already started) but it is too late to go into the 1.0.1 (bugfix) release of Zenpage that is scheduled for today/tomorrow (European/US-time zone difference) because of feature freeze.
If you work a lot with the class methods be aware that Zenpage will be internally reworked after this release so some things will change regarding that in the next version.