Hi
I did my firt successfull install of 1.4.3 dev.
whouaou ! you have done a wonderfull job : there is a lot of good improvements.
my themes need to be updated, but these are small things, nothing major.
acrylian: zpMobile seems to be good (3 reponsive themes, this is a good thing and users will have the choice between modern themes!)
Comments
Because I tried it last weekend and it didn't install from scratch.
in France, we have this expression "Il ne faut pas vendre la peau de l'ours avant de l'avoir tué", that means "Don't count your chickens before they're hatched" in english...
so, I try to update zpArdoise to 1.4.3 for zenphoto 1.4.3, and I have a big, big headache.
2 functions doesn't work well on my theme, and I go crazy trying to figure out what's wrong
1- <?php printHomeLink('', ' » '); ?> works well on gallery and album, but doesn't work well on other pages (404, archives, contact, image, password, register, search)
in the second case, ' » ' is filtered, and the string is not displayed.
2- <?php printParentBreadcrumb('', ' » ', ' » '); ?>
works well on album, but doesn't work well on image
have a look here
- exemple 1 (ok with printHomeLink) : http://dev.vincentbourganel.fr/20110721-vacances-ete-pays-basque/
- exemple 2 (ko both with printHomeLink and printParentBreadcrumb) : http://dev.vincentbourganel.fr/20110721-vacances-ete-pays-basque/img_5559.jpg.html
what is the problem with these functions or with these characters ?
The Garland theme uses the same function calls and separator characters so I have checked out the situation with it. Sadly, except for a misplaced `
` tag on the archive page everything looks and works correctly.
The only difference in these functions between 1.4.2 and 1.4.3 is that these separator parameters are html encoded before being output. This and the fact that there is NO characters appearing in your HTML where the separators should be leads me to believe there is something wrong with the function calls. Specially if it works on some pages and not on others as the functions themselves CANNOT change in that interval.
See also my test site running 1.4.3-DEV [9950] and the Garland theme with » as separators for both functions:
Album page: http://testalbum.sbillard.org/clocks/
Image page:http: //testalbum.sbillard.org/clocks/Ansonia.jpg.php
Archive page: http://testalbum.sbillard.org/page/archive
I have added this code
<?php echo html_encode(' » '); ?> in each file
as told before, it works on some file, and does'nt work on other file.
I did the same thing on zpmasonry 1.4.2.2 of gjr and the result is the same.
I added this code <?php echo html_encode(' > '); ?>, and it's work fine everywhere.
We use Eclipse as out PHP editor. It has options for the default character set.
I found the option to encode in UTF-8 with NotePad++
But now, after reencode all files, I can't see any " » " on my website !
Of course, I checked the site charset is UTF-8.
[edit] I did find this in the documentation for the htmlspecialchars() function which does the output encoding:
"If the input string contains an invalid code unit sequence within the given encoding an empty string will be returned, unless either the ENT_IGNORE or ENT_SUBSTITUTE flags are set."
We do not set either of these flags, so if the » character representation in your script is not valid the result would be exactly what you are seeing.
I compared the Garland files with mine.
I found a difference in the encoding of files: Garland is encoded with "UTF-8 without BOM" (I do not quite understand the difference between UTF-8).
I tried to encode my files with this mode, and this seems to solve the problem...
I'm still worried: your changes are very stricts and many users will be annoyed with encoding files.
- printPageListWithNav(' « ', ' » ',...)
- printNewsPageListWithNav(' » ', ' « ', ...)
You should also note that the default for the browser header is that the characterset is UTF-8, so even if a theme script tries to display a not-UTF-8 character it will probably fail.
Thank you for pointing out the printPagelist, etc. Those functions should have caused the text to be encoded. This will be corrected in the nightly build. If you find more such instances, please bring them to our attention. It is the intention of the 1.4.3 release that all strings be html encoded prior to being output. This is required for HTML validation.
new theme, new problem.
I try to update zpBootstrap for zenphoto 1.4.3, and I have a new problem with encoded string.
in album.php, I have this code :
`<?php printParentBreadcrumb('', '<span class="divider"> » ', ' » '); ?>`
with 1.4.2, I can easily insert the `` tag (needed for css rules).
how I can do the same thing with 1.4.3 ?
thanks for you help.
for example, in some news, I put words in bold with tags, in the title of the news.
it will not be possible either, I suppose.
We do have a function to parse strings for valid html and encode the rest--that is what is used for news and page content, for instance.
So the choices are:
1. do no encoding--this leaves HTML validation issues
2. encode the string--this means that you cannot pass markup
3. tag_encode the string--this means your gallery slows down.