Slickr is an easy to template module that displays your flickr photos on your own server.
PHP 5
jQuery. https://github.com/jquery/jquery
Chocolat. https://github.com/nicolas-t/chocolat
recent browsers such as :
IE 7+, Safari, Firefox & Chrome.
cache
Slickr makes heavy use of cache (images & markup).
You'll have to disable it from the admin panel (by setting lifespan to 0) or empty cache the folder after each modifications.
CHMOD 755 the following folders/files:
/cache/
/admin/install.php
config.template.php
disabled.htaccess
run :
admin/install.php
once installed find admin panel here :
yoursite.com/admin/
Structure of the site depends on the homepage chose from the admin.
Latest Upload:
Images
Photosets:
Photosets |--Images
Collections:
Collections |--Collecphotosets |--Images
default template is positif
.
collecphotosets.php:
Template for the photosets inside collections
collections.php:
Template for the collections.
photosets.php:
Template for the photosets.
images.php:
Template for the images.
footer.php:
Template for the footer of every pages.
Slickr use a MVC structure.
-
index.php
is the controller. -
slickr.class.php
is the model. -
your-template/your-page.php
is your view.
$core->createUrl($image,$size) : params : image, size
Param :
- image
array
: the image (as an array returned from the method$slickr->getPhotos()
you want to link to. - size
string
: the size of the image:- `_s` : 75px*75px sqsuare
- `_t` : 100px on the largest side
- `_m` : 240px on the largest side
- `_z` : 640px on the largest side
- `_b` : 1 024px on the largest side
- `_biggest` : look for an original size if available, else takes the biggest size available
Returns :
the url of the image
$slickr->getPhotos() : param : none
Returns :
- images : the photos of the current photoset
- parent : informations about the parent photoset (title & description)
$slickr->getLatestPhotos() : param : none
Returns :
- images : the latest photos you uploaded on flickr
- parent : "Latest Images"
$slickr->getPhotosets() : param : none
Returns :
- collecSets : the different sets in the current collection
- sets : the different sets (when the homepage is set to "Photosets"
- parent : information about the parent collection (title)
$slickr->getCollections() : param : none
Returns :
- collections : the different collections (in the current collection)
- parent : informations about the parent (if exists) collection (title & description)
$cache->saveCache($content) : param : content
Save to cache the html content passed as parameter
return : true|false
$cache->getCache() : param : none
Show the cached content if available
Else start generating new cache for the page.