• colt5034

    (@colt5034)


    Hello Experts,

    This is my first post so please excuse my ignorance with etiquette etc.

    I am having problems intigrating Magic Fields Groups with Jquery Supersized Plugin.

    I can get it to work with single images:

    slides: [// Slideshow Images
    {image : ‘<?php echo get(‘supersized_slide_image’, 1,1,0) ?>’, title : ‘<?php echo get(‘supersized_slide_caption’) ?>’}
    ]

    However when i try and duplicate the fields in a group i cant get it to work.

    slides: [// Slideshow Images
    <?php $slides = get_order_group(‘supersized’);
    foreach($slides as $slide){ ?>

    {image : ‘<?php echo get(‘supersized_slide_image’, $slide) ?>’, title : ‘<?php echo get(‘supersized_slide_caption’, $slide) ?>’}<?php } ?>
    ]

    Can anyone help me figure out what i am doing wrong.

    Thanks in advance
    colt5034

Viewing 3 replies - 1 through 3 (of 3 total)
  • hunk

    (@hunk)

    the param of get_order_group is a name any of the fields of group

    slides: [// Slideshow Images
    <?php $slides = get_order_group('supersized_slide_image');
    foreach($slides as $slide){ ?>
    
    {image : '<?php echo get('supersized_slide_image', $slide) ?>', title : '<?php echo get('supersized_slide_caption', $slide) ?>'}<?php } ?>
    ]
    hunk

    (@hunk)

    Thread Starter colt5034

    (@colt5034)

    Hi Hunk

    That worked a treat, thank you.

    Really love the Magic Fields Plugin, great work.

    I have another few questions if you can answer them?

    how would i get it to work with the get_group command?

    This is as far as i got with my code:

    slides: [// Slideshow Images
    <?php $slides = get_group(‘supersized’);
    foreach($slides as $slide){ ?>

    {image : ‘<?php echo $slide[‘supersized_slide_image’][1] ?>’, title : ‘<?php echo $slide[‘supersized_slide_caption’][1] ?>’}<?php } ?>
    ]

    Also, this is a little harder to explain
    As each the image is part of the array i will need a comma at the end of every line e.g. “…title : ‘<?php echo $slide[‘supersized_slide_caption’][1] ?>’} , <?php } ?>”
    However this will cause the plugin to break in IE…
    Is there any way I can add a comma at the end of every line except the last one?

    Thanks again for your help
    Cheers
    Colin

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Problem loading Supersized Images with Magic Fields’ is closed to new replies.