Integration into a PHP file

After successfully purchasing refshots®, you should now have downloaded and unzipped the web gallery. Below we explain how you can integrate the web gallery “Multi” into your existing PHP page or CMS system.


Step 1
Upload the unpacked folder “refshotsLib” to the root directory of your website.


Step 2
Open the file where you want to integrate the refshots® web gallery and paste the code below before the closed </head>.

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="../refshotsLib/refshots-res/css/refshots.css" />
<?php 
require_once("../refshotsLib/configuration.php");
require_once("../refshotsLib/refshots-res/functions.php");
require_once("../refshotsLib/dynamic_css.php");
?>

 


Step 3 (Webgallery Filter)
Place the following code of the web gallery “Filter” at the desired position within your page.

<?php
$atts['REFSHOTS_PATH'] = dirname(__FILE__)."/refshotsLib/refshots/";
$atts['category'] = "";
echo refshotsGallery();
?>

 


Step 3 (Webgallery Multi)
Place the following code of the web gallery “Multi” at the desired position within your page.

<?php
$atts['REFSHOTS_PATH'] = dirname(__FILE__)."/refshotsLib/refshots/";
$atts['category'] = "";
echo refshotsGallery($atts);
?>
Note: Which category on the selected page should be displayed as a web gallery, you can specify by the script above (line 3), the name of the category deposited. You can repeat this process on any number of pages with a different category name. You create the categories in the app.
$atts['category'] = "Categoryname1,Categoryname2";

 


Step 4
Place the required JavaScript files above the closed </body> link at the bottom of your page.

<script type="text/javascript" src="../refshotsLib/refshots-res/js/jquery.js"></script>
<script type="text/javascript" src="../refshotsLib/refshots-res/js/refshots.js"></script>

refshots® should now be successfully integrated and the app to manage your web gallery can be started.

War dieser Artikel hilfreich?
Nein 0