Pages (2):    1 2
Member
Member
sbillard   04-08-2014, 00:19
#11

These are correctly represented titles. While the titles without the language elements will work, Zenphoto will never create them that way.

So the real question is how you are outputting the title. If you are using the normal Zenphoto functions you should see normal text. If you are directly using the database you will have to process the data properly. There is a function to do so called getLanguageString().

Member
Member
digheal   04-08-2014, 13:09
#12

Thank you very much for your response. I should have mentioned that everything appears fine within the ZP galleries, etc. I am doing a direct manual PHP query against the database for another part of my site, which would explain why I am getting the extra characters. Here's what I am doing:

$result = mysql_query("SELECT filename, title FROM.imagesWHERE albumid = 5") or trigger_error(mysql_error());

Is getLanguageString a PHP or a ZP function? I haven't been able to find anything about this command for ZP or PHP.

Administrator
Administrator
acrylian   04-08-2014, 13:20
#13

Quite important information actually! Of course getLanguageString is a ZP specific function because that kind of storage belongs to the multilingual capabilities.

Of course direct mysql queries can bypass ZP functionality like this or for example rights management. A recommended way would be the "Zenphoto as a plugin" way on our user guide so you can use the actual object model (if possible on your site): http://www.zenphoto.org/news/integration-with-existing-sites-and-other-cms

Besides that what you see is just a seralized string. There are standard php functions to unserialize it and use it as a normal array.

Member
Member
digheal   04-08-2014, 14:15
#14

I'm actually using the queries to output HTML files that I PHP include in with a separate mobile theme I purchased. So, ZP powers my main site and I grab filenames and titles from the database to turn this:

$result = mysql_query("SELECT filename, title FROM.imagesWHERE albumid = 5") or trigger_error(mysql_error());

`
while ($row = mysql_fetch_array($result)) {
echo "

[*][img]images/boston_rockshots/peterbuzzelle.jpg[/img]`

I'll check the Zenphoto as plugin thing. Thanks again.

Pages (2):    1 2
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.