Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Mootools 1.2 Gallery - Can anyone get it to work in SS?

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 3346 Views
  • kudesign
    Avatar
    Community Member
    64 Posts

    Mootools 1.2 Gallery - Can anyone get it to work in SS? Link to this post

    I am building a portfolio in my SS site, and have found a good mootools gallery at http://tutorialdog.com

    A demo can be seen at tutorial dog: http://tutorialdog.com/image_gallery/sample.html

    I have tried to implement this into my SS site, but have had no luck so far.

    This is what I did:

    1. Upload the required .css and the .js files to appropriate folders in my site
    2. In mysite/code/Page.php, I wrote the additional .css & .js files.

    Requirements::themedCSS("typography");
          Requirements::themedCSS("form");
          Requirements::themedCSS("accordion");
          Requirements::themedCSS("layout");
          Requirements::themedCSS("imagegallery");
          Requirements::javascript("themes/BrightSide1/javascript/fader.js");
          Requirements::javascript("themes/BrightSide1/javascript/accordion.js");
          Requirements::javascript("themes/BrightSide1/javascript/mootools-12.js");
          Requirements::javascript("themes/BrightSide1/javascript/mootools-12-more.js");
          Requirements::javascript("themes/BrightSide1/javascript/imagegallery.js");

    3. Made a new page in the admin, and paste the gallery HTML into the page, then save
    4. When I preview the draft page, the gallery did not work, I checked the page source, and see it had loaded the js and css files, but no mootool gallery... the page shows only the css effects. Here is what my page looks like: http://www.kudesign.co.nz/studio/java-test/

    Has anyone tried to implement this sort of gallery into SS with success? Sorry I am new to this, and any help will be much appreciated!!!!!!

  • Nivanka
    Avatar
    Community Member
    395 Posts

    Re: Mootools 1.2 Gallery - Can anyone get it to work in SS? Link to this post

    This is definitely possible,

    I did a portfolio page recently but with Jquery.

    http://www.sitestudio.es/

    Have a look, all you have to do is to think of the view and the controller.

  • kudesign
    Avatar
    Community Member
    64 Posts

    Re: Mootools 1.2 Gallery - Can anyone get it to work in SS? Link to this post

    Thanks for the feedback. I checked out your lovely site, love the zoom in-out navigation.

    When you say think of the 'view' and 'controller', do you mean 'HTML/css presentation', and the '.js' controller file? If so, this is what I've been thinking, made the HTML/CSS work and previewed fine in dreamweaver, but still could not transfer what I have made into SS.

    What ways did you call up the .js files in your SS? Please advise, thanks!

  • Liam
    Avatar
    Community Member
    470 Posts

    Re: Mootools 1.2 Gallery - Can anyone get it to work in SS? Link to this post

    When I view the source, I'm pretty sure I see all the css/js files.

    You might want to go about adding the css/js files a different way. One way might be to create a custom page type for your gallery page, and then add all the files they want you're doing so, instead of adding to to page.php

    The reason being, is this is going to be included on every page on your website, even when you're not using it. Granted, once downloaded it will be cached, but it's still not a proper method of doing so and will increase the page load time of each page.

  • kudesign
    Avatar
    Community Member
    64 Posts

    Re: Mootools 1.2 Gallery - Can anyone get it to work in SS? Link to this post

    Great to hear from you. I've been reading a few posts posted by you on the forum:)

    Could you please point the direction of where and how I can add a new page type? this sounds like a solution for me.

    Thanks a million!

  • kudesign
    Avatar
    Community Member
    64 Posts

    Re: Mootools 1.2 Gallery - Can anyone get it to work in SS? Link to this post

    Don't worry, I will have a good read on this article: http://doc.silverstripe.com/doku.php?id=tutorial:2-extending-a-basic-site

    and see how I go from there cheers.

  • Nivanka
    Avatar
    Community Member
    395 Posts

    Re: Mootools 1.2 Gallery - Can anyone get it to work in SS? Link to this post

    hi kudesign,

    yes I am talking about the javascripts and the htmls, also it is not enough, if you are going to have some other content, just like the slide show I have used there you have to make new page types, and make new database tables for them.

    All you have to think is that try to arrange the final output to work. so from the backend you have to arrange the templates, php codes (controller), and the database which then will out put what you need.

    Try to hack, not just to learn.

    3346 Views
Page: 1
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.