I have a question about Gallery2's smarty plugins stomping on Postnuke's smarty plugins. I'm currently using a custom-modded mGallery2 on my sites to integrate Gallery2 into Postnuke .764 and I tried an upgrade to Gallery 2.2.1 tonight on a test box. Everything was going smoothly until I went to administer the plugins. I got the following error:
Quote:
// Fatal error: Cannot redeclare smarty_modifier_escape() (previously declared in C:\Program Files\xampp\styrophobia\includes\classes\Smarty\plugins\modifier.escape.php:22) in C:\Program Files\xampp\styrophobia\modules\mGallery2\lib\smarty\plugins\modifier.escape.php on line 89
How can I prevent the two smarty engines from stepping on each other?
Also, why is the Postnuke+G2 thread not sticky? I always have to search through the topics to find it.
maddruid
Joined: 2006-11-01
Posts: 15
Posted: Wed, 2007-04-04 14:27
I solved the problem by editing the modules/core/classes/GalleryTemplateAdapter.class file.
This class has two lines that explicitly include the modifier.escape.php file from the Gallery2 smarty install, so I changed the path to point to the Postnuke path. Is there a better way to do this?
valiant
Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2007-04-04 18:59
is that the new only problem you have with both apps using smarty?
maybe we can add a function_exists check in GalleryTemplateAdapter before including the files.
please file a bug about this (with explanations about the postnuke context) at http://sf.net/project/gallery/ -> trackers -> bugs.
<?php
$g2_Config['path'] = dirname(__FILE__) . '/';
$g2_Config['embedPath'] = '/';
$g2_Config['g2Uri'] = '/gallery2/';
$g2_Config['loginRedirect'] = '/gallery2/';
$g2_Config['embedUri'] = '/gallery2/index.php';
//print_r($g2_Config);
require_once( $g2_Config['path'] . 'embed.php');
if (!headers_sent()) {
header('Content-Type: text/html; charset=UTF-8');
}
$ret = GalleryEmbed::init(array(
'g2Uri' => $g2_Config['g2Uri'],
'loginRedirect' => $g2_Config['loginRedirect'],
'embedUri' => $g2_Config['embedUri'],
'fullInit' => 'false',
'apiVersion' => array(1,0)
));
GalleryCapabilities::set('login',true);
// handle the G2 request
$g2moddata = GalleryEmbed::handleRequest();
// show error message if isDone is not defined
if (!isset($g2moddata['isDone']))
{
print 'isDone is not defined, something very bad must have happened.';
exit;
}
// die if it was a binary data (image) request
if ($g2moddata['isDone'])
{
exit; /* uploads module does this too */
}
if ($ret)
{
print $ret->getAsHtml();
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<?php
list($title, $css, $javascript) = GalleryEmbed::parseHead($g2moddata['headHtml']);
echo "<title>" . $title . "</title>\n";
foreach ($css as $item) {
echo $item . "\n";
}
foreach ($javascript as $item) {
echo $item . "\n";
}
?>
<style type="text/css"> <!-- /*#gsHeader { display : none; } #gsFooter { display: none; }*/ --> </style>
</head>
<body class="gallery">
<?php
include ($_SERVER['DOCUMENT_ROOT']."/info.php");
include ("$header");
echo $g2moddata['bodyHtml'];
include ("$footer");
?>
</body>
</html>
Yet if I login first using main.php, then load this page, it logs in and works properly, but I am unable to get back to the login screen.
Any ideas? Thanks!
I'm also not using the URL rewrite plugin, and it is not currently installed.
finnmccool
Joined: 2007-08-06
Posts: 8
Posted: Thu, 2007-08-16 10:36
I copied gallery2 into the modules folder of drupal, however when trying to complete the instruction
"Enable the gallery module in administer -> modules in your drupal installation"
the gallery2 module doesn't come up in the list of modules
Also I don't see the "settings" submenu under Home -> "administer"
administer -> settings -> gallery
I see "post settings" under content management
or "user settings" under user management
or "search settings" under site configuration
is one of thses setting the settings that they mean?
or are these instructions for a different version?
Hola todos;
Espero haya algún amigo que hable español y pueda ayudarme.
Lo que sucede es que quiero integrar a mi web una foto de mi gallery, algo así como lo que aparece en la página principal de gallery y que cambia aleatoriamente.
He visto la documentación al respecto pero el idioma no me ayuda mucho y me parece un mundo, si alguien puede darme una mano se lo agradecería mucho, también me pueden escribir a mi correo de hotmail
Muchas gracias por su apoyo
tykos
Joined: 2007-11-10
Posts: 1
Posted: Thu, 2008-02-07 23:18
Only a stupid question: i have to embed gallery2 in my site (no cms), and i have to visualize the gallery in 2 different pages.
Every page needs a different theme of the same gallery.
What should i do?
Michele
maximosch
Joined: 2008-11-07
Posts: 2
Posted: Fri, 2008-11-14 00:48
Hola, perdon pero no se ingles y en principio qiciera saber si alguien de la lista escribe en español ............ de ser asi por problemas con el idioma y conocimientos no puedo integrar o embeber la galeria en mi pagina web y necesitaria ayuda para lograrlo ¡¡¡
Desde ya muchas gracias por la ayuda.
Posts: 15
I have a question about Gallery2's smarty plugins stomping on Postnuke's smarty plugins. I'm currently using a custom-modded mGallery2 on my sites to integrate Gallery2 into Postnuke .764 and I tried an upgrade to Gallery 2.2.1 tonight on a test box. Everything was going smoothly until I went to administer the plugins. I got the following error:
How can I prevent the two smarty engines from stepping on each other?
Also, why is the Postnuke+G2 thread not sticky? I always have to search through the topics to find it.
Posts: 15
I solved the problem by editing the modules/core/classes/GalleryTemplateAdapter.class file.
This class has two lines that explicitly include the modifier.escape.php file from the Gallery2 smarty install, so I changed the path to point to the Postnuke path. Is there a better way to do this?
Posts: 32509
is that the new only problem you have with both apps using smarty?
maybe we can add a function_exists check in GalleryTemplateAdapter before including the files.
please file a bug about this (with explanations about the postnuke context) at http://sf.net/project/gallery/ -> trackers -> bugs.
thanks!
--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage
Posts: 15
It is the only problem I've run into so far. I added a bug report to the tracker. http://sourceforge.net/tracker/index.php?func=detail&aid=1694706&group_id=7130&atid=107130
Thanks.
Any thoughts on why the Postnuke+G2 thread is not sticky?
Posts: 1
I'm having problems with the 'Login' text. If you click it and your using the file prepared/found here http://codex.gallery2.org/Gallery2:How_to_visually_embed_G2_in_your_own_website_using_embedded_mode it just loops, it does not bring up a login screen.
Yet if I login first using main.php, then load this page, it logs in and works properly, but I am unable to get back to the login screen.
Any ideas? Thanks!
I'm also not using the URL rewrite plugin, and it is not currently installed.
Posts: 8
I copied gallery2 into the modules folder of drupal, however when trying to complete the instruction
"Enable the gallery module in administer -> modules in your drupal installation"
the gallery2 module doesn't come up in the list of modules
Also I don't see the "settings" submenu under Home -> "administer"
administer -> settings -> gallery
I see "post settings" under content management
or "user settings" under user management
or "search settings" under site configuration
is one of thses setting the settings that they mean?
or are these instructions for a different version?
drupal 5.1 gallery 2.2
Posts: 32509
@finnmccool:
please post your question in the drupal integration support forums. forums -> gallery 2 integration -> drupal.
--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage
Posts: 1
Hola todos;
Espero haya algún amigo que hable español y pueda ayudarme.
Lo que sucede es que quiero integrar a mi web una foto de mi gallery, algo así como lo que aparece en la página principal de gallery y que cambia aleatoriamente.
He visto la documentación al respecto pero el idioma no me ayuda mucho y me parece un mundo, si alguien puede darme una mano se lo agradecería mucho, también me pueden escribir a mi correo de hotmail
Muchas gracias por su apoyo
Posts: 1
Only a stupid question: i have to embed gallery2 in my site (no cms), and i have to visualize the gallery in 2 different pages.
Every page needs a different theme of the same gallery.
What should i do?
Michele
Posts: 2
Hola, perdon pero no se ingles y en principio qiciera saber si alguien de la lista escribe en español ............ de ser asi por problemas con el idioma y conocimientos no puedo integrar o embeber la galeria en mi pagina web y necesitaria ayuda para lograrlo ¡¡¡
Desde ya muchas gracias por la ayuda.