Carousel.php

Carousel Recipe for PMWiki

Note - this requires JavaScript functions to play.
(if JS is disabled the first image will display.)

for latest version, updates and notes check:
https://www.pmwiki.org/wiki/Cookbook/Carousel

This adds Markup to your PmWiki allowing you to drop a slide Carousel into any page.
The Carousel identifies and uses all images in the directory indicated in the Markup.
Changing the images is as simple as adding or removing them from the directory.

INSTALL:

Unzip the Carousel.zip file, it should contain
HowTo.txt (This file)
Carousel.css (The css used to make the Carousel slide show work, adjust as you please.)
-- cookbook (folder/subdirectory)
	carousel.php (the file that makes it all work - including java script)
	
	
!!!! IMPORTANT !!!!!
carousel.php assumes your slideshow is in a subdirectory of your wiki installation.
e.g. 		/pmwiki/media/myslideshow
if not you will need to edit the file to manually set the $WikiRoot variable 


Then place carousel.php in your cookbook directory.
(On a standard installation something like www.exampledomain.org/pmwiki/cookbook/ )

Edit your config.php file:
(Should be in your Wiki local directory something like www.exampledomain.org/pmwiki/local/config.php)
Add the following lines:

## Kirk's Image Carousel recipe
 include_once("$FarmD/cookbook/carousel.php")  ;
 
 
Now add the contents of the carousel.css file to your local.css file:
(usually found at www.exampledomain.org/pmwiki/pub/css/local.css)
Copy and paste the contents of the carousel.css file to the bottom of the local.css file	

Now you're ready to use the Carousel Markup!


ALTERNATE CSS methods:
	carousel.css can be included in your skin directory following directions from your skin.
	or
	If you use the ManageCSS recipe, ( https://www.pmwiki.org/wiki/Cookbook/ManageCSS ) 
	you just add the carousel.css to your 
	{pmwiki}/pub/css folder


USAGE:

Slides are sorted into alphabetical order for display.

There is a built-in interpreter which removes certain initial sorting segments from the name for display:
Thus a slide named 
	03_abc_-_Mount_Ranier_2021.jpg
	
Would display by alpha order using the 03_abc segment but the title for the image shows as	
	Mount Ranier 2021    in the Carousel.
	
	
AUTO-RUN:

You can have the carousel auto-play the slides	
	
	
	
The folder containing the images needs to be in the same domain as your Wiki - I recommend making
a folder called media and then use subfolders such as slideshow3 so it would look like:
https://www.myexampledomain/pmwiki/media/slideshow3

Then the Markup you would need would look like:

(:Carousel media/slideshow3:)

NOTE: path is relative to where your pmwiki.php file sits.



