SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    Coding for Jesus LavernGingerich's Avatar
    Join Date
    Jul 2003
    Location
    Tennessee
    Posts
    607
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How do I make my links "external"?

    I am building a website. Each page will have a set of links on it. I want to have a file containing my links and link this file to the main page. What is the best way to do this? I can use php includes, but is this the best way to do it when dealing with plain html links?

    Thanks,
    Lavern

  2. #2
    SitePoint Addict psyon's Avatar
    Join Date
    May 2004
    Location
    Cedar Rapids
    Posts
    295
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    http://www.buddysite.com/links.js

    I use that, I made it, it works. Then just include the javascript file. Assuming thats what you mean.

  3. #3
    Coding for Jesus LavernGingerich's Avatar
    Join Date
    Jul 2003
    Location
    Tennessee
    Posts
    607
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for your reply. I am new with javascript, but I was thinking about making a php file, then using an include in my html file.

  4. #4
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,424
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    Avoid javascript. If a user doesn't have javscript enabled your links won't be displayed plus is a disaster with search engine optimization (search engine bots can't read javascript very well if at all). Use PHP includes. They're fast and perfect for this.

  5. #5
    Coding for Jesus LavernGingerich's Avatar
    Join Date
    Jul 2003
    Location
    Tennessee
    Posts
    607
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for your help! I am using phpbb forum, and I can't use php unless I install a mod that accepts php. Thanks again!

  6. #6
    SitePoint Enthusiast
    Join Date
    Jun 2004
    Location
    Chester
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    what? you're using a phpbb forum and can't use php?

    anyway, if you add the links to shared templates, such as overall_header.tpl or overall_footer.tpl, they'll be added to every page of your site.

  7. #7
    SitePoint Evangelist vikrantkorde's Avatar
    Join Date
    Jun 2004
    Location
    Mumbai, India
    Posts
    541
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i will also suggest u to use PHP instead of Javascript.
    Vikrant Korde
    S Y S T I M E, Mhape,
    Mumbai, Maharashtra, India.


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
  •