Gallery

From Alessandro's Wiki
Revision as of 10:56, 11 November 2010 by Porcelinux (talk | contribs) (Created page with ' == Tricks == * How to set/use Gallery in debug mode? edit config.php and change: $gallery->setDebug(false); to $gallery->setDebug('buffered'); * sending mail through Gm...')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Tricks

  • How to set/use Gallery in debug mode?

edit config.php and change:

$gallery->setDebug(false);

to

$gallery->setDebug('buffered');


  • sending mail through Gmail (activating ssl):

( from http://blog.bonetree.net/2008/10/configuring-gallery2-to-send-email-using-gmail/ )

change line 68 in <gallery directory>/lib/smtp/smtp.php looks like this:

list ($config['smtp.host'], $port) = array_merge(explode(':', $config['smtp.host']), array(25));

to

$url_info = parse_url($config['smtp.host']);
$config['smtp.host'] = '';
if( isset($url_info['scheme']) ) {
   $config['smtp.host'] = $url_info['scheme'].'://';
}
$config['smtp.host'] .= $url_info['host'];
$port = ( isset($url_info['port']) ) ? $url_info['port'] : 25;