Closed timnarr closed 9 years ago
Hi Tim, When did you download kirbygram? Also can you let me know what version of PHP you are running?
5 minutes ago and I'm using PHP 5.3
Hi Tim,
There is currently an open issue for backporting to 5.3, I'll get it sorted out for you as soon as I can.
If it only affects the php version then I can change it... KirbyGram should work with 5.4, right? Thank you for your quick help :-)
It should be fine with 5.4, I'm just making some final changes to fix compat with 5.3 now, its up to you if you want to upgrade though :)
No Problems, any further questions just ask :)
If you are able to test, There is an updated version available on the branch feature-backcompat:
https://github.com/PWesterdale/KirbyGram/tree/feature-backcompat
That should hopefully work in 5.3
wow, you're on fire :-) jip, this works for me. no blank page, or errors so far
Excellent, let me know when you are happy, and I'll close this out and get the repository up to date - Thanks for your help testing it :)
hm, don't get it work. With my current code images aren't displayed.
<?php foreach($instagram->feed()->limit(6)->get() as $image): ?>
<img src="<?php echo $image->thumbnail() ?>" alt="" width="640" height="640" />
<?php endforeach ?>
try putting
<?php $instagram = new Instagram(); ?>
above your foreach loop
Did that fix your issue @TimGr?
Thank you. Yes it works now :-)
I have noticed a few things. -caption() works fine -likes() outputs only "1" -tags() outputs only "array"
Is there a way to add a link to the image.. I mean not the src-link. Just a link to the image on the instagram page.
Thank you for your time!
likes() is to output the amount of times the photo displayed has been liked on Instagram, has the photo been liked more than once? tags() is supposed to be an array, you can display the individual tags by doing a further foreach loop:
foreach($image->tags() as $tag){
echo $tag;
}
You can retrieve the image url by using the following:
$image->raw()->link
I'll be adding that as a function in the future, but that will work for you now :)
yes, one image has 45 likes, the next one 15 likes...
image url is working great now :)
<?php $instagram = new Instagram(); ?>
<?php foreach($instagram->feed()->limit(6)->get() as $image): ?>
<div class="item width-16 instagramimages">
<a href="<?php echo $image->raw()->link ?>">
<img src="<?php echo $image->max() ?>" alt="" width="640" height="640" />
<div class="caption fade-caption">
<span><?php echo $image->likes() ?></span>
</div>
</a>
</div>
<?php endforeach ?>
Tim can you send me a copy of your config.json file in the /plugins/kirbygram directory. Please send it to my e-mail address:
paul@westerdale.me
I can debug with your image set then.
Is on the way :)
Hey Tim,
If you grab an update version of the code, all should be well now.
Yes! everything works fine now :-) Thank you very much, Paul. And again, thank you for taking the time!
No Problem, thanks for helping me improve it :+1:
Hi @PWesterdale I want to use kirbygram, but got an blank page... only by copy the files to my plugin folder. The header responses with an "500 Internal Server Error".