PHP Classes

MySQL Slideshow: Present slideshow from images listed in a database

Recommend this page to a friend!
  Info   View files View files (15)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 1,336 All time: 2,896 This week: 66Up
Version License PHP version Categories
mysql-slideshow 1.14MIT/X Consortium ...8Databases, Graphics, Content management
Description 

Author

This package can be used to present slideshow from images listed in a database.

The main class can retrieve lists of images to be displayed from a MySQL database table.

The class can also add or update the slideshow image lists in the database table, but the actual images are stored in files.

Picture of Barton Phillips
Name: Barton Phillips is available for providing paid consulting. Contact Barton Phillips .
Classes: 5 packages by
Country: United States United States
Age: 80
All time rank: 53569 in United States United States
Week rank: 78 Up9 in United States United States Up
Innovation award
Innovation award
Nominee: 1x

Details

MySqlSlideShow

Store Slide Show information in a MySql database and show Slide Show in a browser.

History

This class was designed in 2009 and was updated April 2015 to new HTML5 and CSS3 features. It was updated again Jan. 2023.

Install

Either download the ZIP file or install with Composer.

<ol style="list-style-type: decimal"> <li>unzip the zip file (you have probably already done this if you are reading this)</li> <li>the directory structure is as follows: <ul> <li>examples/ </li> <li>README.html</li> <li>README.md</li> <li>composer.json</li> <li>gulpfile.js</li> </ul> If you loaded this with 'composer' instead of from the ZIP then this stucture is under 'vendor/bartonlp/mysqlslideshow/'. <li>In either case you may need get mysql running and then:

<pre><code>CREATE DATABASE mysqlslideshow;</code></pre>

Create the database table. The file 'mktable.sql', in the 'examples' directory, if sourced within the 'msql' client will make the table 'mysqlslideshow'. If you want to call your table something else you can edit the 'mktable.sql' file and then either edit the 'mysqlslideshow.class.php' (NOT RECOMMENDED), or use the constructor with the additional optional arguments: The first three arguments come from the 'dbclass.conectioninfo.i.php' file. Add the forth and fifth arguments for your database name and table name.

<pre><code>$ss = new MySqlSlideshow($Host, $User, $Password, 'YourDatabaseName', 'YourTableName');</code></pre>

Or edit 'dbclass.connectioninfo.i.php' and add '$Database' and '$Table' and add them to the invocation above instead of the strings. You can create the table from inside the 'mysql' client by using the source statement:

<pre><code>source mktable.sql;</code></pre>

or just do it the hard way by typing in the create statement.</li> <li>add some images to your database table. There are two easy ways to do this: <ol style="list-style-type: lower-alpha"> <li>use the 'addupdateimage.php' program in the 'examples' directory. <li>use the 'addimages.php' program in the 'examples' directory. </ol>

<li>try out the examples 'serverside.php' and 'browserside.html' on your own server. Then start writing your own code. Have fun. If you don't have Apache running you can use the PHP server. Just enter

<pre><code>php -S localhost:8080</code></pre>

from the project directory and then in your browser enter

<pre><code>localhost:8080/serverside.php</code></pre>

or 'browserside.html' to see the sites.

Any questions can be sent to <a href="mailto://barton@bartonphillips.com">barton@bartonphillips.com</a> I will try to answer reasonable questions.</li> </ol>

Examples

There are three files in the 'examples' directory:

  • serverside.php
  • browserside.html
  • ie.html
  • mysqlslideshow.class.php

'mysqlslideshow.classs.php' is the Ajax target and has the MySqlSlideShow class.

Conclusion

The class is hosted at https://github.com/bartonlp/mysqlslideshow as well as the 'PHP Classes' http://www.phpclasses.org.

Copyright &copy; 2009-2023 Barton Phillips http://www.bartonphillips.com <a href="mailto://barton@bartonphillips.com">barton@bartonphillips.com</a> OR <a href="mailto://bartonphillips@gmail.com">bartonphillips@gmail.com</a>

Last Modified Jan. 27, 2023


  Files folder image Files  
File Role Description
Files folder imageexamples (8 files, 1 directory)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file mk-html.sh Data Auxiliary data
Accessible without login HTML file README.html Doc. Documentation
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  examples  
File Role Description
Files folder imagePictures (3 files)
  Accessible without login Plain text file addimages.php Example Example script
  Accessible without login Plain text file addupdateimage.php Example Example script
  Accessible without login HTML file browserside.html Data Auxiliary data
  Accessible without login Plain text file dbclass.connectinfo.i.php Conf. Configuration script
  Accessible without login HTML file ie.html Doc. Documentation
  Accessible without login Plain text file mktable.sql Data Auxiliary data
  Plain text file mysqlslideshow.class.php Class Class source
  Accessible without login Plain text file serverside.php Example Example script

  Files folder image Files  /  examples  /  Pictures  
File Role Description
  Accessible without login Image file P1010001.JPG Data Auxiliary data
  Accessible without login Image file P1010002.JPG Data Auxiliary data
  Accessible without login Image file P1010003.JPG Data Auxiliary data

 Version Control Unique User Downloads Download Rankings  
 100%
Total:1,336
This week:0
All time:2,896
This week:66Up
User Comments (1)
Good Slideshow, working as well.
11 years ago (artem dibow)
80%StarStarStarStarStar