Results 1 to 9 of 9

Thread: Ultimate Fade-in slideshow (v2.4)

  1. #1
    Join Date
    Jan 2011
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Ultimate Fade-in slideshow (v2.4)

    1) Script Title: Ultimate Fade-in slideshow (v2.4)

    2) Script URL (on DD): http://www.dynamicdrive.com/forums/s...ad.php?t=55611

    3) Describe problem:

    I am trying to place images on one particular page on my Wordpress website. I have used the tutorial to show the slideshow by placing the script in the head and it does come up with the error:

    error: Div with id "fadeshow1" not found on page

    when selecting a different page. I have sourced this forum and found the post stated above that shows you to put the script in the functions.php.

    However when I do this IE or firefox does not recognise the site. It shows
    the error.

    Parse error: syntax error, unexpected '}' in C:\xampplite\htdocs\wordpress\wp-content\themes\Ois_design\functions.php on line 23

    Im relatively new to wordpress, php, css, xhtml and javascript. So any help would be greatly appreciated. Is there anything im missing out on. I am using a localhost to develop the site, so I cannot provide a link. I have attached the functions.php code below:

    [CODE]
    <?php

    if ( function_exists('register_sidebar') )

    register_sidebar();
    ?>

    function js_in_head(){
    if(is_front_page()){?>

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
    <script type="text/javascript" src="<?php echo get_stylesheet_directory_uri(); ?>/fadeslideshow.js">

    /***********************************************
    * Ultimate Fade In Slideshow v2.0- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
    ***********************************************/
    </script>

    <script type="text/javascript" src="<?php echo get_stylesheet_directory_uir(); ?>/imagearray.js"></script>

    <?php }}
    add_action('wp_head', 'js_in_head');
    [CODE]

  2. #2
    Join Date
    Jan 2011
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Pardon my typing, I have rectified this

    [code]

    <script type="text/javascript" src="<?php echo get_stylesheet_directory_uri(); ?>/imagearray.js"></script>

    [code]

  3. #3
    Join Date
    Jan 2011
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    After changing the typing error and placing the following code in the functions.php:

    [code]

    <?php

    if ( function_exists('register_sidebar') )

    register_sidebar();
    ?>

    function js_in_head(){
    if(is_front_page()){?>

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
    <script type="text/javascript" src="<?php echo get_stylesheet_directory_uri(); ?>/fadeslideshow.js">

    /***********************************************
    * Ultimate Fade In Slideshow v2.0- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
    ***********************************************/
    </script>

    <script type="text/javascript" src="<?php echo get_stylesheet_directory_uri(); ?>/imagearray.js"></script>

    <?php }}
    add_action('wp_head', 'js_in_head');

    [code]

    I get the following error:

    Parse error: syntax error, unexpected '}' in C:\xampplite\htdocs\wordpress\wp-content\themes\Ois_design\functions.php on line 23

    Basically I am trying to get the image slideshow to show on one page (the about us page). I need this to be placed in the body section, and not the head where the previous solution did.

    I hope my previous post didnt suggest that I solved the problem. It was just a typo.

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Wait a minute, slow down. Go back to the way you had it when you were getting the alert:

    Code:
    Error: Div with ID "fadeshow1" not found on page.
    That was probably fine, it probably just meant that you didn't have that division on every page. If so, just comment out that line in the script (line #50 in my copy, addition red):

    Code:
     . . . button=(setting.descreveal=="always")? '<img class="close" src="'+closebutt[0]+'" style="float:right;cursor:hand;cursor:pointer;width:'+closebutt[1]+'px;height:'+closebutt[2]+'px;margin-left:2px" title="Hide Description" />' : ''
    	var slideshow=this
    	jQuery(document).ready(function($){ //fire on DOM ready
    		var setting=slideshow.setting
    		var fullhtml=fadeSlideShow.routines.getFullHTML(setting.imagearray) //get full HTML of entire slideshow
    		setting.$wrapperdiv=$('#'+setting.wrapperid).css({position:'relative', visibility:'visible', background:'black', overflow:'hidden', width:setting.dimensions[0], height:setting.dimensions[1]}).empty() //main slideshow DIV
    		if (setting.$wrapperdiv.length==0){ //if no wrapper DIV found
    			//alert("Error: DIV with ID \""+setting.wrapperid+"\" not found on page.")
    			return
    		}
    		setting.$gallerylayers=$('<div class="gal . . .
    This has come up before with WordPress and other CMS's. That's always taken care of it. There was one case where the page was invalid and that caused the error even though the fadeshow1 division was on the page, but that wasn't with a CMS.

    If you want more help:

    Please post a link to a page on your site that contains the problematic code so we can check it out.
    Last edited by jscheuer1; 01-08-2011 at 05:05 AM. Reason: English usage
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. The Following User Says Thank You to jscheuer1 For This Useful Post:

    Woppadon (01-07-2011)

  6. #5
    Join Date
    Jan 2011
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    John

    Thank you so much for the swift reply. That sorted it. I hope ye have a good one.

    Cheers

  7. #6
    Join Date
    Jan 2011
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Hello, me again..............

    I know John kindly help me sort out my error above. However when selecting a sub menu item it shows: "Done, but errors on page". Does this mean that I have to use the following

    Code:
     
    <div id="fadeshow1" style="display:none;"></div>
    on each page as discussed in the post stated at the start of the tread? Or is there a better way to do this?

    Is it possible to use this fade in slide show on multiple pages, using different images in each one. I think by creating new names i.e fadeshow2 etc it can, am I right?

    I would be very grateful for any information.

    I have tried to upload my new blog but I am having trouble to convert it from xampplite, as I hosts it locally.
    Last edited by jscheuer1; 01-12-2011 at 07:34 PM. Reason: format code

  8. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    There is no sub menu item in this script. If that's what's causing the error, chances are it has nothing to do with this script.

    Ultimately if you want to continue using scripts, you are going to have to either learn how to use your CMS with scripts or get someone to do it for you. That's because it's likely you will from time to time be updating things and/or changing things around.

    This forum isn't really designed for that purpose.

    As for having a different slideshow on different pages, that's one way to go about it. However, you would be better off only having the one call to the show that is needed on any given page that requires it.

    The way you are doing things now appears to be to put every script on every page. Unless they are required on every page, this is inefficient at best. There must be a way to put just the scripts you need for a given page on that page.

    Some scripts may be required for all. Those should remain in the template/include for all pages. Those that are only required for a given page should go somewhere that is only written to that page.

    If you want more help on sorting out this latest error, I would need a link to the page. But without access to the CMS, I will only be able to tell you so much.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  9. #8
    Join Date
    Jan 2011
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Hello,

    Sorry for the delay in getting back to upload my site. I have done so, so you can view it at:

    http://www.officeinteriorsolutions.com/blog/about-us

    You will be able to see what I am doing. I want to be able to have a slide show on nine different pages in wordpress. Each of them will be different in size and of the pictures in them. I know that by placing the script in the header is not efficient and that this has been covered in the post:

    http://208.75.149.97/forums/showthread.php?p=230316

    however I want the slideshow in the body section on the page not the header. Is there a a way round this. I would be very grateful. On the site, I can get the first slideshow working on the about us page. (excuse some of the images as they havent fully uploaded yet) I have also used the code to create a slideshow on the following page:

    http://www.officeinteriorsolutions.c...-ois-gives-you


    However this doesnt work.

    I am at your disposal........

  10. #9
    Join Date
    Jan 2011
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Numerous scripts in the Body section of different pages in Wordpress

    I have changed all the links etc on my uploaded site. I appologize for this, if I seemed shoddy. Can anyone help me with the questions on the previous post. I would really appreciate it. I acknowedge that I will have to learn script. I would rather not use flash to do this.

Bookmarks

Posting Permissions

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