Change All Pages at the same time!

This is a discussion on "Change All Pages at the same time!" within the Web Page Design section. This forum, and the thread "Change All Pages at the same time! are both part of the Design Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Oct 27th, 2006, 17:02
New Member
Join Date: Oct 2006
Location: Scotland
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Change All Pages at the same time!

Hi guys, hoe you can help me out with my problem...

I will explain...

I have a semi-popular cruise website which has probably the best part of 50 or 60 pages, maybe more..

First of all have a look at this edited screen grab which is here: http://www.scottishcruisers.com/pvtimages/help.jpg

1 - Now, currently, if I wanted to change a link (for example) in the navigation bar, I would need to change it manually and individually on all 50 or 60 pages.

**Is there any way to have these links on a file which is linked to the nav bar?
Then when I change a link in that file then that link changes on ALL pages?

2 - Under the "Current Forum Topics" area we have a javascript code which is placed in ALL 50 or 60 pages.

** Again, as above how could I use 1 file to host the javascript code so that I wouldnt need to change it on all 50 or 60 pages should i want to change the code?

Thanks in advance for any advice

Barry
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Oct 27th, 2006, 17:07
Reputable Member
Join Date: Sep 2006
Location: England
Age: 20
Posts: 144
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Change All Pages at the same time!

You could create a file and php include that file on everyone navigation(every page?), in this file you would have all your website links, then if you needed to change it, you just open the included file and edit the links.

Same with the JS.

EXAMPLE:
This would go into every single navigation
Code: Select all
<?php include("navigationlinks.php"); ?>


This would go inside navigationlinks.php
Code: Select all
<a href="http://yoursite.com/">Link</a><br />
<a href="http://yoursite.com/">Link</a><br />
<a href="http://yoursite.com/">Link</a><br />
<a href="http://yoursite.com/">Link</a><br />
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Oct 27th, 2006, 17:12
New Member
Join Date: Oct 2006
Location: Scotland
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Change All Pages at the same time!

Then I would need to change my whole site to PHP would I not? So that the PHP code works?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Oct 27th, 2006, 18:25
Reputable Member
Join Date: Sep 2006
Location: England
Age: 20
Posts: 144
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Change All Pages at the same time!

Yeah, but if you're going to keep your site functioning like this, it will save you alot of time in the future.

(In FTP just rename the file from .html/.htm to .php, instead of resaving the files)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Oct 27th, 2006, 19:15
New Member
Join Date: Oct 2006
Location: Scotland
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Change All Pages at the same time!

Thanks mate, im just going to do that
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Oct 27th, 2006, 19:23
New Member
Join Date: Oct 2006
Location: Scotland
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Change All Pages at the same time!

ok ive tested it out on a test page but it seems to load really slowly?

http://www.scottishcruisers.com/miscpages/teest.php
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Oct 27th, 2006, 19:24
Elite Veteran
Join Date: Aug 2005
Location: That Place
Posts: 2,044
Blog Entries: 1
Thanks: 0
Thanked 37 Times in 37 Posts
Re: Change All Pages at the same time!

PHP and includes are good. I am doing that for a project I be working on too. tying some external files to be imported through the CMS muhahaha.. *cough*
__________________

Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old Oct 27th, 2006, 19:25
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Change All Pages at the same time!

Quote:
Originally Posted by BarryM View Post
Then I would need to change my whole site to PHP would I not? So that the PHP code works?
No you wouldn't. This is a mis-conception a lot of people have.

PHP code can be embedded into any html page as and when required. You can still use the .html extention for your pages but to have the php in them parsed by the server, you will need to have the following entry in your .htaccess file.
Code: Select all
AddType application/x-httpd-php .html .shtml .txt
In this example, any file with the three extentions given will be passed to the php parser.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9  
Old Oct 27th, 2006, 19:41
Reputable Member
Join Date: Sep 2006
Location: England
Age: 20
Posts: 144
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Change All Pages at the same time!

I knew you could do that but didn't know how and your site loads fine barry.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
help

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Javascript - Updating web pages with snippets from other pages Ydot JavaScript Forum 3 Jul 10th, 2007 14:38
Updating numerous pages at the same time. mikka23 Web Page Design 12 Jan 1st, 2007 21:22
Change from dynamic to static pages? swiftmed Web Page Design 4 May 31st, 2006 15:18
Scripting Needed(adding pages to pages) Amari Classic ASP 1 Sep 4th, 2004 18:06
Adjusting time from server time to local time Tim356 Classic ASP 10 Jun 21st, 2004 14:57


All times are GMT. The time now is 10:08.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved