Same Text in Multiple pages as well as images

This is a discussion on "Same Text in Multiple pages as well as images" within the Web Page Design section. This forum, and the thread "Same Text in Multiple pages as well as images 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 Dec 3rd, 2006, 10:31
Junior Member
Join Date: Jun 2005
Location: South Africa
Age: 33
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Same Text in Multiple pages as well as images

Hopefully someone can help.

I want to create a newsletter page, and want to reflect an abridged version of each of the news snippets on 5 pages in the website that will automatically update when I make chnages to the newsletter page.

Can this be done?

I also want to ensure that on all the pages, if there is an image that is reflected on all the pages, that if I make changes to it that it updates all the pages without having to do each page individually.

I am a bit of a noob.
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 Dec 3rd, 2006, 11:31
Junior Member
Join Date: Oct 2006
Location: Uxbridge, West London
Age: 26
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Same Text in Multiple pages as well as images

The best way to do this is to create a header file that each of the pages calls.

That way all you have to do is change the header page and every other page will appear as though they have been changed
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 Dec 4th, 2006, 13:43
Junior Member
Join Date: Jun 2005
Location: South Africa
Age: 33
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Same Text in Multiple pages as well as images

Quote:
Originally Posted by gustava32 View Post
The best way to do this is to create a header file that each of the pages calls.

That way all you have to do is change the header page and every other page will appear as though they have been changed
Much appreciated. Now, how do I 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
  #4  
Old Dec 4th, 2006, 16:21
Junior Member
Join Date: Oct 2006
Location: Uxbridge, West London
Age: 26
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Same Text in Multiple pages as well as images

You simply put all of the stuff that you need to include in one file and make sure that every page calls that file.

Someone else might have to help you here though, as I cant remember how to do it in html. I can do it in PHP though if thats any use lol!
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 Dec 5th, 2006, 06:00
Junior Member
Join Date: Jun 2005
Location: South Africa
Age: 33
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Same Text in Multiple pages as well as images

Quote:
Originally Posted by gustava32 View Post
You simply put all of the stuff that you need to include in one file and make sure that every page calls that file.

Someone else might have to help you here though, as I cant remember how to do it in html. I can do it in PHP though if thats any use lol!
PHP would be fine
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 Dec 5th, 2006, 10:46
Junior Member
Join Date: Oct 2006
Location: Uxbridge, West London
Age: 26
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Same Text in Multiple pages as well as images

OK here is the header from one of my pages:

PHP: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<?php
    
require_once("includes\DbConnector.php");
    require_once(
'includes\Sentry.php');
    require_once(
'includes\Validator.php');
    
$theSentry = new Sentry();
    
$Connector = new DbConnector();
    
$validator = new Validator();
    
    
error_reporting(E_ALL E_NOTICE);
    
$userloggedin false;
    if (!
$theSentry->checkLogin(2) )
    { 
        
$userloggedin false;
    }
    else
    {
        
$userloggedin true;
    }
?>
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<title>GarethWinter.com</title>
<link href="/new.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style1 {font-size: 24px}
-->
</style>
</head>

<body>

<div id="Menu">
    <u>This Site</u><br />
  <?php
            $sql 
"SELECT * FROM links";
            
$getLinks $Connector->query($sql);
            while (
$row $Connector->fetchArray($getLinks))
            {
                
$name $row['urlname'];
                
$link $row['url'];
                
                echo 
'<a href="'.$link.'">'.$name.'</a><br />';
            }
        
?>
    <br />
    <u>Other Sites</u><br />
    <?php
            $sql 
"SELECT * FROM externallinks";
            
$getLinks $Connector->query($sql);
            while (
$row $Connector->fetchArray($getLinks))
            {
                
$name $row['urlname'];
                
$link $row['url'];
                
                echo 
'<a href="'.$link.'" target="_blank">'.$name.'</a><br />';
            }
    
?>    
    <?php 
        
if($userloggedin==true//Only display the admin Links when the user is logged in.
        
{
            echo 
'<br /><u>Admin Pages</u><br />';
            echo 
'<a href="../cmsadmin/admin.php">Admin Page</a><br />';
            echo 
'<a href="../phpmyadmin-2.8.0.2" target="_blank">Database Admin Page</a><br />';
        }
    
?>
</div>

<div id="Header"><a class="style1" href="../cmsadmin/admin.php" title="Click here to Login to Gareth Winter.com">GarethWinter.com</a></div>
You can ignore most of the PHP its because I have logins enabled. As you can see i have the Header and the links divs in this file as they will always be the same on every page.

Then i would call this in every page like so:

PHP: Select all

<?php require_once("header.php"); ?> //This is where we call the header file.
      <div id="Content">
    <?php
        $sql 
"Select * FROM pagecontent WHERE page = 'home'";
        if(
$result $Connector->query($sql))
        {
            while (
$row $Connector->fetchArray($result)){
                echo 
nl2br('<h1>'.$row['title'].'</h1>');
                echo 
nl2br(''.$row['content']); 
            }
        } 
        else
        {
            echo 
mysql_error();
        }    
    
?>
    <br />
    <br />
    <br />
    <b>PLEASE NOTE:</b> All items on this website belong to <a href="mailto:root@garethwinter.com">Gareth Winter</a> the Owner of this site. Also all photos on this website are property of Gareth Winter and it would be much appreciated if you were to ask permission before using them.<br />
    </div>
</body>
</html>
You then see that i have a content div, which is different in every page that I have, but that its the only difference.

I hope this helps you to understand it a bit better.
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 Dec 5th, 2006, 12:50
Junior Member
Join Date: Jun 2005
Location: South Africa
Age: 33
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Same Text in Multiple pages as well as images

Thanks for the help. Although a little bit out of my league (I am currently at the join the dots stage of web design) in respects of trying to decipher the code above.
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 Dec 5th, 2006, 12:57
Junior Member
Join Date: Oct 2006
Location: Uxbridge, West London
Age: 26
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Same Text in Multiple pages as well as images

Like I said you can probably ignore all of the PHP in the first section, just see that i have set up a couple of divs.

The second one is the important part where it includes the header.php file.
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 Dec 5th, 2006, 19:51
Ryan Fait's Avatar
Elite Veteran
Join Date: May 2006
Location: Las Vegas
Posts: 3,787
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Same Text in Multiple pages as well as images

You could always use a content management system for parts of your site. Textpattern is a good one
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10  
Old Dec 6th, 2006, 08:07
Junior Member
Join Date: Jun 2005
Location: South Africa
Age: 33
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Same Text in Multiple pages as well as images

Thanks. Still a bit confuzzed on the PHP, but will give it a shot.

How difficult will it be to integrate the CMS into the existing website design?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #11  
Old Dec 6th, 2006, 15:17
Elite Veteran
Join Date: Dec 2005
Location: On Internet
Posts: 4,859
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Same Text in Multiple pages as well as images

If you have PHP questions, just post them into the PHP forum. As for how hard is it to integrate a CMS into your current design/website...?? It all depends on the CMS system, but most of them are relatively easy.
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
html, images, multiple, text

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
[SOLVED] split xml search into multiple pages? karloff PHP Forum 19 Apr 27th, 2008 16:37
multiple rollover images change multiple images joshlindem Web Page Design 4 Apr 18th, 2008 09:11
Adding Content to Multiple Pages longinwa Starting Out 5 Jun 19th, 2007 00:26
Banner in css to add to multiple pages the newbie web designer Web Page Design 1 Mar 22nd, 2007 18:57
printing multiple pages benbacardi PHP Forum 8 Aug 8th, 2006 13:08


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


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