ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

SlideshowPro in Post

January 29, 2008 3:58pm

Subscribe [7]
  • #1 / Jan 29, 2008 3:58pm

    Supercool

    9 posts

    Hi there,

    (Apologies if I’m asking the same question as others, but I’ve spent two days reading and following tutorials and suggestions from other posts and am still at a loss)

    I’ve got my gallery with images in a few different categories and I’ve followed the 5 pieces tutorial for setting up SlideshowPro to pull it’s images out and into a weblog template.

    I simply want to be able to choose which category of images is shown when i create a post, say from inputting the gallery’s category id into a custom field.

    At the moment i can hard code the category id into the xml file, but i need some way of pulling my chosen category out of the relevant weblog.

    Does this make any sense? If so, is this even possible?

    I’ve not had much luck so far, but I don’t know if I’m trying to be too clever or if this is something very simple.


    Thanks for your time.

  • #2 / Feb 04, 2008 12:33pm

    pcmeissner

    48 posts

    Bump.

    I’m running into the same brick wall. Any suggestions. I am at a loss on how to pass the appropriate category ID to the XML file before the weblog entry is rendered.

  • #3 / Feb 05, 2008 9:52am

    Supercool

    9 posts

    I managed to solve my problem with SlideshowPro Director. It’s an extra cost on top of SSP but it’s perfect for what i wanted. With Director you can host images on SSP own server (extra cost) or install it on you’re own (which i went for).

    It installs half a dozen more tables onto your DB but has a separate backend to EE and very nice it is too. All lovely ajax that help you upload images into gallery and albums in no time – all very user friendly. Here you can add category images, captions, titles etc that then get pulled through into your flash slideshow. Each album has it’s own xml feed.

    Flash gets the xml file from a parameter i included in the swf object that contains an EE tag for a custom field. I enter the album id into my post and it slots it into the xml file path.

  • #4 / Feb 08, 2008 12:16am

    John Henry Donovan

    12339 posts

    Background
    Robin has done a lot of this work for you already by creating a little known about extension which basically creates a dropdown menu in the publish page- options are the gallery categories- select one and the category id is entered into the field.  Saves having to flip over to the gallery and look it up and adding gallery tags inside a weblog tag which will add to you queries.

    Custom Field
    Create a custom field with input text as type and give it a name like {gallerycategory}. On your field group pahe which list your custom fields, hover your mouse over the field you created and look at the stats bar below which gives a long url and at the very end is your field_id. Make note of that.

    Download the extension here. Be sure to change the 2 items mentioned

    You’ll need to open up the extension- and on line 33 alter:
    $alter_field = 32;

    The number?  That should be the field id of the text field where you want the category id to be inserted.  That field will be ‘replaced’ on the user side by a dropdown filled with the category names.

    On line 37 you’ll need to alter:
    $results = $DB->query(“SELECT cat_id, gallery_id, cat_name FROM exp_gallery_categories WHERE gallery_id=2 ORDER BY cat_name”);

    Change gallery_id=2 to equal the id number of whatever gallery you want to pull the categories from.

    Change it, save it, upload it to the extensions folder- then enable the extension.

    The Template
    Follow the tutorial at .(JavaScript must be enabled to view this email address) at 5pieces

    and in your SWFobject code replace

    fo.addVariable("xmlfile", "http://www.somesite.com/index.php/gallery/images/?album_id=<?php echo $cat_id;?>");

    with

    fo.addVariable("xmlfile", "http://www.somesite.com/index.php/gallery/images/?album_id={gallerycategory}");

    You can see it working here

  • #5 / Mar 03, 2008 11:38pm

    peachorama

    35 posts

    hi vinnyio, i’m trying to follow the instructions:

    You’ll need to open up the extension- and on line 33 alter: 
    $alter_field = 32;
    
    The number?  That should be the field id of the text field where you want the category id to be inserted.  That field will be ‘replaced’ on the user side by a dropdown filled with the category names.

    where do i find the ‘field id’. i’ve looked everywhere in my control panel and can’t seem to find it!?!

    thanks in advance!

  • #6 / Mar 04, 2008 9:19am

    pcmeissner

    48 posts

    where do i find the ‘field id’

    Go to Weblog Administration > Field Groups > Custom Fields

    Select the “gallerycategory” field that you created.

    Look at the url. It should end with edit_field&field;_id=##

  • #7 / Mar 04, 2008 3:04pm

    peachorama

    35 posts

    thanks pcmeissner! i realized it was explained in the previous post -  :cheese:
    but i appreciate your quick response!

  • #8 / Mar 23, 2008 12:15am

    Lisa E

    124 posts

    NEVERMIND—just figured out my issue

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases