Features
- enable simple building of image galleries (it not uses built in media support) – it’s targeted for sites where is WordPress used as a CMS
contains two widgets – one with the list of available galleries and second with images from the selected (or latest) gallery – this widget is aimed for the main page of blog on which is used- you can create galleries by two ways: using plugin’s own upload wizard or your favourite FTP client. If you use plugin’s wizard images will be automatically resized.
- offers English and Czech locales
TODOs
- enable automatic resizing also for images uploaded via user’s FTP client not by plugin’s wizard
add another widget with small thumbnails of the first images of galleries – something like this:- enable adding galleries directly to the posts/pages through the new button in WYSIWYG editor
- enable using of galleries from your Google Picasa (and maybe also Flickr or others if some client want it) account as same as these which are stored directly on your server
- enable append WP tags or categories to the galleries
Screenshots
How to display photogallery page
- in WP admin create new page, enter title you want and into the post’s body insert only this text:
[photogallery_page] - insert ID of newly created page into the plugin’s options
- place this code into the
file functions.phpin folder of your current theme:<?php /* Custom content filter */ function my_content_filter($content) { global $od_photogallery_plugin; if(strpos($content, '<p>[photogallery_page]</p>') !== false) { // If you want to display only certain gallery you can simply insert // uncoment line below: //$gallery_page = $od_photogallery_plugin->render_public_gallery(1); // Or here is simple solution how display selected gallery - that can be // performed through the gallery widget: $gallery_ID = (isset($_GET['gallery_ID'])) ? (int) $_GET['gallery_ID'] : 1; $gallery_page = $od_photogallery_plugin->render_public_gallery($gallery_ID); return str_replace('<p>[photogallery_page]</p>', $gallery_page, $content); } ?>
This will lead that on the page you’ve created before will be displayed selected galleries.
Styling gallery
As you can see on test gallery there is also need of additional styles and JavaScript. For the same look follow these steps:
- upload to your theme’s directory MooTools and LightBox. In my case this include these files:
img/loading.gif img/nextlabel.gif img/prevlabel.gif js/mootools.js js/slimbox.js slimbox.css
- update
header.phpfile with these lines:<script src="<?php bloginfo('stylesheet_directory');?>/js/mootools.js" type="text/javascript"/> <script src="<?php bloginfo('stylesheet_directory');?>/js/slimbox.js" type="text/javascript"/>
- update
style.css, for example:/* CSS styles for photogallery */ div.fotogalerie {} div.fotogalerie h2 {} div.fotogalerie h3 {} /* photo rows container */ div.fotogalerie .fotky { text-align: center; width: 100%; } /* photo row */ div.fotogalerie .fotky .fotka { width: 110px; min-width: 110px; height: 130px; text-align: center; float: left; border: 1px solid #ccc; background-color: #f2f2f2; margin: 5px 5px 5px 5px; padding: 5px 5px 2px 5px; font-size: 90%; }
And this is all…




Hi!
I tried to use your plugin. Installed it successfully, created a test gallery also. But I can’t figure out how to display it. Can you help?
Thanks
| 28.10.2009 @ 12.35
Hi,
I updated this page and put at the end short description how to display downloads list on any page if you’ll more troubles feel free to write here again.
by,
ondrej
| 28.10.2009 @ 13.47
I’m sorry I copy&paste bad code – this is for another plugin. I’m going to correct it…
| 28.10.2009 @ 14.15
| 28.10.2009 @ 14.30
Hi Ondreid,
could you post the right code for us?
I would like to use your plugin!
Thanks!
| 15.11.2009 @ 14.18
The sample code above should be now correct but if you have some troubles feel free to write directly on my email and I’ll help you with implementation.
I need to say sorry here because I still not finished next version which will be a lot of better but currently I’m spending my time with eshop plugin which I need for one of my customers website. So that’s about the delay
.
| 18.11.2009 @ 7.44
Very nice blog, your article is interesting, i have bookmarked it for future referrence
| 29.12.2009 @ 17.42
Dobry den, mam taky problem s vlozenim galerie do stranek.
Nejsem si uplne jisty ktere ID se mysli v bode 2. je to ID v DB?
Kdyz vlozim kod do functions.php napise mi to „neznama chyba“
| 5.1.2010 @ 15.11
Dobry den,
to znamena ID stranky, kde ma byt fotogalerie zobrazena (tato stranka by mela obsahovat
[photogallery_page]a libovolne jiny obsah, jako text atp.).o.
| 5.1.2010 @ 15.44
What template do you use in your blog ? Looks cool
| 5.2.2010 @ 19.09
Is customized Precious 4.0 theme from Kristin K. Wangen.
| 23.2.2010 @ 16.53
AHoj, zkoušla jsem si nastavit tvojí fotogalerii. Vše až k bodu kdy se zapisuje kód do functions.php bylo ok. Jakmile jsem ale do functions.php cokoli napsala, okamžitě se mi stránky úplně zastavili a vyběhla pouze hláška:
Parse error + adresa kde je umístěn functions.php
Můžeš mi pomoci?
| 26.8.2010 @ 15.01
Mohla by jsi pripadne poslat i kod functions.php … nicmene uz jsem ti odpovedel i na email, na ktery jsi take psala
| 26.8.2010 @ 15.31