Member
Member
LondonLight.org   2014-04-15, 16:14
#1
Hey!

I'm using 1.4.6-BETA [4196c58634].

I made my own theme, and I followed your theming tutorial which links to:
https://github.com/zenphoto/DevTools/blob/master/demo_plugin-and-theme/demo_theme-basic-files/image.php

This page has the following line to display the image:
`<a href="<?php echo html_encode($fullimage);?>"` (...)
When I paste that into my image.php, I get the following error instead of the actual link:
> Notice: Zenphoto processed a 404 error on /zp/Macro/
> Notice: Undefined variable: fullimage in /var/www/localhost/htdocs/zp/themes/gold/image.php on line 58
> . See the debug log for details. in /var/www/localhost/htdocs/zp/zp-core/functions.php on line 1929
> Zenphoto Error: the requested object was not found.
> Album: Macro/Notice Undefined variable fullimage in /var/www/localhost/htdocs/zp/themes/gold/image.php on line 58

Now if I add "$fullimage = getFullImageURL();" before that, it works fine, however your theming tutorial does not mention this, which is why I'm writing here. If this is an omission in the latest code, then please treat this as a bug report, otherwise please explain what I failed to include in my php :]

Here is the full code of my image.php:
http://bpaste.net/show/8EZu2cUlRk1h54wsyPpL/

Kind regards
Administrator
Administrator
acrylian   2014-04-15, 16:33
#2
Of course a variable needs to have assigned a value in PHP to be valid and existing. This is clearly a typo in the demo file. It should be actually:
`<a href="<?php echo html_encode(getFullImageURL());?>`

Update: It has been corrected now.
Member
Member
LondonLight.org   2014-04-15, 16:36
#3
Glad to be of service :]
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.