Problem with Gallery usage

Discuss PivotX 2.0.x extensions here, and view extensions that are available for download.

Problem with Gallery usage

Postby rusmos » Sun Oct 23, 2011 10:18 pm

I am new to PivotX.
Installed the system, chose and configured a template. Installed most of the extensions.

Unfortunatelly I can not make any gallery work:
1. I used Bonus Fields (installed and configured). No way
2. I used Gallery (Bonus Fields switched off). No way
3. I used Dir Gallery (Bonus Fields switched off). No way

Sorry for my stupid question, can somebody step by step say what to do to make it work? From installing the extension (ANY !!!) till page or entry code.
Can somebody write a LIFE (working) example of the code?

PS I read the manual, FAQ and these extensions explanation
rusmos
 
Posts: 4
Joined: Sun Oct 23, 2011 10:07 pm

Re: Problem with Gallery usage

Postby Harm10 » Mon Oct 24, 2011 5:24 am

First what version are you using of PivotX and of Bonusfields?
If you installed both of them correctly then you have to configure Bonusfields through the Dashboard / Extensions.
If you want a galleryimagelist (the correct name in Bonusfields) you have to add it to the config. You need 2 if you want to use it for entries and pages.
After you added this bonusfield it should show up whenever you edit an entry or a page.
Then you can add images to the list.
To show those images you need to edit your templates as described in the documentation.

Does this help? If not please post a link. If needed someone can have a look but then will need a login.
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: Problem with Gallery usage

Postby rusmos » Mon Oct 24, 2011 11:56 pm

1. PivotX 2.3.1 (Template PHOENIX)
2. Bonusfields 1.19
3. I installed Bonusfiled
4. I configured two gallery fields for entries and pages
5. When i create, say entry i SEE the gallery, I add pixs, I save the entry (save, not publish). Load the entry again and the gallery is EMPTY.
6. I added the code to entry.tpl
Code: Select all
[[bonusgallery assign='gallery' content=$entry.extrafields.galleryimagelist fancybox='1']]
[[foreach from=$gallery item='image']]
    <a href="[[$image->src]]" class="fancybox" title="[[$image->title|escape]]" rel="[[$image->rel]]">
        <img src="[[$image->getImgSrc(75,75)]]" alt="[[$image->alt|escape]]"
            title="[[$image->title|escape]]" />
    </a>
[[/foreach]]

OR
Code: Select all
[[bonusgallery assign='gallery' content=$page.extrafields.galleryimagelist]]
[[foreach from=$gallery item='image']]
    <h2>[[$gallery->number]]/[[$gallery->length]] [[$image->title|escape]]</h2>
    <img src="[[$image->getImgSrc(600,120)]]" alt="[[$image->alt|escape]]"
        title="[[$image->title|escape]]" data:info="[[$image->data|escape]]" />
[[/foreach]]

7. NO change of the entry on user side
8. I can give a login if it may help, that is not a problem.

PS If you could add your first reply to the documentation it would help others a lot to understand the process. Some things are obvous to you but not to starters )
Last edited by rusmos on Tue Oct 25, 2011 9:19 am, edited 1 time in total.
rusmos
 
Posts: 4
Joined: Sun Oct 23, 2011 10:07 pm

Re: Problem with Gallery usage

Postby Harm10 » Tue Oct 25, 2011 7:05 am

I am not the author of Bonusfields so any suggestions for the documentation have to be directed to marcelfw.
I am willing to have a look (you can send me login data via PM).
Another question: I see you use the Fancybox sample. You did install Fancybox extension?
It is weird that whenever you add images and come back they seem to be gone.
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: Problem with Gallery usage

Postby rusmos » Tue Oct 25, 2011 9:18 am

1. Fancybox is installed
2. There can be an option with Fancybox and without Fancybox. So it is not material I think.
3. I created a superuser for you. The LOGIN is sent to you as a private message.
rusmos
 
Posts: 4
Joined: Sun Oct 23, 2011 10:07 pm

Re: Problem with Gallery usage

Postby Harm10 » Tue Oct 25, 2011 3:20 pm

I checked your installation and it works now (I made a page called Test! and an entry called Test!).
There were several problems. First the problem many beginning users have: if you specify variables in your template you should use $entry within the entry template and $page in the page template.
Secondly if you use Bonusfields you should use the sample given in the documentation otherwise the gallery won't be set-up.
The documentation specifies:
Code: Select all
[[bonusgallery assign='gallery' content=$entry.extrafields.galleryimagelist fancybox='1']]
[[foreach from=$gallery item='image']]
    <a href="[[$image->src]]" class="fancybox" title="[[$image->title|escape]]" rel="[[$image->rel]]">
        <img src="[[$image->getImgSrc(75,75)]]" alt="[[$image->alt|escape]]"
            title="[[$image->title|escape]]" />
    </a>
[[/foreach]]
which means that the fieldname you have to define should be called galleryimagelist. If you give it another name then the template code should be changed accordingly. And this sample is only meant for entries! You can use it in the page template but then $entry has to be changed to $page!

But there seems to be a problem in Bonusfields itself. If you locate the gallery before the introduction saving doesn't seem to work!
Maybe Marcel can take a look at that?
I've positioned it now before the keywords (were I normally use it) and there saving works.

Please check out the code I left in the templates and fine tune if necessary.
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: Problem with Gallery usage

Postby rusmos » Tue Oct 25, 2011 4:00 pm

Guys, it really works!

Many thanks to Harm10!!!
rusmos
 
Posts: 4
Joined: Sun Oct 23, 2011 10:07 pm

Re: Problem with Gallery usage

Postby Harm10 » Tue Oct 25, 2011 4:26 pm

Glad to be of help! Maybe marcelfw can reply in here that he is going to investigate the potential problem?
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)


Return to 2.x Extensions

Who is online

Users browsing this forum: No registered users and 1 guest

cron