from frames to no frames ...

This is a discussion on from frames to no frames ... within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Hi, I still have a frames site and I'm thinking of getting rid of the frames. However, I don'...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-31-2006
Peter
 
Posts: n/a
Default from frames to no frames ...

Hi,

I still have a frames site and I'm thinking of getting rid of the frames.
However, I don't want to get rid of the layout and I want all the pages to
still have the same names so that my current search engine rankings (and
accessibility via them) stays guaranteed.

I'm a bit at a loss on how to handle it. I'm sure there are "tested" methods
to make this is painless as possible and I'd appreciate some input.

I post this here because I suppose I can resolve this by making use of php
and I'm sure that the audience here has some good ideas on this subject.

I was thinking (but maybe this is a totally wrong approach ??)
of making sort of a php template with a table that replaces the frames set ?
And load in the different cells of that table the old content (old pages) ?
But then ... how do I prep the old content so that it can be loaded easily
in these cells ?

I'm also not very proficient in php, I manage but I'm no guru and lack the
time to go in depth.
So if there are ready to use methods, documented well enough, then I would
like to know.

Pooring all my random thoughts out now ;-)
I also would like an easy switch to make it all multilingual, so that if the
user checks or clicks the option "Swahili" ;-) all content changes
transparantly to the swahili language set.
Ideas ?


Reply With Quote
  #2 (permalink)  
Old 04-01-2006
Alexander Meins
 
Posts: n/a
Default Re: from frames to no frames ...

Peter schrieb:

> I still have a frames site and I'm thinking of getting rid of the frames.
> However, I don't want to get rid of the layout and I want all the pages to
> still have the same names so that my current search engine rankings (and
> accessibility via them) stays guaranteed.
>
> I'm a bit at a loss on how to handle it. I'm sure there are "tested" methods
> to make this is painless as possible and I'd appreciate some input.
>
> I post this here because I suppose I can resolve this by making use of php
> and I'm sure that the audience here has some good ideas on this subject.



If you want to get rid of frames on your site you should rather look at
CSS and not PHP.

A.
Reply With Quote
  #3 (permalink)  
Old 04-02-2006
Duderino82
 
Posts: n/a
Default Re: from frames to no frames ...

What you want to do is a simple thing. make a file (es. layout.inc.php)
in which you'll put some function with the code at the moment in your
frames. Es. a function top will contain:

function top(){
<html>
<head>
...stuff
</head>
}

then you can do the same for lets say the left frame (if you have one)

function leftframe(){
<div id="leftframe">
...stuff that's in the left frame
</div>
}

in the CSS file that Alexander suggested you will have to put the
features of this frame...like:

#leftframe {
float:left;
width:20%;
...anything else...
}

now when you have completed the layout.inc.php file you just need to
include it at the start of a page and call the function when you need
them. Es...

<?php
include("layout.inc.php");

top();
leftframe();

?>
<div id="mainfraim">
// the particular contents of this page
</div>
<?

foot() //a function that implements </body></html>
?>


this way everytime you need to do a new page you just have tu
copy/paste the includes and the function of the layout, then put in the
contents of the specific page. This may take some time to convert a
hole site especially if you interact between frames frequently...you'll
have to change many links! Have fun!

PS: you need to pay attention to the CSS when you define the layout of
the page...if you are not familiar with it...search the internet for
some tutorials then convet the site to php!

Reply With Quote
  #4 (permalink)  
Old 04-02-2006
rlee0001
 
Posts: n/a
Default Re: from frames to no frames ...

Peter,

Replace your frameset document with the new page. Use CSS for layout as
per normal. Its easy to use CSS to page a page look it does now with
the frames. Use a table is you have to.

To ensure users can find the new page from outdated inwards links from
search engines, replace each of these pages with a redirect. Use the
refresh HTTP equiv that waits about 5 seconds. Explain to the user that
the page has moved and provide a manual link in case the user has
redirection disabled.

For example, if you currectly have this:

index.htm (frameset)
menu.htm (navigation frame)
ad.htm (ad banner frame)
page1.htm (content frame; page one --- default content frame)
page2.htm (content frame; page two)

You would switch over to:

default.php (content page one)
page2.php (content page two)
layout.inc.php (sitewide library for building the pages)
styles.css (stylesheet)
----
index.htm (redirect to default.php)
menu.htm (redirect to default.php)
ad.htm (redirect to default.php)
page1.htm (redirect to default.php)
page2.htm (redirect to page2.php)

The second bunch is just legacy until google updates its index, other
sites update their links and your visitors update their bookmarks.

-Robert

Reply With Quote
  #5 (permalink)  
Old 04-02-2006
Peter
 
Posts: n/a
Default Re: from frames to no frames ...

Thanks all.
I don't know css actually, so I will have to look into that as well.
I thought it would be "as simple" as putting content in a table.


Reply With Quote
  #6 (permalink)  
Old 04-03-2006
Duderino82
 
Posts: n/a
Default Re: from frames to no frames ...

well it is, actually! but the sintax is not exactly the same...so you
need a reference book or dreamweaver (if you can afford it!)

Reply With Quote
  #7 (permalink)  
Old 04-03-2006
Peter
 
Posts: n/a
Default Re: from frames to no frames ...

Does dreamweaver do all this stuff for you ?

-------------------------------------------------------
"Duderino82" <bubbosmail@gmail.com> wrote in message
news:1144070409.291570.170330@e56g2000cwe.googlegr oups.com...
> well it is, actually! but the sintax is not exactly the same...so you
> need a reference book or dreamweaver (if you can afford it!)
>



Reply With Quote
  #8 (permalink)  
Old 04-04-2006
BearItAll
 
Posts: n/a
Default Re: from frames to no frames ...

Peter wrote:

> Hi,
>
> I still have a frames site and I'm thinking of getting rid of the frames.
> However, I don't want to get rid of the layout and I want all the pages to
> still have the same names so that my current search engine rankings (and
> accessibility via them) stays guaranteed.
>
> I'm a bit at a loss on how to handle it. I'm sure there are "tested"
> methods to make this is painless as possible and I'd appreciate some
> input.
>
> I post this here because I suppose I can resolve this by making use of php
> and I'm sure that the audience here has some good ideas on this subject.
>
> I was thinking (but maybe this is a totally wrong approach ??)
> of making sort of a php template with a table that replaces the frames set
> ? And load in the different cells of that table the old content (old
> pages) ? But then ... how do I prep the old content so that it can be
> loaded easily in these cells ?
>
> I'm also not very proficient in php, I manage but I'm no guru and lack the
> time to go in depth.
> So if there are ready to use methods, documented well enough, then I would
> like to know.
>
> Pooring all my random thoughts out now ;-)
> I also would like an easy switch to make it all multilingual, so that if
> the user checks or clicks the option "Swahili" ;-) all content changes
> transparantly to the swahili language set.
> Ideas ?



Lets say that you have a frame page something like this.

------------------------
|....banner frame......|
------------------------
|menu..|..Body Frame...|
|frame.|...............|
|......|...............|
|----------------------|

What you could say is that you have three divs. Then in each div you can
have a place holder for the content.

<div id="banner" ..possition info..>
<?php
include "banner.php"; #which for experriment purposes could simply be an
echo of the bannaer html
?>
</div>

<div id="menuframe" ..possition..>
<?php
include "menu.php";
?>

<div id="bodyframe" ..possition..>
<?php
include "body.php";
?>

Once you have the template page right you can then add the handler to
respond to the likes of the menu, i.e. selects which body.php.

I like the single page idea, it doesn't work for everything, but the
majority of page changes can be done simply by selecting the content
depending on what page it is currently meant to be.

I must admit though that I had to use a wysiwyg to get my 4 templates div's
possitioned properly, what ever I did manually coding I ended up with
overlapping or one hidden behind another. I blame the chaps at w3.org, they
seem to have a sense of humour so might have hidden my div's deliberately.

But now that I have them I may never need to write another html tag for the
remainder of my life. (hows that for a dramatic finish).

Reply With Quote
Reply


Thread Tools
Display Modes

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

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



All times are GMT +1. The time now is 10:47 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0