New Man New Man - 1 year ago 67
PHP Question

Echo php image gallery

I used to parse gallery, but not working. I need help!

My code:

<div data-nanogallery2='{
"itemsBaseURL": "",
"thumbnailWidth": "auto",
"thumbnailHeight": "auto",
"thumbnailDisplayInterval": 30,
"thumbnailLabel": {
"display": false
"displayBreadcrumb": false,
"breadcrumbAutoHideTopLevel": false,
"breadcrumbOnlyCurrentLevel": false,
"thumbnailOpenImage": false

<?php foreach($arr_img as $img) { ?>
<a href="#" data-ngthumb="<?php echo $img; ?>"></a>
<?php } ?>


It show, but all echo
are in 1 line like this:

enter image description here

Help me, how to fix, thanks!

Answer Source

The framework you chosed works for self hosted images. You try to work with external flickr links, the syntax here ii a liitle bit different e.g.

<div data-nanogallery2='{
        "userID": "[email protected]", //User-Id
        "kind": "flickr", //Content type, google images is also supported
        "photoset": "72157675715292251", //The set of photos you want
        "thumbnailWidth": "200",
        "thumbnailDisplayInterval": 30

The best will be if you read the official documentation to implement your pictures:

If you want just specific images you can do this by working with the whiteList attribute.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download