Exemplo n.º 1
0
 static function testGenerateGalleryHTML()
 {
     $all_images = VSMGFileHelper::getImagePaths("../test/images", TRUE);
     $gallery = new VSMGGallery($all_images, TestVSMGImageHelper::$username, TestVSMGImageHelper::$password, TestVSMGImageHelper::$database);
     $gallery_html = $gallery->getThumbnailsHTML();
     return "<html>\n {$gallery_html}</html>\n";
 }
Exemplo n.º 2
0
<?php

require_once 'TestVSMGFileHelper.php';
require_once 'TestVSMGImageHelper.php';
TestVSMGFileHelper::run();
TestVSMGImageHelper::run();
$username = '******';
$password = '******';
$database = 'modx';
// Setup a quick html file
$all_images = VSMGFileHelper::getImagePaths("../test/images", TRUE);
$gallery = new VSMGGallery($all_images, $username, $password, $database);
$gallery_html = $gallery->getThumbnailsHTML();
$ind_file = "index-test.html";
$fh = fopen($ind_file, 'w') or die("Erro opening file");
$html = "<html>\n" . '	<link rel="stylesheet" href="../css/vsmg.css" type="text/css"/>' . $gallery_html . "</html>\n";
fwrite($fh, $html);
fclose($fh);