fanningert / kirby-extension

Plugins and Extensions for Kirby 2.x
1 stars 0 forks source link

Installation fails #1

Closed techkind closed 9 years ago

techkind commented 9 years ago

Dear Thomas,

I was wondering if the script support responsive image resizing. I was not sure what 'width_output' does, so I wanted to try it.

When I put the files in the tags and plugins folders, the homepage is blank. If I remove them again, kirby works again. What is the problem?

Thanks, Phillip

fanningert commented 9 years ago

Have you a php-log (Webserver log) output for me? =r activate the kirby debug message output via config parameter.

http://getkirby.com/blog/quicktip-debug

First question: Did you using Kirby 2.x (latest stable version: 2.0.5)?

Here some info to the options width_output and height_output. When the config parameter kirbytext.image.width_output and/or kirbytext.image.width_output is not changed, the KirbyTag don't print any width or height attribute for the image element. But when you need this attributes you can overwrite the setting via the config parameters or activate it per image via the options for the KirbyTag.

Metadata for issue search: KirbyExtension: Image Version: 0.6

ethanthompson commented 9 years ago

Hi Thomas, I was having the same issue as Phillip. I turned on debugging and got the following error:

Parse error: syntax error, unexpected '=', expecting ')' in .../site/tags/image.php on line 37

Then I removed the tag file and got this error:

Fatal error: Can't use method return value in write context in /home4/jptmedia/public_html/ethanthompson.org/site/plugins/image_helper.php on line 98

fanningert commented 9 years ago

what php version did you have? Because in the line 37 is following code.

if( !empty($value = $tag->attr($name)) )

I am using PHP 5.5.12. I think your version did not support this code syntax. I reduced the needed PHP support with make the code simpler.

Please test the current version. The second error is a little diffcult, I can't find a error at this position in the commit for the version 0.6.

ethanthompson commented 9 years ago

I'm using PHP 5.4.35 and now I'm getting this error:

Parse error: syntax error, unexpected 'if' (T_IF) in .../site/tags/image.php on line 37

fanningert commented 9 years ago

Ok, sorry I forgot a ; at the line 37. Please at it at the end.

fanningert commented 9 years ago

Moved into a own repository for image extension.

https://github.com/fanningert/kirbycms-extension-image/issues/1