a different slideshow per entry/page

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

a different slideshow per entry/page

Postby krebra » Mon Feb 15, 2010 5:45 pm

is it possible to create different slide show (different set of photos) for each entry or page?
as i can see problem is that all photos are in the same directory. if there will be more than one slideshow directory and a parameter along with [[ slideshow ]] then it could be possible.
krebra
 
Posts: 10
Joined: Tue Feb 02, 2010 4:38 pm

Re: a different slideshow per entry/page

Postby hansfn » Mon Feb 15, 2010 11:24 pm

That shouldn't be a problem. I would be grateful if you could test the change I propose below.

In the file extensions/slideshow/widget_slideshow.php, look for "function smarty_slideshow" and change the beginning to the following:
Code: Select all
function smarty_slideshow($params) {
    global $PIVOTX, $slideshow_config;

    $params = clean_params($params);
    if (isset($params['folder'])) {
        $foldername = $params['folder'];
    } else {
        $foldername = getDefault($PIVOTX['config']->get('slideshow_folder'), $slideshow_config['slideshow_folder']);
    }

    $width = getDefault($PIVOTX['config']->get('slideshow_width'), $slideshow_config['slideshow_width']);
    $height = getDefault($PIVOTX['config']->get('slideshow_height'), $slideshow_config['slideshow_height']);
    $limit = getDefault($PIVOTX['config']->get('slideshow_limit'), $slideshow_config['slideshow_limit']);
    $order = getDefault($PIVOTX['config']->get('slideshow_orderby'), $slideshow_config['slideshow_orderby']);
    $thickbox = $PIVOTX['config']->get('slideshow_thickbox');


Then you should be able to use

Code: Select all
[[ slideshow folder=foldername ]]

where the folder "foldername" is located in the image folder.
hansfn
Developer
 
Posts: 3282
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: a different slideshow per entry/page

Postby krebra » Tue Feb 16, 2010 5:49 pm

yep it works. thanks so much.
krebra
 
Posts: 10
Joined: Tue Feb 02, 2010 4:38 pm

Re: a different slideshow per entry/page

Postby amorph » Fri Mar 19, 2010 7:23 pm

Perfect! I was looking for this as well. One problem, though; the images don't open in thickbox.
amorph
 
Posts: 6
Joined: Fri Mar 19, 2010 6:49 pm

Re: a different slideshow per entry/page

Postby hansfn » Fri Mar 19, 2010 8:07 pm

You aren't telling what version of PivotX you are using so I can't help you. Seriously, providing as much info as possible makes it so much easier to help - saving my time so I can help more people or code more ...

I suggest updating to 2.0.2 or 2.1.0 beta4 - see http://pivotx.net/files/
hansfn
Developer
 
Posts: 3282
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: a different slideshow per entry/page

Postby amorph » Fri Mar 19, 2010 8:35 pm

Sorry, using v 2.1.0 beta3.
amorph
 
Posts: 6
Joined: Fri Mar 19, 2010 6:49 pm

Re: a different slideshow per entry/page

Postby hansfn » Fri Mar 19, 2010 8:59 pm

Thx. 2.1.0 beta 3 is quite new, but could you please try beta 4 anyway (where the change I proposed in the post above is included)? Remember to visit the extension settings to select Thickbox as pop-up. If not, I would at least need an URL to your site (and that you enabled debugging in PivotX).
hansfn
Developer
 
Posts: 3282
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: a different slideshow per entry/page

Postby amorph » Sat Mar 20, 2010 9:40 am

Thanks! With beta 4 the popups also work. Now I'm going to try centering the thing on the page, and It'll be all good.
amorph
 
Posts: 6
Joined: Fri Mar 19, 2010 6:49 pm

Re: a different slideshow per entry/page

Postby Schop » Sat Mar 20, 2010 1:13 pm

To increase the awesomeness of this solution, it would be nice to have an uploader per page/entry, kinda like in the gallery extension.

I was tyring to get this working, and of course it is no problem to adapt the uploader used in the gallery extension to get this to work, but the files are always uploaded to images/date. It would be nice (for this purpose) to have them uploaded to images/slideshows/entry-title or something like that, but I can't figure out how to to do it.

Hans, can you point me in the right direction here?
User avatar
Schop
Contributor
 
Posts: 485
Joined: Mon Apr 21, 2008 1:47 pm
Location: Hudson, Ohio

Re: a different slideshow per entry/page

Postby amorph » Sun Mar 21, 2010 2:15 pm

Another issue: When I try combining portrait-oriented and landscape-oriented images in the same slideshow I can't find a way to display both properly. As far as I can tell the slideshow relies on every picture having similar dimensions, and if not they are stretched. Ideally the aspect ratio should be kept as it is, but then I'd have to edit every portrait-oriented image and insert whitespace on each side, which is tedious. Is there another way?
amorph
 
Posts: 6
Joined: Fri Mar 19, 2010 6:49 pm

Next

Return to 2.x Extensions

Who is online

Users browsing this forum: No registered users and 3 guests

cron