Koken – Exif in Lightbox

If you want to add Exif data to your lightbox image overlay on your koken photo website, you can do it easily by editing the default lightbox.css file that can be find in the following path: /app/site/themes/common/css/lightbox.css

Exif will be displayed when you press the “Show caption” button in lightbox.

You can find my edited version of the file in my github:

//github.com/jonathanR79/koken-lightbox-exif/

Or you can edit the file as follow

<div class="caption" style="display:none">
<h3>{{ content.title }}</h3>
&nbsp;
{{ content.caption }}
<br>
<koken:exif>
<koken:not empty="exif.make">
{{ exif.make }}
</koken:not>
<koken:not empty="exif.model">
{{ exif.model }},
</koken:not>
<koken:not empty="exif.exposure">
{{ exif.exposure }},
</koken:not>
<koken:not empty="exif.aperture">
{{ exif.aperture }},
</koken:not>
<koken:not empty="exif.focal_length">
{{ exif.focal_length }},
</koken:not>
<koken:not empty="exif.iso_speed_ratings">
{{ exif.iso_speed_ratings }}
</koken:not>
</koken:exif>
</div>

Free koken plugin selection

For my photography website – jr-photo.be, I use koken CMS as I believe this is the most easy photo CMS on the market.

But koken is nothing without plugins.

Here is my selection of free plugin for koken photo CMS:

Instagram feed  – Eminos

Nice way to display your instagram feed on your Koken website.

E.G: //www.jr-photo.be/pages/instagram/

Email Endpoints – koken.me

Dependable emails via your own SMTP server or Mandrill.

Google Universal Analytics – Daniel Muller Github

Automatically add Google Universal Analytics code to any theme.

HTML Injector – koken.me

Add arbitrary content before the the closing head and body tags.

No Right click – Michael B. Rasmussen

Disable right clicking

Rich snippets and Structured Data for Google Search – Michael B. Rasmussen

Use markup code to add Rich snippets and structured data to your Koken installation. It is highly recommended after inputting the data that you test the script on Google rich snippet test console: //search.google.com/structured-data/testing-tool and upper right corner press new test and type your website url.

Semantic Images – Nikolas Hagelstein

Adds semantic information to images. For e.g. search engines.

With those plugins, you have everything you need for your Photography website. You can check mine on jr-photo.be

Enjoy!

Clean and nice URL for Koken

In order to have your Koken CMS use clean and nice url like //www.jr-photo.be/albums/portrait/ instead of //www.jr-photo.be/index.php?albums/portrait/ you can add rewriting rule in the http conf file of your Koken Photo CMS website.

Be sure to have the mod rewrite enabled (sudo a2enmod rewrite).

The rewriting rules need to be put in the directory part of the conf:

<Directory /var/www/koken/koken>
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /koken
# Pass images requests back to PHP if they do not exist
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} /koken/storage/cache/images(/(([0-9]{3}/[0-9]{3})|custom)/.*)$
RewriteRule . /koken/i.php?path=%1 [L]

# Pass albums requests back to PHP if they do not exist
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} /koken/storage/cache/albums(/([0-9]{3}/[0-9]{3})/.*)$
RewriteCond %{REQUEST_FILENAME} !favicon.ico
RewriteCond %{REQUEST_URI} !pagespeed
RewriteCond %{REQUEST_URI} !favicon.ico
RewriteRule . a.php?path=%1 [L]

# Do not enable path rewriting for files that exist
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !favicon.ico
RewriteCond %{REQUEST_URI} !pagespeed
RewriteCond %{REQUEST_URI} !favicon.ico

# Redirect everything else to custom site path
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*)?$ /$1 [R=301,L]
</IfModule>
</Directory>

<Directory /var/www/koken>
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all

<IfModule mod_rewrite.c>
RewriteEngine On

# Pass images requests back to PHP if they do not exist
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} /koken/storage/cache/images(/(([0-9]{3}/[0-9]{3})|custom)/.*)$
RewriteRule . /koken/i.php?path=%1 [L]

# Pass albums requests back to PHP if they do not exist
RewriteCond %{REQUEST_METHOD} =GET
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} /koken/storage/cache/albums(/([0-9]{3}/[0-9]{3})/.*)$
RewriteCond %{REQUEST_FILENAME} !favicon.ico
RewriteCond %{REQUEST_URI} !pagespeed
RewriteCond %{REQUEST_URI} !favicon.ico
RewriteRule . a.php?path=%1 [L]

# Catch root requests (pjax)
RewriteCond %{REQUEST_METHOD} =GET
RewriteCond %{REQUEST_URI} ^/?$
RewriteCond %{QUERY_STRING} _pjax=
RewriteCond %{DOCUMENT_ROOT}/koken/storage/cache/site/index/cache.phtml -f
RewriteRule .* /koken/storage/cache/site/index/cache.phtml [L]

# Catch root requests
RewriteCond %{REQUEST_METHOD} =GET
RewriteCond %{REQUEST_URI} ^/?$
RewriteCond %{QUERY_STRING} !_pjax=
RewriteCond %{DOCUMENT_ROOT}/koken/storage/cache/site/index/cache.html -f
RewriteRule .* /koken/storage/cache/site/index/cache.html [L]

# Catch site requests (pjax)
RewriteCond %{REQUEST_METHOD} =GET
RewriteCond %{QUERY_STRING} _pjax=
RewriteCond %{DOCUMENT_ROOT}/koken/storage/cache/site%{REQUEST_URI}cache.phtml -f
RewriteRule . /koken/storage/cache/site%{REQUEST_URI}cache.phtml [L]

# Catch site requests
RewriteCond %{REQUEST_METHOD} =GET
RewriteCond %{QUERY_STRING} !_pjax=
RewriteCond %{HTTP_COOKIE} !share_to_tumblr=
RewriteCond %{DOCUMENT_ROOT}/koken/storage/cache/site%{REQUEST_URI}cache.html -f
RewriteRule . /koken/storage/cache/site%{REQUEST_URI}cache.html [L]

# CSS / RSS caching
RewriteCond %{REQUEST_METHOD} =GET
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{DOCUMENT_ROOT}/koken/storage/cache/site%{REQUEST_URI} -f
RewriteRule . /koken/storage/cache/site%{REQUEST_URI} [L]

# Rewrite any old URLs that still use index.php?/this/that syntax
RewriteCond %{QUERY_STRING} ^/(.*)
RewriteRule ^index.php %1? [R,L]

# Rewrite any old URLs that still use index.php/this/that syntax
RewriteRule ^index.php/(.*)$ $1 [R,L]

# Catch root requests
RewriteRule ^(index.php)?$ /koken/app/site/site.php?url=/&base_folder=/ [L,QSA]

# Do not enable path rewriting for files that exist and mod_pagespeedpage
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !favicon.ico
RewriteCond %{REQUEST_URI} !pagespeed
RewriteCond %{REQUEST_URI} !favicon.ico

# For requests that are not actual files
# rewrite to index.php?/PATH
RewriteRule ^(.*)$ /koken/app/site/site.php?url=/$1&base_folder=/ [L,QSA]
</IfModule>
</Directory>

That’s all!

Note that I did find plenty of informations on //kokensupport.com/ to have this working.