Member
Member
pled   2009-06-13, 18:05
#1

Hello,

I have upgraded my local zenphoto album from 1.2.3 to 1.2.5.
On my local [b]wordpress[/b] blog, I use a heading.php file to display a random banner taken from the album.
The content of the heading.php file was provided here :
http://www.zenphoto.org/support/topic.php?id=2639
and works fine.

After upgrade, I get the following message (note the random image is displayed) :

Notice: Use of undefined constant silent - assumed 'silent' in /var/www/wordpress/zenphoto/themes/testing-dev/heading.php on line 4

The line 4 and next are like below :

`

if (is_null($randomImage) || checkforPassword(silent)) {

$randomImage= new Image(new Album(new Gallery(), ''), 'zen-logo.jpg' );

}

`

Should I change something in the heading.php because of version 1.2.5 ? I would like to fix this before upgrading the on-line album.

Thanks and regards,
pled

Administrator
Administrator
acrylian   2009-06-13, 18:13
#2

Try newImage(...) instead of new Image(). The testing-dev theme is quite outdated.

Member
Member
pled   2009-06-13, 18:51
#3

acrylian,

Tried, but same message. Tried with Effervescence theme, and I still get the same.

Seems more related to usage of checkforPassword(silent), isn't it ?
Should silent be defined ? As I access zenphoto from wordpress, through heading.php file ?

Member
Member
sbillard   2009-06-13, 19:02
#4

The error is in the lines you quote above. silent is apparently not defined. Anyway, you should probably just pass true as the parameter. Not much sense in defining silent=true. You still should use the newImage() function as acrylian notes.

Administrator
Administrator
acrylian   2009-06-13, 19:05
#5

Probably a typo as $silent is the parameter to pass:
http://www.zenphoto.org/documentation/functions/_template-functions.php.html#functioncheckforPassword

Member
Member
pled   2009-06-14, 09:36
#6

perfect : using 'true' as the parameter solves the problem. Lines are now :

`

if (is_null($randomImage) || checkforPassword(true)) {

$randomImage= newImage(new Album(new Gallery(), ''), 'zen-logo.jpg' );

}

`

Thank you for your great support.
pled

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.