Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

slideshow integration with imagegallery-UC Please help me


Go to End
Reply


15 Posts   2253 Views

Avatar
Rishi

Community Member, 97 Posts

12 February 2010 at 3:21am

Edited: 12/02/2010 3:21am

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

Avatar
UncleCheese

Forum Moderator, 4096 Posts

12 February 2010 at 3:25am

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.

Avatar
Rishi

Community Member, 97 Posts

12 February 2010 at 6:21pm

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.

Avatar
patjnr

Community Member, 101 Posts

12 February 2010 at 8:49pm

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.

Avatar
Rishi

Community Member, 97 Posts

18 February 2010 at 7:39am

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

Avatar
jim4nz

Community Member, 5 Posts

18 February 2010 at 12:59pm

it should be under mysite/code/page.php

Avatar
patjnr

Community Member, 101 Posts

18 February 2010 at 8:13pm

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.

Avatar
UncleCheese

Forum Moderator, 4096 Posts

19 February 2010 at 3:38am

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.

Go to Top