allow embedded use (fixes #56)
This commit is contained in:
parent
68ca59cac4
commit
050caa5830
4 changed files with 11 additions and 9 deletions
|
@ -377,7 +377,7 @@ function getAllThumbnails(&$thumbinfo) {
|
|||
|
||||
$retval = array();
|
||||
foreach ($thumbinfo[2] as $basename => $data) {
|
||||
$retval[] = array('src' => $configuration['gallerydir'] . DIRECTORY_SEPARATOR . $data[0],
|
||||
$retval[] = array('src' => $configuration['gallerypath'] . DIRECTORY_SEPARATOR . $data[0],
|
||||
'sizes' => $data[1][3],
|
||||
'alt' => getImageLabel($thumbinfo[1], $basename));
|
||||
}
|
||||
|
|
|
@ -28,7 +28,8 @@
|
|||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
require('includes/template.class.php');
|
||||
$dir = dirname(realpath(__file__));
|
||||
require("$dir" . DIRECTORY_SEPARATOR . "template.class.php");
|
||||
|
||||
/**
|
||||
* Theme class.
|
||||
|
@ -66,7 +67,7 @@ class Theme {
|
|||
*/
|
||||
function __construct($name, &$configuration) {
|
||||
$themeini = realpath(implode(DIRECTORY_SEPARATOR,
|
||||
array('themes', $name, 'theme.ini')));
|
||||
array($configuration['themedir'], $name, 'theme.ini')));
|
||||
if (!$themeini) {
|
||||
die("invalid theme $name");
|
||||
}
|
||||
|
|
Reference in a new issue