Results 1 to 9 of 9

Thread: Text and Image Crawler as an Include

  1. #1
    Join Date
    May 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Text and Image Crawler as an Include

    1) Script Title:
    Text and Image Crawler

    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...wler/index.htm

    3) Describe problem:
    Hello, and thanks very much for this script.

    I have used a couple of scripts from this as a php include for some reason I can't get it done with the above script.

    I am a newbie at all this but have learned a lot and have been able do some pretty cool things but this one maybe because the way it is define is giving trouble.

    I am getting the include to include the script on my page but there are no divs appearing and nothing is scrolling. I can see the sample text and I can see the sample pictures but they are not moving.

    I am using it on my wordpress index.php page and I am sure that has a lot to do with it.

    I get it to work on its own page with no problems.

    Any help or tips would be appreciated.

    Thanks

    Jerry
    Last edited by Snookerman; 05-09-2009 at 05:42 PM. Reason: added “Resolved” prefix

  2. #2
    Join Date
    Feb 2005
    Posts
    18
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    I'm using it on a PHP site as an include and it's working great. I initially had problems that were down to me using the wrong doctype, but that was causing a different problem - it wasn't extending to 100% width of the page.

    If it's showing but not scrolling, have you installed the crawler.js file and put in the link to it in the head of the page?

    Have you got the div before the javascript that calls the scroller? I tried putting it after it and it stopped working then.

  3. #3
    Join Date
    May 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank for your reply.

    I have the crawler.js installed so I don't think it is that. You may be right about the doctype because I'm not even using one in the included page. All the other scripts I have tried have worked with out it or anything else for that matter. I have stayed away from that header stuff because I figured that my wordpress header has all that stuff in it already and the others have worked.

    I have been able to get this script to work as both an html page and a php page on its own just not as an include. I'm going experiment with the doctype and other header stuff but I was hoping it would pop in like all the others.

    thanks

    Jerry

  4. #4
    Join Date
    Feb 2005
    Posts
    18
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    You don't put the doctype in every include, as long as it's in the main content page before the opening <html> tag that's the only place it should be

  5. #5
    Join Date
    May 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    That's what I figured, so doctype probably isn't the problem. This is what they have in the wp index.php header.

    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">
    <head profile="http://gmpg.org/xfn/11">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    All the other ones worked. hmmm wonder if that could be the problem? I need to try and turn all the other ones off and test it.

    thanks

    Jerry
    Last edited by Snookerman; 05-08-2009 at 05:59 PM. Reason: added [html] tags

  6. #6
    Join Date
    May 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    In case anyone can help my webpage is at http://www.iqnewsroom.com. Lots of testing going on at the bottom of the page.

  7. #7
    Join Date
    Feb 2005
    Posts
    18
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Okay, I think I see your problem. You get down to the bottom of your page and the closing </html> tag and then the page starts up all over again -

    Code:
    </body>
    </html>
    <head>
    
    <script type="text/javascript" src="crawler.js">
    /*
    Text and/or Image Crawler Script �2009 John Davenport Scheuer
    as first seen in http://www.dynamicdrive.com/forums/ username: jscheuer1
    This Notice Must Remain for Legal Use
    */
    </script>
    </head>
    You want to delete all of the above and insert everything between the <script> tags before the first </head> tag in the page (about line 6 or 7) :

    Code:
    <script type="text/javascript" src="crawler.js">
    /*
    Text and/or Image Crawler Script �2009 John Davenport Scheuer
    as first seen in http://www.dynamicdrive.com/forums/ username: jscheuer1
    This Notice Must Remain for Legal Use
    */
    </script>
    That should do it

  8. #8
    Join Date
    May 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    It looks like I had left the head tags in the included file so I took them out, but it still doesn't work. I also added the script to the head of the main page like you suggested but still no go.

    I have also taken out all the other included scripts to see if they were effecting it but once again no go.

    Any other thoughts? One thing I can see in all the other scripts is that they all had embedded css and this one has it in the script itself.

    Out of all the scripts I've tried it turns out that this is the one I really want to use. Isn't that the way it usually works?

    I'd appreciate any additional help you can offer.

    Thanks

    Jerry

  9. #9
    Join Date
    May 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Solved

    Thanks Code Red for all your help I finally figured it out. After 2 days of trying to get it to work as an include I finally remembered that because my site is template based that I had to put in the full abs path the crawler even though the page is right next to it.

    What was it, and I looked at that path numerous times and ignored it.

    Thanks again.

    Jerry
    http://www.iqnewsroom.com

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
  •