WayneOPUK
New Member
- Joined
- May 15, 2013
- Messages
- 5
- Lightroom Experience
- Beginner
- Lightroom Version
Hi guys.
After succeeding with working with JSON parsing etc with an earlier project, ive decided to try and integrate my website with some JSON code.
My hosting provider has a limit of 10,000 files on the server, which can soon fill up (000webhost free hosting)
so, ive already created one template (very basic edit) from the original html gallery... so as my own website design is on the gallery, (edit headers footers and css)... i knew to edit the "galleryInfo" file to rename the gallery and ID of it - and thus created my own OPUK gallery.
Now, I want to create a gallery which outputs just a set of text files, in the format of:
so ive edited the gridpages to:
this part works fine... however, I dont want it to output to 5/6/7 differnt files... i want ALL image paths of the album on one file... In addition to that, I dont want the file to be named "index.html" but instead "my choice.json"
anybody know how to make it loop through ALL images on the current collection...
Also, as i will parse the json files with PHP, i dont want it to export the html file either... ive not looked at that... but i assume its something to do with :
in the manifest.lrweb
I dont need any resources to be uploaded...
all i want is:
thumbnails created, "large" images created. (possible to upload "original edited" in full size too?), and the "custom name".json file uploading...
i can manually delete the html files, but i dont want the hassle of this. my plan is to minimise files stored, and only store what i need.
As i use cloudflare, i can utilise serverside modrewrite to make browsers redirect x.com/file/imagename.html to gallery.php?gallery=FILE&image=IMAGENAME and thus still keep the original functionality etc... - but with the obvious flexibility of managing a custom php page too.
anybody know how to do this? (not the php part, the removing the html files and custom naming the index.html to XXX.JSON
After succeeding with working with JSON parsing etc with an earlier project, ive decided to try and integrate my website with some JSON code.
My hosting provider has a limit of 10,000 files on the server, which can soon fill up (000webhost free hosting)
so, ive already created one template (very basic edit) from the original html gallery... so as my own website design is on the gallery, (edit headers footers and css)... i knew to edit the "galleryInfo" file to rename the gallery and ID of it - and thus created my own OPUK gallery.
Now, I want to create a gallery which outputs just a set of text files, in the format of:
Code:
[
{
"numpages": 5,
"images": [
{
"id": "20130427-DSC_1059",
"smallimage": "images/thumb/20130427-DSC_1059.jpg",
"largeimage": "images/large/20130427-DSC_1059.jpg"
},
{
"id": "20130427-DSC_1060",
"smallimage": "images/thumb/20130427-DSC_1060.jpg",
"largeimage": "images/large/20130427-DSC_1060.jpg"
},
{
"id": "20130427-DSC_1064",
"smallimage": "images/thumb/20130427-DSC_1064.jpg",
"largeimage": "images/large/20130427-DSC_1064.jpg"
},
{
"id": "20130428-DSC_1072",
"smallimage": "images/thumb/20130428-DSC_1072.jpg",
"largeimage": "images/large/20130428-DSC_1072.jpg"
},
{
"id": "20130428-DSC_1073",
"smallimage": "images/thumb/20130428-DSC_1073.jpg",
"largeimage": "images/large/20130428-DSC_1073.jpg"
},
{
"id": "20130428-DSC_1074",
"smallimage": "images/thumb/20130428-DSC_1074.jpg",
"largeimage": "images/large/20130428-DSC_1074.jpg"
},
{
"id": "20130428-DSC_1075",
"smallimage": "images/thumb/20130428-DSC_1075.jpg",
"largeimage": "images/large/20130428-DSC_1075.jpg"
},
{
"id": "20130428-DSC_1076",
"smallimage": "images/thumb/20130428-DSC_1076.jpg",
"largeimage": "images/large/20130428-DSC_1076.jpg"
},
{
"id": "20130428-DSC_1077",
"smallimage": "images/thumb/20130428-DSC_1077.jpg",
"largeimage": "images/large/20130428-DSC_1077.jpg"
},
{
"id": "null"
}
]
}
]
so ive edited the gridpages to:
Code:
[{
"numpages": <% =numGridPages %>,
"images": [
<% --[[ Main grid area ]] %>
<lr:ThumbnailGrid>
<% --[[ The grid ]] %>
<lr:GridPhotoCell>
{
"id": "<%= image.exportFilename %>",
"smallimage": "images/thumb/<%= image.exportFilename %>.jpg",
"largeimage": "images/large/<%= image.exportFilename %>.jpg"
},
</lr:GridPhotoCell>
</lr:ThumbnailGrid>
{
"id": "null"
}
]
}]
this part works fine... however, I dont want it to output to 5/6/7 differnt files... i want ALL image paths of the album on one file... In addition to that, I dont want the file to be named "index.html" but instead "my choice.json"
anybody know how to make it loop through ALL images on the current collection...
Also, as i will parse the json files with PHP, i dont want it to export the html file either... ive not looked at that... but i assume its something to do with :
Code:
AddPhotoPages {
template='detail.html',
variant='_large',
destination="content",
}
AddGridPages {
template='grid.html',
rows=model.nonCSS.numRows,
columns=model.nonCSS.numCols,
}
AddCustomCSS {
filename='content/custom.css',
}
I dont need any resources to be uploaded...
all i want is:
thumbnails created, "large" images created. (possible to upload "original edited" in full size too?), and the "custom name".json file uploading...
i can manually delete the html files, but i dont want the hassle of this. my plan is to minimise files stored, and only store what i need.
As i use cloudflare, i can utilise serverside modrewrite to make browsers redirect x.com/file/imagename.html to gallery.php?gallery=FILE&image=IMAGENAME and thus still keep the original functionality etc... - but with the obvious flexibility of managing a custom php page too.
anybody know how to do this? (not the php part, the removing the html files and custom naming the index.html to XXX.JSON