image block customization

gypsypix
gypsypix's picture

Joined: 2010-03-14
Posts: 16
Posted: Tue, 2014-01-21 00:58

Is it possible to display images in the random image block that are not part of the gallery? Say that I have a gallery of 12 albums. Each album is a local hair salon with images of hairstyles that the stylist at that salon creates. Now certain local businesses would like to advertise on my gallery. I would like to use the random image block module to display images or info graphics of the businesses as advertisements. Can this be done without also showing images from the gallery? Maybe I could create a password protected album that wouldn't show up in the gallery and put the images from businesses in there. Is there some code to use that would only pull images from that album?
Or maybe there is another way to achieve this any recommendations would be appreciated
Thanks,
Kevin

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2014-01-21 03:54

You can use the miniSlideShow to display any album you want.

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
gypsypix
gypsypix's picture

Joined: 2010-03-14
Posts: 16
Posted: Tue, 2014-01-21 14:50

Thanks for that information and the quick response.

 
gypsypix
gypsypix's picture

Joined: 2010-03-14
Posts: 16
Posted: Thu, 2014-01-23 00:13

I would like to use the code_block module to do this but not sure I understand the Advanced usage instructions. I've edited the modules/code_block/views/code_block#.html.php by adding this simple image slideshow...

-------------------------------------------------------------------
<?php defined("SYSPATH") or die("No direct script access.") ?>
<?= module::get_var("code_block", "code"); ?>
<center>
<script language="JavaScript">
var i = 0;
var path = new Array();

// LIST OF IMAGES
path[0] = "foodpic01.jpg";
path[1] = "foodpic02.jpg";
path[2] = "foodpic03.jpg";
path[3] = "foodpic04.jpg";
path[4] = "foodpic05.jpg";
path[5] = "foodpic06.jpg";

function swapImage()
{
document.slide.src = path[i];
if(i < path.length - 1) i++; else i = 0;
setTimeout("swapImage()",8000);
}
window.onload=swapImage;
</script>
<img height="125" name="slide" src="foodpic01.jpg" width="185" />
</center>
---------------------------------------------------------------------
I'm not sure if this is the correct placement and I also don't know what code to put in code block administration page.
Could you please advise. I would be very grateful. This would be the last piece of the puzzle to a terrific web site thanks to you guys.
Thanks,
Kevin