Slideshow for CMsimple_XH
The includephp plugin allows CMSimple_XH users to safely include and execute PHP files directly in page content. It is designed for static includes only, executing PHP files placed in a controlled directory plugins/includephp/php/ and inserting their output into the CMS page.
Autobus Nr 57 Van Het G E B R U Als Lijn 2, Op Het Kruispunt Jan Van Scorelstraat En Adriaen Van Ostadelaan Te Utrecht
PHP Slideshow — User Manual
Embedding the Slideshow
To include the slideshow on any CMSimple_XH page, simply insert:
{{{includephp('slideshow.php')}}}
No additional HTML or scripts are needed. The slideshow will automatically display all images from /userfiles/images/.
Image Directory
All images must be stored in:
/userfiles/images/
Supported formats:
.jpg, .jpeg, .png, .gif, .webp
Each image file name is used as its caption, cleaned automatically:
- Numbers and underscores are removed
- File extensions are ignored
- Example:
01_sunset_view.jpg → Sunset View
Features
- Automatic image scan – new images appear instantly
- Responsive layout – scales on mobile and desktop
- Captions – generated from file names
- Light grey navigation dots
- Auto-play every 4 seconds
- Touch swipe for mobile devices
- Hover pause for desktop
Customization
You can edit the CSS in slideshow.php to adjust styles:
| Element |
Description |
Default |
| .sv-dot |
Dot color |
rgba(0,0,0,0.12) |
| .sv-dot.sv-active |
Active dot color |
rgba(0,0,0,0.44) |
| .sv-caption |
Caption background and font |
Light semi-transparent white |
| aspect-ratio |
Slideshow height ratio |
16/9 on desktop, flexible on mobile |
Mobile Optimization
- The slideshow height adjusts automatically (≈70% of screen width on small screens)
- Captions become smaller for readability
- Swipe gestures allow navigation on touch devices
Notes
- The script is self-contained — no database or external JS is required
- A warning message will appear if no images are found in
/userfiles/images/
- Works with any modern CMSimple_XH theme
Example File Structure
cmsimple/
userfiles/
└── images/
├── 01_sunset_view.jpg
├── 02_forest_path.jpg
└── 03_city_lights.webp
plugins/
└── includephp/php
└── slideshow.php