ZenphotoCMS Forum
including contact_form in the news page - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: Plugins (https://forum.zenphoto.org/forum-6.html)
+--- Thread: including contact_form in the news page (/thread-4112.html)



including contact_form in the news page - starcrouz - 24-11-2008

Hello,

I'm trying to insert the contact form in the news.php page and at the beginning, it works.
`

`
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




including contact_form in the news page - acrylian - 24-11-2008

You could also use the codeblock function to include the contact form on a specific page. Also I would use a page instead of a news article.

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.




including contact_form in the news page - starcrouz - 25-11-2008

Hi Acrylian,

thanks for trying to solve this little bug.

I try the codeblock function in order to remove my "if" (I had to add a `` ). 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() :

Quote:PHP Version 4.4.9

System Linux infong 2.4 #1 SMP Tue Dec 18 22:34:10 UTC 2007 i686 GNU/Linux
Build Date Aug 12 2008 13:27:58
Configure Command '../configure' '--with-pear=/usr/lib/php' '--prefix=/usr' '--with-mysql=/usr/' '--with-zlib' '--enable-debug=no' '--enable-safe-mode=no' '--enable-discard-path=no' '--with-gd' '--with-png-dir' '--enable-track-vars' '--with-db' '--with-gdbm' '--enable-force-cgi-redirect' '--with-ttf' '--enable-ftp' '--with-mcrypt' '--enable-dbase' '--enable-memory-limit' '--enable-calendar' '--enable-wddx' '--with-jpeg-dir' '--enable-bcmath' '--enable-gd-imgstrttf' '--enable-shmop' '--enable-mhash' '--with-mhash' '--with-openssl' '--enable-xslt' '--with-xslt-sablot' '--with-dom' '--with-dom-xslt' '--with-dom-exslt' '--with-imap' '--with-curl' '--with-iconv' '--with-freetype-dir' '--with-bz2' '--with-gettext' '--enable-exif' '--with-idn' '--enable-mbstring=all' '--with-kerberos' '--with-imap-ssl' '--with-sqlite' '--with-zip'
Server API CGI
Virtual Directory Support disabled
Configuration File (php.ini) Path /usr/lib/php.ini
PHP API 20020918
PHP Extension 20020429
Zend Extension 20050606
Debug Build no
Zend Memory Manager enabled
Thread Safety disabled
Registered PHP Streams php, http, ftp, https, ftps, compress.bzip2, compress.zlib

This program makes use of the Zend Scripting Language Engine:
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

PHP Credits

Configuration

PHP Core

Directive Local Value Master Value
allow_call_time_pass_reference On On
allow_url_fopen On On
always_populate_raw_post_data Off Off
arg_separator.input & &
arg_separator.output & &
asp_tags Off Off
auto_append_file no value no value
auto_prepend_file no value no value
browscap /usr/lib/browscap.ini /usr/lib/browscap.ini
default_charset no value no value
default_mimetype text/html text/html
define_syslog_variables Off Off
disable_classes no value no value
disable_functions no value no value
display_errors On On
display_startup_errors Off Off
doc_root no value no value
docref_ext no value no value
docref_root no value no value
enable_dl On On
error_append_string no value no value
error_log no value no value
error_prepend_string no value no value
error_reporting 2037 2037
expose_php On On
extension_dir /usr/lib/php/extensions/no-debug-non-zts-20020429 /usr/lib/php/extensions/no-debug-non-zts-20020429
file_uploads On On
gpc_order GPC GPC
highlight.bg #FFFFFF #FFFFFF
highlight.comment #FF8000 #FF8000
highlight.default #0000BB #0000BB
highlight.html #000000 #000000
highlight.keyword #007700 #007700
highlight.string #DD0000 #DD0000
html_errors On On
ignore_repeated_errors Off Off
ignore_repeated_source Off Off
ignore_user_abort Off Off
implicit_flush Off Off
include_path .:/usr/lib/php .:/usr/lib/php
log_errors Off Off
log_errors_max_len 1024 1024
magic_quotes_gpc On On
magic_quotes_runtime Off Off
magic_quotes_sybase Off Off
max_execution_time 50000 50000
max_input_nesting_level 500 500
max_input_time -1 -1
memory_limit 40M 40M
open_basedir no value no value
output_buffering 0 0
output_handler no value no value
post_max_size 8M 8M
precision 14 14
register_argc_argv On On
register_globals On On
report_memleaks On On
safe_mode Off Off
safe_mode_exec_dir /usr/local/php/bin /usr/local/php/bin
safe_mode_gid Off Off
safe_mode_include_dir no value no value
sendmail_from no value no value
sendmail_path /usr/sbin/sendmail -t -i /usr/sbin/sendmail -t -i
serialize_precision 100 100
short_open_tag On On
SMTP localhost localhost
smtp_port 25 25
sql.safe_mode Off Off
track_errors Off Off
unserialize_callback_func no value no value
upload_max_filesize 20M 20M
upload_tmp_dir no value no value
user_dir no value no value
variables_order no value no value
xmlrpc_error_number 0 0
xmlrpc_errors Off Off
y2k_compliance On On

bcmath

BCMath support enabled

bz2

BZip2 Support Enabled
BZip2 Version 1.0.3, 15-Feb-2005

calendar

Calendar support enabled

ctype

ctype functions enabled

curl

CURL support enabled
CURL Information libcurl/7.15.5 OpenSSL/0.9.8c zlib/1.2.3 libidn/0.6.5

db

GDBM version 1.8.3. 10/15/2002 (built Apr 24 2006 03:25:20)

dba

DBA support enabled
Supported handlers gdbm cdb cdb_make inifile flatfile

domxml

DOM/XML enabled
DOM/XML API Version 20020815
libxml Version 20632
HTML Support enabled
XPath Support enabled
XPointer Support enabled
DOM/XSLT enabled
libxslt Version 1.1.24
libxslt compiled against libxml Version 2.6.27
DOM/EXSLT enabled
libexslt Version 1.1.19

exif

EXIF Support enabled
EXIF Version 1.4 $Id: exif.c,v 1.118.2.37.2.8 2007/12/31 07:22:46 sebastian Exp $
Supported EXIF Version 0220
Supported filetypes JPEG,TIFF

ftp

FTP support enabled

gd

GD Support enabled
GD Version bundled (2.0.28 compatible)
FreeType Support enabled
FreeType Linkage with freetype
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled

gettext

GetText Support enabled

iconv

iconv support enabled
iconv implementation glibc
iconv library version 2.3.6

Directive Local Value Master Value
iconv.input_encoding ISO-8859-1 ISO-8859-1
iconv.internal_encoding ISO-8859-1 ISO-8859-1
iconv.output_encoding ISO-8859-1 ISO-8859-1

idn

IDN support enabled
RCS Version $Id: idn.c,v 0.31 2004/12/18 15:38:43 turbo Exp $
LibIDN version 0.6.5

Directive Local Value Master Value
idn.allow_unassigned_chars 0 0
idn.default_charset ISO-8859-1 ISO-8859-1
idn.use_std_3_ascii_rules 0 0

imap

IMAP c-Client Version 2001
SSL Support enabled
Kerberos Support enabled

mbstring

Multibyte Support enabled
Japanese support enabled
Simplified chinese support enabled
Traditional chinese support enabled
Korean support enabled
Russian support enabled
Multibyte (japanese) regex support enabled

mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1.

Directive Local Value Master Value
mbstring.detect_order no value no value
mbstring.encoding_translation Off Off
mbstring.func_overload 0 0
mbstring.http_input pass pass
mbstring.http_output pass pass
mbstring.internal_encoding ISO-8859-1 no value
mbstring.language neutral neutral
mbstring.substitute_character no value no value

mcrypt

mcrypt support enabled
version >= 2.4.x
Supported ciphers cast-128 gost rijndael-128 twofish arcfour cast-256 loki97 rijndael-192 saferplus wake blowfish-compat des rijndael-256 serpent xtea blowfish enigma rc2 tripledes
Supported modes cbc cfb ctr ecb ncfb nofb ofb stream

Directive Local Value Master Value
mcrypt.algorithms_dir no value no value
mcrypt.modes_dir no value no value

mhash

MHASH support Enabled
MHASH API Version 20060101

mysql

MySQL Support enabled
Active Persistent Links 0
Active Links 0
Client API version 5.0.32
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /var/run/mysqld/mysqld.sock
MYSQL_INCLUDE -I/usr//include/mysql
MYSQL_LIBS -L/usr//lib -lmysqlclient

Directive Local Value Master Value
mysql.allow_persistent On On
mysql.connect_timeout 60 60
mysql.default_host no value no value
mysql.default_password no value no value
mysql.default_port no value no value
mysql.default_socket no value no value
mysql.default_user no value no value
mysql.max_links Unlimited Unlimited
mysql.max_persistent Unlimited Unlimited
mysql.trace_mode Off Off

openssl

OpenSSL support enabled
OpenSSL Version OpenSSL 0.9.8c 05 Sep 2006

overload

User-Space Object Overloading Support enabled

pcre

PCRE (Perl Compatible Regular Expressions) Support enabled
PCRE Library Version 7.7 2008-05-07

posix

Revision $Revision: 1.51.2.4.2.4 $

session

Session Support enabled
Registered save handlers files user

Directive Local Value Master Value
session.auto_start Off Off
session.bug_compat_42 On On
session.bug_compat_warn On On
session.cache_expire 180 180
session.cache_limiter nocache nocache
session.cookie_domain no value no value
session.cookie_lifetime 0 0
session.cookie_path / /
session.cookie_secure Off Off
session.entropy_file no value no value
session.entropy_length 0 0
session.gc_divisor 100 100
session.gc_maxlifetime 1440 1440
session.gc_probability 1 1
session.name PHPSESSID PHPSESSID
session.referer_check no value no value
session.save_handler files files
session.save_path /tmp /tmp
session.serialize_handler php php
session.use_cookies On On
session.use_only_cookies Off Off
session.use_trans_sid Off Off

shmop

shmop support enabled

sqlite

SQLite support enabled
PECL Module version 1.0.3 $Id: sqlite.c,v 1.62.2.25 2004/07/10 12:25:33 wez Exp $
SQLite Library 2.8.14
SQLite Encoding UTF-8

Directive Local Value Master Value
sqlite.assoc_case 0 0

standard

Regex Library Bundled library enabled
Dynamic Library Support enabled
Path to sendmail /usr/sbin/sendmail -t -i

Directive Local Value Master Value
assert.active 1 1
assert.bail 0 0
assert.callback no value no value
assert.quiet_eval 0 0
assert.warning 1 1
auto_detect_line_endings 0 0
default_socket_timeout 60 60
safe_mode_allowed_envvars PHP PHP_
safe_mode_protected_env_vars LD_LIBRARY_PATH LD_LIBRARY_PATH
url_rewriter.tags a=href,area=href,frame=src,form=fakeentry,fieldset= a=href,area=href,frame=src,form=fakeentry,fieldset=
user_agent no value no value

tokenizer

Tokenizer Support enabled

wddx

WDDX Support enabled
WDDX Session Serializer enabled

xml

XML Support active
XML Namespace Support active
EXPAT Version 1.95.6

xslt

XSLT support enabled
Backend Sablotron
Sablotron Version 1.0.3
Sablotron Information Cflags: -Wall -g -D_REENTRANT Libs: -L/usr/lib -lexpat Prefix: /usr

zip

Zip support enabled

zlib

ZLib Support enabled
Compiled Version 1.2.3
Linked Version 1.2.3

Directive Local Value Master Value
zlib.output_compression Off Off
zlib.output_compression_level -1 -1
zlib.output_handler no value no value

Additional Modules

Module Name
dbase

Environment

Variable Value
DBENTRY /kunden/homepages/36/d227878220/htdocs:d0000#CPU 6 #MEM 10240 #CGI 94 #NPROC 12 #TAID 47491439 #WERB 0 #LANG 2 #STAT 1
DOCUMENT_ROOT /kunden/homepages/36/d227878220/htdocs
HTTP_ACCEPT text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,/;q=0.5
HTTP_ACCEPT_CHARSET ISO-8859-1,*,utf-8
HTTP_ACCEPT_ENCODING gzip,deflate,bzip2
HTTP_ACCEPT_LANGUAGE fr-FR,fr,en-US,en
HTTP_CONNECTION Keep-Alive
HTTP_COOKIE PHPSESSID=3c32b70654f7cc76bfcdb39ca2f41e42; zenphoto_auth=b452ea54ad234b0c3c0f6e9de5758c0c
HTTP_HOST www.blancetdecore.fr
HTTP_USER_AGENT Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Chrome/0.3.154.9 Safari/525.19
PATH /bin:/usr/bin
REDIRECT_DBENTRY /kunden/homepages/36/d227878220/htdocs:d0000#CPU 6 #MEM 10240 #CGI 94 #NPROC 12 #TAID 47491439 #WERB 0 #LANG 2 #STAT 1
REDIRECT_SCRIPT_URI http://www.blancetdecore.fr/test/toto.php
REDIRECT_SCRIPT_URL /test/toto.php
REDIRECT_STATUS 200
REDIRECT_UNIQUE_ID SStLDtTjHRoAAHY@Crg
REDIRECT_URL /test/toto.php
REMOTE_ADDR 81.57.128.213
REMOTE_PORT 3610
SCRIPT_FILENAME /kunden/homepages/36/d227878220/htdocs/test/toto.php
SCRIPT_URI http://www.blancetdecore.fr/test/toto.php
SCRIPT_URL /test/toto.php
SERVER_ADDR 87.106.228.131
SERVER_ADMIN webmaster@blancetdecore.fr
SERVER_NAME blancetdecore.fr
SERVER_PORT 80
SERVER_SIGNATURE no value
SERVER_SOFTWARE Apache
UNIQUE_ID SStLDtTjHRoAAHY@Crg
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING no value
REQUEST_URI /test/toto.php
SCRIPT_NAME /test/toto.php
PATH_INFO /test/toto.php
PATH_TRANSLATED /kunden/homepages/36/d227878220/htdocs/test/toto.php
STATUS 200

PHP Variables

Variable Value
PHP_SELF /test/toto.php
_REQUEST["PHPSESSID"] 3c32b70654f7cc76bfcdb39ca2f41e42
_REQUEST["zenphoto_auth"] b452ea54ad234b0c3c0f6e9de5758c0c
_COOKIE["PHPSESSID"] 3c32b70654f7cc76bfcdb39ca2f41e42
_COOKIE["zenphoto_auth"] b452ea54ad234b0c3c0f6e9de5758c0c
_SERVER["DBENTRY"] /kunden/homepages/36/d227878220/htdocs:d0000#CPU 6 #MEM 10240 #CGI 94 #NPROC 12 #TAID 47491439 #WERB 0 #LANG 2 #STAT 1
_SERVER["DOCUMENT_ROOT"] /kunden/homepages/36/d227878220/htdocs
_SERVER["HTTP_ACCEPT"] text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,/;q=0.5
_SERVER["HTTP_ACCEPT_CHARSET"] ISO-8859-1,,utf-8
_SERVER["HTTP_ACCEPT_ENCODING"] gzip,deflate,bzip2
_SERVER["HTTP_ACCEPT_LANGUAGE"] fr-FR,fr,en-US,en
_SERVER["HTTP_CONNECTION"] Keep-Alive
_SERVER["HTTP_COOKIE"] PHPSESSID=3c32b70654f7cc76bfcdb39ca2f41e42; zenphoto_auth=b452ea54ad234b0c3c0f6e9de5758c0c
_SERVER["HTTP_HOST"] www.blancetdecore.fr
_SERVER["HTTP_USER_AGENT"] Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Chrome/0.3.154.9 Safari/525.19
_SERVER["PATH"] /bin:/usr/bin
_SERVER["REDIRECT_DBENTRY"] /kunden/homepages/36/d227878220/htdocs:d0000#CPU 6 #MEM 10240 #CGI 94 #NPROC 12 #TAID 47491439 #WERB 0 #LANG 2 #STAT 1
_SERVER["REDIRECT_SCRIPT_URI"] http://www.blancetdecore.fr/test/toto.php
_SERVER["REDIRECT_SCRIPT_URL"] /test/toto.php
_SERVER["REDIRECT_STATUS"] 200
_SERVER["REDIRECT_UNIQUE_ID"] SStLDtTjHRoAAHY@Crg
_SERVER["REDIRECT_URL"] /test/toto.php
_SERVER["REMOTE_ADDR"] 81.57.128.213
_SERVER["REMOTE_PORT"] 3610
_SERVER["SCRIPT_FILENAME"] /kunden/homepages/36/d227878220/htdocs/test/toto.php
_SERVER["SCRIPT_URI"] http://www.blancetdecore.fr/test/toto.php
_SERVER["SCRIPT_URL"] /test/toto.php
_SERVER["SERVER_ADDR"] 87.106.228.131
_SERVER["SERVER_ADMIN"] webmaster@blancetdecore.fr
_SERVER["SERVER_NAME"] blancetdecore.fr
_SERVER["SERVER_PORT"] 80
_SERVER["SERVER_SIGNATURE"] no value
_SERVER["SERVER_SOFTWARE"] Apache
_SERVER["UNIQUE_ID"] SStLDtTjHRoAAHY@Crg
_SERVER["GATEWAY_INTERFACE"] CGI/1.1
_SERVER["SERVER_PROTOCOL"] HTTP/1.1
_SERVER["REQUEST_METHOD"] GET
_SERVER["QUERY_STRING"] no value
_SERVER["REQUEST_URI"] /test/toto.php
_SERVER["SCRIPT_NAME"] /test/toto.php
_SERVER["PATH_INFO"] /test/toto.php
_SERVER["PATH_TRANSLATED"] /kunden/homepages/36/d227878220/htdocs/test/toto.php
_SERVER["STATUS"] 200
_SERVER["PHP_SELF"] /test/toto.php
_SERVER["argv"]
Array
(
)
_SERVER["argc"] 0
_ENV["DBENTRY"] /kunden/homepages/36/d227878220/htdocs:d0000#CPU 6 #MEM 10240 #CGI 94 #NPROC 12 #TAID 47491439 #WERB 0 #LANG 2 #STAT 1
_ENV["DOCUMENT_ROOT"] /kunden/homepages/36/d227878220/htdocs
_ENV["HTTP_ACCEPT"] text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,
/;q=0.5
_ENV["HTTP_ACCEPT_CHARSET"] ISO-8859-1,
,utf-8
_ENV["HTTP_ACCEPT_ENCODING"] gzip,deflate,bzip2
_ENV["HTTP_ACCEPT_LANGUAGE"] fr-FR,fr,en-US,en
_ENV["HTTP_CONNECTION"] Keep-Alive
_ENV["HTTP_COOKIE"] PHPSESSID=3c32b70654f7cc76bfcdb39ca2f41e42; zenphoto_auth=b452ea54ad234b0c3c0f6e9de5758c0c
_ENV["HTTP_HOST"] www.blancetdecore.fr
_ENV["HTTP_USER_AGENT"] Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Chrome/0.3.154.9 Safari/525.19
_ENV["PATH"] /bin:/usr/bin
_ENV["REDIRECT_DBENTRY"] /kunden/homepages/36/d227878220/htdocs:d0000#CPU 6 #MEM 10240 #CGI 94 #NPROC 12 #TAID 47491439 #WERB 0 #LANG 2 #STAT 1
_ENV["REDIRECT_SCRIPT_URI"] http://www.blancetdecore.fr/test/toto.php
_ENV["REDIRECT_SCRIPT_URL"] /test/toto.php
_ENV["REDIRECT_STATUS"] 200
_ENV["REDIRECT_UNIQUE_ID"] SStLDtTjHRoAAHY@Crg
_ENV["REDIRECT_URL"] /test/toto.php
_ENV["REMOTE_ADDR"] 81.57.128.213
_ENV["REMOTE_PORT"] 3610
_ENV["SCRIPT_FILENAME"] /kunden/homepages/36/d227878220/htdocs/test/toto.php
_ENV["SCRIPT_URI"] http://www.blancetdecore.fr/test/toto.php
_ENV["SCRIPT_URL"] /test/toto.php
_ENV["SERVER_ADDR"] 87.106.228.131
_ENV["SERVER_ADMIN"] webmaster@blancetdecore.fr
_ENV["SERVER_NAME"] blancetdecore.fr
_ENV["SERVER_PORT"] 80
_ENV["SERVER_SIGNATURE"] no value
_ENV["SERVER_SOFTWARE"] Apache
_ENV["UNIQUE_ID"] SStLDtTjHRoAAHY@Crg
_ENV["GATEWAY_INTERFACE"] CGI/1.1
_ENV["SERVER_PROTOCOL"] HTTP/1.1
_ENV["REQUEST_METHOD"] GET
_ENV["QUERY_STRING"] no value
_ENV["REQUEST_URI"] /test/toto.php
_ENV["SCRIPT_NAME"] /test/toto.php
_ENV["PATH_INFO"] /test/toto.php
_ENV["PATH_TRANSLATED"] /kunden/homepages/36/d227878220/htdocs/test/toto.php
_ENV["STATUS"] 200




including contact_form in the news page - acrylian - 25-11-2008

Thanks for posting. I must admit I have no idea about the undefined function though. That function is defined on zenpage-template-functions.php in line 309. Lacking other ideas I suggest to remove that function from your theme files. It does not much more that stripping html tags and some htmlspecialchar encoding if you use a title as a alt=or title= in html tags.

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.




including contact_form in the news page - starcrouz - 01-12-2008

Hi Acrylian,
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




including contact_form in the news page - acrylian - 01-12-2008

Well, not my fault if you don't read explanations..:-) I don't agree, I think generally the way to sort via drag & drop is the most easy, direct and flexible way. Because of that I have not any other option on the page creation itself. But I agree that this should probably at least be written on top of the just created page, too.

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.