Results 1 to 10 of 29

Hybrid View

  1. #1
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: 1.3.8a - Where do i add custom js for home page only?

    Quote Originally Posted by Stuff4Toys View Post
    So you have the script loading before your /HEAD

    Ratz, I was hoping I could keep all the code in the define_main_page.php so it could be changed easily.

    What file did you put the script in? can I put it in the same file that loads the .js for the homepage only?

    Like:
    Code:
    <?php
    if ($this_is_home_page) { ?>
    <script type="text/javascript" src="includes/rockslideshow/rokslideshow.js"></script>
    <script type="text/javascript" src="includes/rockslideshow/mootools-release-1.11.js"></script>
    <script type="text/javascript">
        window.RokSlideshowPath = '';
    
        var myshow;
        window.addEvent('load', function(){
            var imgs = [];
    
            imgs.push({
                file: 'shop_new.jpg',
                title: 'New Products',
                desc: 'New Products from Johns Kerusso Store.',
                url: 'http://www.langeshome.com/KERUSSO/index.php?main_page=products_new'
            });
            imgs.push({
                file: 'pray_vote.jpg',
                title: 'Pray Vote Pray',
                desc: 'Think About It',
                url: 'http://www.langeshome.com/KERUSSO/index.php?main_page=index&cPath=6'
            });
            imgs.push({
                file: 'running_empty.jpg',
                title: 'Running on Empty',
                desc: 'There is no bigger topic that the price of gas.',
                url: 'http://www.langeshome.com/KERUSSO/'
            });
            imgs.push({
                file: 'fireproof.jpg',
                title: 'Fireproof - the movie',
                desc: 'Never Leave Your Partner Behind, opens in theaters September 26, 2008.',
                url: 'http://www.fireproofthemovie.com/'
            });
    
            myshow = new Slideshow('slideshow', {
                type: 'combo',
                showTitleCaption: 1,
                captionHeight: 45,
                width: 640,
                height: 375,
                pan: 20,
                zoom: 30,
                loadingDiv: 1,
                resize: true,
                duration: [2000, 9000],
                transition: Fx.Transitions.Expo.easeOut,
                images: imgs,
                path: 'images/homepage/'
            });
    
            myshow.caps.h2.setStyles({
                color: '#fff',
                fontSize: '13px'
            });
            myshow.caps.p.setStyles({
                color: '#ccc',
                fontSize: '11px'
            });
        });
    </script>
    <?php 
    } ?>
    Yes, that's where it goes.
    The instructions at the demo site for the slideshow are not very clear on this point (at least for the standalone version).

    Also, don't forget the placeholder in define_main_page.php

    <!-- BOF place holder for slide show -->
    <div id="slidewrap">
    <div id="slideshow"></div>
    <div id="loadingDiv"></div>
    </div>
    <!-- EOF place holder for slide show -->

  2. #2
    Join Date
    May 2007
    Location
    SW Florida
    Posts
    1,051
    Plugin Contributions
    2

    Have a Drink Re: 1.3.8a - Where do i add custom js for home page only?

    Quote Originally Posted by clydejones View Post
    Yes, that's where it goes.
    The instructions at the demo site for the slideshow are not very clear on this point (at least for the standalone version).

    Also, don't forget the placeholder in define_main_page.php

    <!-- BOF place holder for slide show -->
    <div id="slidewrap">
    <div id="slideshow"></div>
    <div id="loadingDiv"></div>
    </div>
    <!-- EOF place holder for slide show -->
    Did that, Got that (getting a little frustrated) and it is still not loading. It's got to be something simple, what am I missing?
    JOhn ><>
    Newest Site: ChargerPros - Stuff4Toys

  3. #3
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: 1.3.8a - Where do i add custom js for home page only?

    Quote Originally Posted by Stuff4Toys View Post
    Did that, Got that (getting a little frustrated) and it is still not loading. It's got to be something simple, what am I missing?
    JOhn ><>
    upload these scripts to the root of your site.

    rokslideshow.js
    mootools-release-1.11.js

    then change these in the main script

    <script type="text/javascript" src="includes/rockslideshow/rokslideshow.js"></script>
    <script type="text/javascript" src="includes/rockslideshow/mootools-release-1.11.js"></script>

    TO

    <script type="text/javascript" src="rokslideshow.js"></script>
    <script type="text/javascript" src="mootools-release-1.11.js"></script>

  4. #4
    Join Date
    May 2007
    Location
    SW Florida
    Posts
    1,051
    Plugin Contributions
    2

    Have a Drink Re: 1.3.8a - Where do i add custom js for home page only?

    The only difference I can see between Your installation and mine is
    #1) Template
    #2) When I try and load http://www.mysticmountainnaturals.co...lideshow/2.jpg your server prevents me from seeing this image and redirects me to an error page.
    #3) When I load http://www.langeshome.com/KERUSSO/im.../fireproof.jpg i get to see the image.
    #4) I thought about changing the filename to 1.jpg but the filenames work for my example page.

    JOhn ><>
    Newest Site: ChargerPros - Stuff4Toys

  5. #5
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: 1.3.8a - Where do i add custom js for home page only?

    Quote Originally Posted by Stuff4Toys View Post
    The only difference I can see between Your installation and mine is
    #1) Template
    #2) When I try and load http://www.mysticmountainnaturals.co...lideshow/2.jpg your server prevents me from seeing this image and redirects me to an error page.
    #3) When I load http://www.langeshome.com/KERUSSO/im.../fireproof.jpg i get to see the image.
    #4) I thought about changing the filename to 1.jpg but the filenames work for my example page.

    JOhn ><>
    Here's an outline of my installation:

    mootools-release-1.11.js
    rokslideshow.js
    (these two files are in the root of my site)

    images/slideshow

    includes/languages/english/html_includes/cold_steel/define_main_page.php (this contains the slideshow placeholder)

    includes/templates/cold_steel/jscript/jscript_slideshow.php
    The first 4 lines of the script are as follows:
    Code:
      <script type="text/javascript" src="mootools-release-1.11.js"></script>
      <script type="text/javascript" src="rokslideshow.js"></script>
    
          <script type="text/javascript">
           
          window.RokSlideshowPath = 'rokslideshow.js';
    The path to the images is as follows:
    Code:
          path: 'images/slideshow/'
    The image names work either way (1.jpg or image_name.jpg)

  6. #6
    Join Date
    May 2007
    Location
    SW Florida
    Posts
    1,051
    Plugin Contributions
    2

    Have a Drink Re: 1.3.8a - Where do i add custom js for home page only?

    THANKS so much for your help.

    Then there are NO differences between your install and mine except Hooverbox and the ic_Atheme template.

    I changed the image names to 1, 2, 3 etc and it didn't help.

    I am going to scope out one of your templates tonight and play with that. I tried changing to the classic template and that didn't help either.

    Oddly enough if you look at the example pages, the <script> is in the page <body>, not in the <head>. This IS going out work even if I have to a few times.

    JOhn ><>
    Newest Site: ChargerPros - Stuff4Toys

  7. #7
    Join Date
    May 2007
    Location
    SW Florida
    Posts
    1,051
    Plugin Contributions
    2

    Idea or Suggestion Re: 1.3.8a - Where do i add custom js for home page only?

    Clyde, do me a favor please?

    What are the file permissions on your rokslideshow.js & mootools script and your images folder?

    Thanks
    JOhn ><>
    Newest Site: ChargerPros - Stuff4Toys

 

 

Similar Threads

  1. How can i create custom center box, for home page only?!?
    By tcarden in forum Customization from the Admin
    Replies: 2
    Last Post: 7 Dec 2012, 07:05 PM
  2. How to show a custom sidebox only on my home page?
    By SandraSD in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 16 Dec 2009, 08:43 AM
  3. Custom Footer for home page
    By jamesdenny in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 7 Feb 2009, 12:32 PM
  4. How do I add custom content to Home page?
    By emilfalcon in forum Basic Configuration
    Replies: 2
    Last Post: 28 Sep 2007, 09:51 PM
  5. Add new content to home page only?
    By purkat in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 17 Aug 2006, 09:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg