Jump to:

7939 Posts in 1472 Topics by 944 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » slideshow integration with imagegallery-UC Please help me

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2
Go to End
Author Topic: 1735 Views
  • Rishi
    Avatar
    Community Member
    97 Posts

    slideshow integration with imagegallery-UC Please help me Link to this post

    hello
    i am trying to integrate a slideshow with imagegallery i have tried my best to do the changes to make it running though i am able to use the images uploaded from cms admin panel but the slideshow is not working,i suggest the js files are not getting loaded in silverstripe please help me out in this.i have uploaded the file so that anyone can download it and use it to know the error
    you can download the file from the below link

    http://rapidshare.com/files/349163789/slideshow.zip.html

    special request to UC
    thank you in advance

  • UncleCheese
    Avatar
    4085 Posts

    Re: slideshow integration with imagegallery-UC Please help me Link to this post

    Sorry you're having trouble, Rishi. Unfortunately, I can't do development work for free. If you'd like me to troubleshoot your project, you can contact me through my website and schedule a time to commission the work.

  • Rishi
    Avatar
    Community Member
    97 Posts

    Re: slideshow integration with imagegallery-UC Please help me Link to this post

    i can understand your problem,but being a student i cant hire you,hope i can solve this issue myself.anyway thanks for the help in my other issues.

  • patjnr
    Avatar
    Community Member
    101 Posts

    Re: slideshow integration with imagegallery-UC Please help me Link to this post

    Hi

    Rishi

    why are you using the image_gallery and extending ImageGalleryUI.

    this is how i do it.
    create a new page type and use ImageDataObjectManager

    or in your init paste this line

    Requirements::set_write_js_to_body(false);

    it will force the requirements to be write in the head.

  • Rishi
    Avatar
    Community Member
    97 Posts

    Re: slideshow integration with imagegallery-UC Please help me Link to this post

    hello PatJnr
    thanks for replying me,i am new to silverstripe ,can you please explain me a bit about the way your have suggested.la sample code will be a great help
    thank you in advance

  • jim4nz
    Avatar
    Community Member
    5 Posts

    Re: slideshow integration with imagegallery-UC Please help me Link to this post

    it should be under mysite/code/page.php

  • patjnr
    Avatar
    Community Member
    101 Posts

    Re: slideshow integration with imagegallery-UC Please help me Link to this post

    i dont wana give you poison.

    question first. when you say "able to use the images uploaded from cms admin panel" what do you mean.
    when you run you site do "these" images get loaded one after the other but NOT sliding.
    If so, this is purely JavaScript problem. Your slideshow JavaScripts are conflicting with Image_gallery ones and the later is favored.

    An alternative solution will be to have a slideShowPage which will have something like this.

        static $has_many = array(
                            'Images' => 'Resource'
                             );
          
       public function getCMSFields()   {
          $f = parent::getCMSFields();
          $fileMan = new ImageDataObjectManager(
             $this,
             'Images',
             'Resource',
             'Attachment',
             array(
                'Name' => 'Name',
                'Description' => 'Description'
             ),
             'getCMSFields_forPopup'
          );
          $fileMan->setAllowedFileTypes(array('jpg'));
          $fileMan->setGridLabelField('Name');
          $fileMan->setPluralTitle('Images');
          $fileMan->setAddTitle( 'slideshow image' );
           if(!$this->Parent){
             $f->addFieldToTab("Root.Content.SlideShowImages", $fileMan);
             $f->addFieldToTab("Root.Content.SlideShowImages", new HeaderField(
                $title = "Slide Show Images",
                $headingLevel = "2"
             ));
                
          }
          
          return $f;
       }
       

    in the controller

       function init() {
          parent::init();
          Requirements::javascript("you/Script/Address.js");
          Requirements::set_write_js_to_body(false);
       }

    this should give you a working slide show.

    hope this is what you a looking for.

  • UncleCheese
    Avatar
    4085 Posts

    Re: slideshow integration with imagegallery-UC Please help me Link to this post

    Yup. With out a viable slideshow module installed, the best approach is to take a step back and use an ImageDOM. That way you can have the freedom to customize the UI.

    Keep in mind there's also the SlideshowPro module, a subset of ImageGallery. If you're looking for a Flash based, solution, it's top notch.

    1735 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.