
A new photo album manager : Gallery
Re: A new photo album manager : Gallery
... and the solution was so close, yet I didn't see it
. Thanks alot for pointing me into the right direction, this works just like needed!

Re: A new photo album manager : Gallery
great that it works for you...
and thanks for the karma
and thanks for the karma

Problem using Gallery with CMSMS 1.8.1
I got a problem using Gallery in the page content. Whenever I add a Gallery to any page content, the top and bottom parts of the page template disappear. I checked the module FAQ about this, but the only thing related was about large image sizes, and my images are really small (~10kb).
Page template:
Doctype, everything in body and below #font-size goes. I tried Gallery on another site with same PHP settings, and it works fine. I used the default Fancybox template and my own templates(removing CSS and JS etc.) and changed the image subfolders, but the only thing that fixed the template was removing the foreach, so that no images are displayed. I had a gallery in the page template itself and it didn't cause any problems.
CMSMS version: 1.8.1
Gallery: 1.3.2 (tried 1.3 too)
Other modules:
Page template:
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<__html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fi">
<head>
<title>{title} | {sitename}</title>
{if isset($canonical)}<link rel="canonical" href="{$canonical}" />{elseif isset($content_obj)}<link rel="canonical" href="{$content_obj->GetURL()}" />{/if}
{metadata}
{cms_stylesheet}
{cms_selflink dir="start" rellink=1}
{cms_selflink dir="prev" rellink=1}
{cms_selflink dir="next" rellink=1}
<!--[if IE 6]>
<link rel="stylesheet" type="text/css" href="ie.css">
<![endif]-->
<!--[if !IE 7]>
<style type="text/css">
#wrap {literal}{display:table;height:100%}{/literal}
</style>
<![endif]-->
<!-- JavaScript -->
</head>
</__body>
<!-- Saavutettavuuslinkit -->
<a class="accessibility" href="pikanappaimet">Pikanäppäimet</a>
<a class="accessibility" href="#mainmenu">Siirry navigaatioon</a>
<a class="accessibility" href="#controls">Siirry toimintoihin</a>
<a class="accessibility" href="#content">Siirry sisältöön</a>
<a class="accessibility" href="#footer">Siirry alapalkkiin</a>
<div id="wrapper">
<!-- Yläpalkki -->
<div id="header" class="container_12">
<h1>Tappara F01-Safiirit/Timantit/Topaasit</h1>
<a href="etusivu" title="Etusivulle"><img src="layout/logo.jpg" alt="" width="136px" height="164px" /></a>
</div>
<div id="inner-wrapper" class="container_12">
<!-- Navigaatio -->
<div id="mainmenu" class="grid_2">
{menu}
</div>
<!-- Sisältö -->
<div id="content" class="grid_8">
<div id="breadcrumbs">
{breadcrumbs delimiter='>' root='etusivu'}
</div>
{content}
</div>
<!-- Oikea palsta -->
<div id="right-column" class="grid_2">
<div id="controls">
<ul>
<li><a href="sivukartta" id="sitemap">Sivukartta</a></li>
<li>{print text='Tulostettava versio' class='print-version'}</li>
</ul>
<div id="font-size">
<p>Tekstin koko</p>
<ul>
<li>{anchor anchor='' text='Suurempi +' class='increaseFont'}</li>
<li>{anchor anchor='' text='Pienempi -' class='decreaseFont'}</li>
<li>{anchor anchor='' text='Alkuperäinen' class='resetFont'}</li>
</ul>
</div>
</div>
{global_content name='Sponsorit'}
</div>
</div>
</div>
<!-- Alapalkki -->
<div id="footer-wrapper">
<div id="footer" class="container_12">
<div id="footer-menu" class="grid_8">
<ul>
<li>{anchor anchor='header' text='Takaisin sivun alkuun'}</li>
<li>{cms_selflink page='sivukartta' text='Sivukartta'}</li>
</ul>
{menu template='Footer menu' excludeprefix='tapahtumakalenteri'}
</div>
<div id="footer-info" class="grid_3">
<p id="copyright">Copyright <span class="highlight">Tappara F01-Timantit Ry</span> {custom_copyright}</p>
<p id="author">Sivuston toteutus: <a href="http://sivuprojektit.net">Sivuprojektit.net</a></p>
</div>
</div>
</div>
<!-- Saavutettavuuslinkit -->
<a class="accessibility" href="#header">Takaisin sivun alkuun</a>
<a class="accessibility" href="#content">Takaisin sisältöön</a>
<__body>
</__html>
CMSMS version: 1.8.1
Gallery: 1.3.2 (tried 1.3 too)
Other modules:
Code: Select all
CMSMailer 2.0
FileManager 1.0.2
MenuManager 1.6.5
ModuleManager 1.4
News 2.10.6
nuSOAP 1.0.1
Printing 1.1.0
Search 1.6.5
ThemeManager 1.1.1
TinyMCE 2.7.2
Gallery 1.3.2
FormBuilder 0.6.2
CGExtensions 1.19
CGSimpleSmarty 1.4.5
CGBlog 1.5
JQueryTool1.0.6
CGContentUtils 1.0
Re: A new photo album manager : Gallery
crbn, could you turn debug on in the config.php file and see if any error messages appear? Also look for them in the html sourcecode.
Last edited by Jos on Sun Jul 25, 2010 5:27 pm, edited 1 time in total.
Re: A new photo album manager : Gallery
Found the culprit pretty quickly:
Seems to be linked to the printing module. Removing the printing module tag from template helped, though it's not a permanent fix since I wanted to use it.. I'm getting the following notice on other pages:
And the line in that file that gives the notice/error:
EDIT: Got it fixed finally, just had to modify the printing template.. Weird though. Thanks for the tip about debug mode anyway 
Code: Select all
Catchable fatal error: Object of class stdClass could not be converted to string in /public_html/tapparatimantit/tmp/templates_c/Printing^%%CC^CC3^CC3377B7%%module_db_tpl%3APrinting%3Blinktemplate.php on line 22
Code: Select all
Notice: Undefined index: image in /public_html/tapparatimantit/tmp/templates_c/Printing^%%CC^CC3^CC3377B7%%module_db_tpl%3APrinting%3Blinktemplate.php on line 22
Code: Select all
<?php endif; ?> rel="nofollow"><?php echo $this->_tpl_vars['image']; ?>

Last edited by crbn on Sun Jul 25, 2010 5:59 pm, edited 1 time in total.
Re: A new photo album manager : Gallery
crbn, glad you fixed it, cause I wouldn't know how...
This was reported earlier by Maarten here: http://forum.cmsmadesimple.org/index.ph ... #msg198693
And a workaround was offered by Rolf here: http://forum.cmsmadesimple.org/index.ph ... #msg200705
Can you tell us what exacly you changed in the printing template?
This was reported earlier by Maarten here: http://forum.cmsmadesimple.org/index.ph ... #msg198693
And a workaround was offered by Rolf here: http://forum.cmsmadesimple.org/index.ph ... #msg200705
Can you tell us what exacly you changed in the printing template?
Re: A new photo album manager : Gallery
{if isset($imgsrc)}
{capture assign='image'}
{/capture}
{$image}
{else}
{$image}{$linktext}
{/if}
I trimmed out the bolded part from the print link template. That image tag was causing the problem, I have no idea why though, because it became a fatal error only when I put a gallery to the page content.
{capture assign='image'}
{/capture}
{$image}
{else}
{$image}{$linktext}
{/if}
I trimmed out the bolded part from the print link template. That image tag was causing the problem, I have no idea why though, because it became a fatal error only when I put a gallery to the page content.
Re: A new photo album manager : Gallery
Nice thank you...
Gallerytemplates set the {$image} variable as an object in the foreach statement. And that one cannot be called directly with {$image}
Gallerytemplates set the {$image} variable as an object in the foreach statement. And that one cannot be called directly with {$image}
Re: A new photo album manager : Gallery
I added this issue to the troubleshooting section of the Gallery documentation.
You can solve it by deleting the last {$image} tag, just the one right before {$linktext}.
It shouldn't have been there at all because the variable is not set there. That's why your second error was Notice: Undefined index: image.
I filed a bugreport for the core about this also.
You can solve it by deleting the last {$image} tag, just the one right before {$linktext}.
It shouldn't have been there at all because the variable is not set there. That's why your second error was Notice: Undefined index: image.
I filed a bugreport for the core about this also.
-
- Forum Members
- Posts: 80
- Joined: Thu Aug 12, 2010 2:27 pm
Custom Thumbnails
Hello Jos,
I would like to know if there is an option for creating custom thumbnails. For some odd reason they keep getting overwritten by the default thumbs every time I open the Gallery...
Thank, btw, for bringing this forum under my attention. (loads of answers in here!)
All the best!
Edwin
I would like to know if there is an option for creating custom thumbnails. For some odd reason they keep getting overwritten by the default thumbs every time I open the Gallery...
Thank, btw, for bringing this forum under my attention. (loads of answers in here!)
All the best!
Edwin
Re: A new photo album manager : Gallery
Hi Edwin,
Gallery uses two kinds of thumbs.
1) the thumbs in the same directory as the original image, with the prefix "thumb_"
2) the thumbs in the directory uploads/images/GalleryThumbs.
The first ones are standard used in the backend, and only used for the frontend if thumbwidth/height are not set in the gallery template settings. I think you can overwrite those with your own ones (but am not sure)
The second ones can not be replaced with your own thumbs, because Gallery checks if the sizes correspond with the actual settings.
So it's not an odd reason... it's a feature
Gallery uses two kinds of thumbs.
1) the thumbs in the same directory as the original image, with the prefix "thumb_"
2) the thumbs in the directory uploads/images/GalleryThumbs.
The first ones are standard used in the backend, and only used for the frontend if thumbwidth/height are not set in the gallery template settings. I think you can overwrite those with your own ones (but am not sure)
The second ones can not be replaced with your own thumbs, because Gallery checks if the sizes correspond with the actual settings.
So it's not an odd reason... it's a feature

-
- Forum Members
- Posts: 80
- Joined: Thu Aug 12, 2010 2:27 pm
Re: A new photo album manager : Gallery
Hmm. tried that, but I'm afraid it's not doing the trick.
I removed the size for the thumbs in the template settings and uploaded my custom thumbs (being of the same size anyway), but nothing changed.
Also in the backend the thumbs are still the old (resized) ones.
It looks like the image manager is interfering here...
Can you tell me if there is anywhere I could tweak the code so I can use my own thumbs (I can go looking myself, but hopefully you can easily tell me...)?
Thanks a lot anyway, so far.
Edwin
I removed the size for the thumbs in the template settings and uploaded my custom thumbs (being of the same size anyway), but nothing changed.
Also in the backend the thumbs are still the old (resized) ones.
It looks like the image manager is interfering here...
Can you tell me if there is anywhere I could tweak the code so I can use my own thumbs (I can go looking myself, but hopefully you can easily tell me...)?
Thanks a lot anyway, so far.
Edwin
Re: A new photo album manager : Gallery
Today I released a new version of the Gallery module: version 1.4
It ads some nice features to make it much more flexible to use.
The changelog:
- New action gallerytree
- Define custom fields for galleries or images
- Added smarty variables $numimages and $numdirs
- Editable url-prefix for mod_rewrite/pretty_urls
- New 'Add subgallery' button in first tab galleries list (FR #5087)
- Edit date of images and subgalleries (FR #5142)
- Gallery folder setting (FR #5232)
- Automatic refresh of the page after image upload
- Fix for Bugreport #5159: drop chmod of thumbnails
- Fix for Bugreport #4690: Install fails with no feedback if Modules folder not writeable
- Fix for Bugreport #4873: unalowed characters should be replaced in directoryname
- Fix for Bugreport #4735: error with filenames
- Minor bugfix in moveto function
I hope you enjoy using it. If you find Gallery usefull, please consider to join the GeekMoot Donation Drive.
Of course you're also invited to come to Amsterdam to attend my presentation of how you can get the best out of Gallery.
So register now for the Geekmoot 2010.
It ads some nice features to make it much more flexible to use.
The changelog:
- New action gallerytree
- Define custom fields for galleries or images
- Added smarty variables $numimages and $numdirs
- Editable url-prefix for mod_rewrite/pretty_urls
- New 'Add subgallery' button in first tab galleries list (FR #5087)
- Edit date of images and subgalleries (FR #5142)
- Gallery folder setting (FR #5232)
- Automatic refresh of the page after image upload
- Fix for Bugreport #5159: drop chmod of thumbnails
- Fix for Bugreport #4690: Install fails with no feedback if Modules folder not writeable
- Fix for Bugreport #4873: unalowed characters should be replaced in directoryname
- Fix for Bugreport #4735: error with filenames
- Minor bugfix in moveto function
I hope you enjoy using it. If you find Gallery usefull, please consider to join the GeekMoot Donation Drive.
Of course you're also invited to come to Amsterdam to attend my presentation of how you can get the best out of Gallery.
So register now for the Geekmoot 2010.
Re: A new photo album manager : Gallery
very nice! seems to work without any troubles. tested the date modifications. this saves me a lot of time and my clients will be happy with the new "add-gallery-button"
. Thank you Jos
