• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Listit2 and gallery problem
PostPosted: Mon Sep 24, 2012 2:51 pm 
Offline
Forum Members
Forum Members

Joined: Thu May 18, 2006 3:53 pm
Posts: 91
Hi Everybody.

I have a problem with Listit2 and gallery.
If I create a "Gallery Dropdown" field, the output given is only the name of the gallery followe by a trailing slash: galleryname/ and not the gallery.

--EDITED--

In the same time, I tried to use the alias of the record to create a hardwired gallery tag in the detail template (copying it from the related existing gallery), but the output is a broken gallery without an image (broken lnks). Also if I click on a gallery image, I obtain a broken page with this error:

Quote:
FATAL SQL ERROR:
QUERY: SELECT A.*, B.* FROM cms_module_listit2_item A, cms_module_listit2_category B WHERE A.category_id = B.category_id AND A.active = 1 && alias = 'uploads/images/Gallery/001_Castelmaggiore/001-a.JPG' LIMIT 1


the same using the Gallery dropdown field alias

I'm using CMSMS 1.11.1 with the latest modules

MY DETAIL TEMPLATE (set as detail default)
Code:
<div class="group hsection">
  <div class="center fotodettaglio">
  <h2 class="item-title">{$item->title|cms_escape}</h2>
  <p><img src="/uploads/{$item->foto}"/></p>
</div>
<div class="item-category">Category: {$item->category_name|cms_escape}</div>

<div class="group hsection">
 
{if !empty($item->fielddefs)}
    <div class="col span_8_of_12 dati">
    {foreach from=$item->fielddefs item=fielddef}
<p><label>
        {if $fielddef.type == 'upload_file' || $fielddef.type == 'select_file'}
            {$fielddef.name|cms_escape}:</label> <a href="{$uploads_url}/{$fielddef.value|cms_escape}">{$fielddef.value|cms_escape}</a></p>
        {else}
            {$fielddef.name|cms_escape}:</label> {$fielddef.value|cms_escape}</p>
        {/if}
    {/foreach}
    </div>
<div class="col span_4_of_12 galleria">
<p>Using Item Alias</p>
<p>{Gallery dir="{$item->alias|cms_escape}"}</p>
<p>Using gallery dropdown field alias</p>
<p>{Gallery dir="{$item->galleria|cms_escape}"}</p>
<h4>{$return_url}</h4>
</div>
{/if}
</div><!-- item -->

LINK (work in progress): http://www.studiolatrofa.it/listit2/60/ ... giore.html


Top
 Profile  
 
 Post subject: Re: Listit2 and gallery problem
PostPosted: Mon Sep 24, 2012 3:50 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Aug 12, 2008 9:30 pm
Posts: 1979
Location: Feldkirchen in Kärnten, Austria
Ok that slash in Gallery output seems like a bug :-) no idea if we produced it or was GalleryDropdown function in Gallery module changed after our release or...

But first this is wrong, you can not use smarty inside smarty tag
Code:
{Gallery dir="{$item->galleria|cms_escape}"}


correct would be
Code:
{Gallery dir=$item->galleria}


but to correct the issue with extra slash try (supposed "galleria" is alis of gallery dropdown field.
Code:
{Gallery dir=$item->fielddefs.galleria.value|substr_replace:'':'-1'}

or
Code:
{Gallery dir=$item->galleria.value|substr_replace:'':'-1'}

_________________
CMSMS Blog - I do this!
Forge profile
Github profile
Twitter
=============================================
Support CMSMS


Top
 Profile  
 
 Post subject: Re: Listit2 and gallery problem
PostPosted: Mon Sep 24, 2012 5:25 pm 
Offline
Power Poster
Power Poster
User avatar

Joined: Wed Sep 05, 2007 8:03 pm
Posts: 3649
Location: The Netherlands
I don't know for sure anymore, but I think it doesn't make a difference if you use a slash or not with the dir parameter.

_________________
Get nice guestbook messages from your site visitors with the brand new Gbook module.
Integrate Piwik Web Analytics in your site admin with the Piwik module.
Extend your global site settings with the Custom Global Settings module.
The Fourth Dutch CMS Made Simple Workshop on April 9 2011 was great fun! Read all about it here
Announcement: The Fifth Dutch CMS Made Simple Workshop coming up?


Top
 Profile  
 
 Post subject: Re: Listit2 and gallery problem
PostPosted: Mon Sep 24, 2012 6:01 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Aug 12, 2008 9:30 pm
Posts: 1979
Location: Feldkirchen in Kärnten, Austria
Jos, when i tried before in listit it was working, but simply returning main gallery dir. So with {Gallery dir='test/'} has same effect as simply calling {Gallery}

_________________
CMSMS Blog - I do this!
Forge profile
Github profile
Twitter
=============================================
Support CMSMS


Top
 Profile  
 
 Post subject: Re: Listit2 and gallery problem
PostPosted: Mon Sep 24, 2012 6:47 pm 
Offline
Forum Members
Forum Members

Joined: Thu May 18, 2006 3:53 pm
Posts: 91
Ok, I changed the template follwing your directions, but the gallery is still broken and clicking on an image gives the blank, unformatted page with the SQL error

Quote:
FATAL SQL ERROR:
QUERY: SELECT A.*, B.* FROM cms_module_listit2_item A, cms_module_listit2_category B WHERE A.category_id = B.category_id AND A.active = 1 && alias = 'uploads/images/Gallery/001_Castelmaggiore/001-a.JPG' LIMIT 1


Top
 Profile  
 
 Post subject: Re: Listit2 and gallery problem
PostPosted: Mon Sep 24, 2012 6:57 pm 
Offline
Power Poster
Power Poster
User avatar

Joined: Wed Sep 05, 2007 8:03 pm
Posts: 3649
Location: The Netherlands
Just an idea from another (not related) post... you might want to try
{cms_module module='Gallery' dir=$item->galleria}

_________________
Get nice guestbook messages from your site visitors with the brand new Gbook module.
Integrate Piwik Web Analytics in your site admin with the Piwik module.
Extend your global site settings with the Custom Global Settings module.
The Fourth Dutch CMS Made Simple Workshop on April 9 2011 was great fun! Read all about it here
Announcement: The Fifth Dutch CMS Made Simple Workshop coming up?


Top
 Profile  
 
 Post subject: Re: Listit2 and gallery problem
PostPosted: Mon Sep 24, 2012 7:31 pm 
Offline
Forum Members
Forum Members

Joined: Thu May 18, 2006 3:53 pm
Posts: 91
I think is more complex than this: the SQl error seems pretty serious

Besides: these are my server settings
Quote:
----------------------------------------------
Cms Version: 1.11.2
Installed Modules:
CMSMailer: 5.2.1
CMSPrinting: 1.0.3
FileManager: 1.4.1
MenuManager: 1.8.4
MicroTiny: 1.2.3
News: 2.12.9
Search: 1.7.7
ThemeManager: 1.1.7
ModuleManager: 1.5.5
Gallery: 1.6
CGExtensions: 1.30
CGCalendar: 1.10.0.1
FrontEndUsers: 1.18.1
CustomContent: 1.8.3
SelfRegistration: 1.6.16
FormBuilder: 0.7.3
portfolio: 2.0
CGSmartImage: 1.9.4
Glossary: 0.10
ListIt2: 1.2.2
GBFilePicker: 1.3.2
TinyMCE: 2.9.11

Config Information:
php_memory_limit:
process_whole_template:
output_compression:
max_upload_size: 25000000
url_rewriting: mod_rewrite
page_extension: .html
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding: utf-8
admin_encoding: utf-8
set_names: true

Php Information:
phpversion: 5.3.16
md5_function: On (Vero)
gd_version: 2
tempnam_function: On (Vero)
magic_quotes_runtime: Off (Falso)
E_STRICT: 0
E_DEPRECATED: 0
memory_limit: 64M
max_execution_time: 120
output_buffering: 4096
safe_mode: Off (Falso)
file_uploads: On (Vero)
post_max_size: 30M
upload_max_filesize: 25M
session_save_path: /tmp (1777)
session_use_cookies: On (Vero)
xml_function: On (Vero)
xmlreader_class: On (Vero)

Server Information:
Server Api: cgi-fcgi
Server Db Type: MySQL (mysql)
Server Db Version: 5.5.24
Server Db Grants: Non riesco a trovare un permesso "GRANT ALL" adatto. Potrebbe significare che ci siano stati problemi nell'installazione o rimozione di moduli, oppure nell'aggiunta o l'eliminazione di elementi, comprese le pagine


Top
 Profile  
 
 Post subject: Re: Listit2 and gallery problem
PostPosted: Tue Sep 25, 2012 6:15 am 
Offline
Forum Members
Forum Members

Joined: Thu May 18, 2006 3:53 pm
Posts: 91
I see (also) that the images failed to load from

/listit2/60/Dettaglio/uploads/images/Gallery/001_Castelmaggiore//thumb_001-a.JPG

instead of

/uploads/images/Gallery/001_Castelmaggiore/thumb_001-a.JPG

This thing do not change if you switch gallery template


Top
 Profile  
 
 Post subject: Re: Listit2 and gallery problem
PostPosted: Fri Oct 05, 2012 3:03 am 
Offline
Forum Members
Forum Members
User avatar

Joined: Wed Aug 29, 2007 4:36 am
Posts: 151
Location: Sydney Australia
Maybe too late but helpful anyway...

I'm using ListIt2 and one of my field definitions is the Gallery dropdown.

My ListIt2 detail page calls the 'Detail' text from a textarea field definition and the Gallery is below that.

The ListIt2 detail template looks like this:
Code:
<div class="item">
<h2 class="item-title">{$item->title|cms_escape}</h2>

{if !empty($item->fielddefs)}
    <div class="item-properties">

    {$item->fielddefs.detail.value}

{capture assign=galdir}{$item->fielddefs.gallery_images.value}{/capture}
{Gallery dir="$galdir" template="PrettyPhoto1"}

    </div>
    {$return_url}
{/if}
</div><!-- item -->

{$item->fielddefs.detail.value} = WYSIWYG textarea field definition called 'detail'.
{$item->fielddefs.gallery_images.value} = gallery dropdown field definition called 'gallery_images'.

PrettyPhoto1 is a customised version of the PrettyPhoto template in Gallery. This works fine but beware of spaces between Smarty elements. This template didn't work for a few days until I daisy chained the capture assign.

Simon66


Attachments:
gallery_in_listit2.png
gallery_in_listit2.png [ 329.43 KiB | Viewed 316 times ]
Top
 Profile  
 
 Post subject: Re: Listit2 and gallery problem
PostPosted: Fri Oct 05, 2012 5:52 am 
Offline
Forum Members
Forum Members

Joined: Thu May 18, 2006 3:53 pm
Posts: 91
Thanks Simon66. I'll give a try next time: in the meantime I gave up and used the News Module to do the work.

By the way: nice layout in the screenshot!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
A2 Hosting