i need some help

Discussion in 'Scripts' started by nickdudego3, Oct 9, 2008.

to remove all ads.
  1. nickdudego3

    nickdudego3 New Member

    Messages:
    3
    okay i have this website and it has multiple user pages and they all have the same marquee and im wondering if anybody can help me find a script that links the marquee to an external file that i edit to update the marquee so i don't have to keep going one page at a time plz help!!!


    thx
     
    Last edited: Oct 11, 2008
  2. joe

    joe New Member

    Messages:
    82
    What you could do is store the marquee in a text file and use php's to read the file and display on the web page. Here's some code you can use:
    Code:
    $myFile = "[COLOR="Red"]testFile.txt[/COLOR]";
    $fh = fopen($myFile, 'r');
    $theData = fread($fh, filesize($myFile));
    fclose($fh);
    echo $theData;
    
     
    Last edited: Oct 9, 2008
  3. nickdudego3

    nickdudego3 New Member

    Messages:
    3
    okay

    okay well i don't know too much about php im more with html and that but i can learn but thats beside the point can you show what i would edit by putting it in red and can i save the page i input the code into as .html or do i have to save it as .php or do you think you could help me find another way to be honest i never actually understood php or javascript i know basic javascript like how to make a popup window and a password popup menu
     
    Last edited: Oct 9, 2008
  4. joe

    joe New Member

    Messages:
    82
    I edited the code to show you what you would need to change. you'll need to make a php page.
     
  5. nickdudego3

    nickdudego3 New Member

    Messages:
    3
    okay so i would really like to know if i can do this in javascript i managed to learn how to make it in javascript but there's a problem one i can't use links oh and by the way i used document.write to do it and two when i put too much or something i have been using process of elimination to figure out exactly what the problem is it shows up blank so is there another javascript syntax i could use that is better or that can support more than 20 words i attached the two files that im using to test the syntax if you if you need to use php just do what ever you need to do to those files and attach them plz

    i'll use them for further reference

    thx
     

    Attached Files:

    Last edited: Oct 10, 2008
  6. joe

    joe New Member

    Messages:
    82
    Here.....this works. just change what you want in testfile.txt
     

    Attached Files:

    • test.zip
      File size:
      386 bytes
      Views:
      8
  7. 4folds

    4folds New Member

    Messages:
    12
    If it's always going to be the same size you could use an IFrame. Do a search for Iframe code and you'll get some. It's really simple.

    Another option would be to do a server side include. A little harder, but also very effective.
     
  8. emopoops

    emopoops Banned

    Messages:
    66
    use the include thing
    place the include where u want it to go on the pages
    <?php include()?> something like that works awesomely
     
  9. Unknown98

    Unknown98 New Member

    Messages:
    7
    That is off-topic...

    Put the marquee in an HTML file. Then on all your other pages, replace the marquee with something like this:

    <div id="marquee">
    <? include("path to marquee file"); ?>
    </div>

    Then in the future all you have to do is update marquee.html and every page will be updated.

    What this does, is include that marquee file in every single page.

    You will need to rename all the pages that you put the above PHP code in as .php files.

    Unk
     

Share This Page