These forums are provided for community interactions only. For official support please submit a support ticket.
You are not logged in.
I am using Director as a CMS and displaying my images using the API and Galleria on my Wordpress blog. Thanks to some advice in an old post on this forum, I was even able to randomly display images from an album.
The only Wordpress plugin required is one to execute the PHP, but that turns out to be handy because it allows me to use shortcodes to insert any gallery I want. For example:
[ssp album=14]
It is currently implemented at the following 5 pages:
http://www.gmbphotography.ca
http://www.gmbphotography.ca/portfolio
http://www.gmbphotography.ca/portfolio/portraits
http://www.gmbphotography.ca/portfolio/engagements
http://www.gmbphotography.ca/portfolio/weddings
I would appreciate your input, any suggestions/comments, and would love to know if it breaks anywhere.
If anyone else wants to implement something similar, I'd be happy to share my experience/code.
Last edited by geoffb (2011-09-08 08:37:09)
Offline
I've had a few people ask for how I implemented this on my site, so here's a copy of the email I sent to them:
The only plugin I use is one to execute PHP (I'm using Shortcode Exec PHP by Marcel Bokhorst).
You'll need to download the PHP API kit (I got the 1.5 beta; I'm not sure if the other one will work) from the SSP Director site.
Put the PHP API kit and Galleria on your server.
Then, I get it all going with the following code.
In my post, I put:
[ssp_full albumid=3]
Then, on the Shortcode PHP Exec page, I create a shortcode called ssp_full and put the following:
extract(shortcode_atts(array('albumid' => '3'), $atts));
$apikey='YOUR_KEY_HERE';
$apipath='YOUR_PATH_HERE';
include_once('path/to/DirectorPHP.php');
$director = new Director($apikey, $apipath);
# Cache
$director->cache->set("album-" . $albumid);
$thumb = array(
'name' => 'thumb',
'width' => '200',
'height' => '200',
'crop' => 1,
'quality' => 80,
'sharpening' => 1
);
$large = array(
'name' => 'large',
'width' => '800',
'height' => '600',
'crop' => 0,
'quality' => 90,
'sharpening' => 1
);
$huge = array(
'name' => 'huge',
'width' => '1200',
'height' => '900',
'crop' => 0,
'quality' => 90,
'sharpening' => 1
);
$preview = array(
'width' => '300',
'height' => '300',
'crop' => 0,
'quality' => 85,
'sharpening' => 1
);
$director->format->add($thumb);
$director->format->add($large);
$director->format->add($huge);
$director->format->preview($preview);
$album = $director->album->get($albumid);
echo '<div id="galleria">';
$contents = $album->contents;
foreach ($contents as $content) {
echo '<a rel="' . $content->huge->url . '" href="' . $content->large->url . '">';
echo '<img src="' . $content->thumb->url . '" width="' . $content-> thumb->width . '" height="' . $content->thumb->height . '" title="' . $content->title . '" alt="' . $content->caption . '" />';
echo "</a>\n";
}
?>
<script>
Galleria.loadTheme('/path/to/galleria.classic.min.js');
$('#galleria').galleria({
autoplay: 4000,
dummy: '/images/image_to_show_if_theres_a_problem.jpg',
height: 600,
width: 800,
showInfo: true,
showCounter: true,
showImagenav: true,
imageMargin: 20,
imageCrop: false,
thumbCrop: true,
thumbFit: true,
_showProgress: false,
initialTransition: 'fade',
transition: 'fadeslide',
transitionSpeed: 1000,
imageTimeout: 20000,
debug: false
});
</script>Alternatively, you could leave out the first line of the PHP code...
extract(shortcode_atts(array('albumid' => '3'), $atts));...and instead pass albumid as a URL variable.
You'll also need to include a few script references in your head (it's a Galleria requirement):
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script> <script src="path/to/galleria/galleria-1.2.5.min.js"></script>
Offline
hello geoffb,
thank you very much for posting this! I'm wondering though if this solution really helps with SEO? I checked your source code and there are no keywords or meaningful filenames within the gallery. Do you think it is still better regarding SEO?
thanks!
Offline
Thank you geoffb! I was able to implement Galleria within WordPress with Director as well. Using DirectorPHP and it's API's. I created my own personal WordPress plugin also with shortcodes similar to yours. I also included a shortcode field for the Galleria Theme to use. My homepage uses the Classic Galleria theme, and the blog posts, model and portfolio use seperate versions of the Twelve Galleria theme. I'm very happy with the results ... no more Flash!
You can see the implementation at http://MarkBarrett.ca
Thanks again!
Mark
Offline
Hi geoffb. Bear with me if this is a more complicated question than I realize, but is it possible to implement your very cool solution (SSP as CMS for Galleria) on a non-Wordpress site? I would love to be able to do this, and if you could point me in the right direction, I would very much appreciate it. I'm not that familiar with php, but am perfectly comfortable following any directions.
Thank you in advance for your time!
-Katie
Offline
Geoff and Mark, this is great!! Exactly what I was hoping to find! Any idea if SSP Director / Galleria could implemented on a site that is not running Wordpress, but can run php? If I have a php developer, this should be a no brainer, right?! Any input would be greatly appreciated. Thanks, Brian
Offline
bashanahan, it should be very easy for any experience php developer. I was able to get it going within a few weeks with limited php skills. I used the Director PHP API kit 1.5 beta and the latest Galleria and a few modified themes.
Offline