I’ve been using Yoxview as a gallery plugin tool on my site for a few months now and following on from @singlecelldsgn buggering around with wordpress I figured I would follow his lead (blatantly rip off in other words) and try embedding Yoxview into wordpress. This may also help @PBux who looked at yoxview but wasn’t sure what was going on.
The result is: http://www.kirkd.co.uk/blog/index.php/yoxtest/ which is nothing more than a test to show two galleries in one page meaning multiple galleries can be used across one site easily.
There is a plugin but where is the fun in that eh? So will all due respect to @singlecelldsgn for inspiring me I give the following.
The following scripts are placed into the header or the footer:
<script type=”text/javascript” src=”http://www.kirkd.co.uk/yoxview/yoxview-init.js”></script>
This calls the yoxview plugin and also fires up the js library at googleapis without needing to add that as another line of script. I’ve hardcoded the js for now as I wanted to make sure it worked properly plus its the same one as my main site. This line of code may change in the future.
<script type=”text/javascript”>
$(document).ready(function(){
$(“#yoxview_picasa”).yoxview({
dataUrl: ‘http://picasaweb.google.com/dr.monkeyface/2DWork?thumbsize=104′
});
});
</script>
Now we pick the gallery to draw the images from. In this case its my 2d folder and the name of the div is going to be the default ‘yoxview_picasa’
<script type=”text/javascript”>
$(document).ready(function(){
$(“#yoxview_colour”).yoxview({
dataUrl: ‘http://picasaweb.google.com/dr.monkeyface/ColourTent?thumbsize=104′
});
});
</script>
NEXT! Now I pick a different folder on picasa which is the slightly funky colourdome. I also changed the div it will be placed into and its now ‘yoxview_colour’ pretty logical so far.
In the page I want the gallerys to display I just drop the required div
<div id=”yoxview_picasa”></div>
or
<div id=”yoxview_colour”></div>
What this allows me to do (as previously mentioned) is setup multiple pages all running a different yoxview gallery on each page without having to maintain the thumbnails or worry about plugins.
Job done.