• Hey Guest. Check out your NeoGAF Wrapped 2025 results here!

HTML question...

Status
Not open for further replies.

goodcow

Member
Alright, so to get it out of the way, yes, my site design is poor.

Anyway, about a month or so ago, I scrapped the fact that my site used frames, and replaced it with tables, and phpincludes to fetch navigation stuff.

The result was, and is, this,
http://www.goodcowfilms.com/farm/news.htm
(the site has been updated since then several times, I just never bothered to update the news section)

As is, some buttons, such as my livejournal button, since it no longer uses frames, opens in a full window instead.

Now, if I have the button instead point to a livejournal page, to "fetch" livejournal in a table with a phpinclude, I get something like this,
http://www.goodcowfilms.com/farm/test_livejournal.htm

Yay! But again, if a user clicks on a link within there, since the link could go anywhere at that point, it opens in a full window.

So... how do I make any other pages open within a base template, without frames, of my site with the navigation.

I'm thinking it kinda boils down to...

http://www.goodcowfilms.com/farm/test_livejournal.htm

Then some code on that page, saying if a link is clicked...

http://www.goodcowfilms.com/farm/test_livejournal_link.htm

And then basically my template page, with the navigation, which will open "x" link in a table.

Is this right? If so... how? And the extent of my HTML skills are using FrontPage, and phpinclude tags. Woo.
 
Code:
<? 
if  (isset($_GET[page]))
{
include ("$_GET[page].php");
}
else 
{ 
include ("home.php"); 
}
?>

Something like that?

It's what my site does (check profile). You click a link and it loads the same "default template", but with my set page (indicated in ?page=) in the "empty spot".

Check my site for an example if that's what you're talking about.
 
You know pages have stuff like ?page=info and it shows a page about information? Or ?page=media and it shows you media stuff?

What that does is check and see if your URL has something like http://www.something.com/?page=whatever

Once clicked, the code will see if you have a page called "whatever.php", and load up that page. If not, it simply goes to your default page (or home, if you'd like to call it that).

It's not that confusing, really. You can change it so it's ?penis= or ?amazon= if you want.
 
Well right now, this is the template code for the "farm" section pages,

Code:
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>goodcowfilms.com: farm: news</title>
<link rel="stylesheet" href="http://www.goodcowfilms.com/farm/farmstyle.css" type="text/css" />
<body background="http://www.goodcowfilms.com/farm/images/largecowtile3.gif">
<script language="JavaScript1.2">
/*
Watermark Backgound Image Script- © Dynamic Drive (www.dynamicdrive.com)
For full source code, 100's more DHTML scripts, and TOS,
visit dynamicdrive.com
*/
if (document.all||document.getElementById)
document.body.style.background="url('http://www.goodcowfilms.com/farm/images/largecowtile3.gif') white repeat fixed"
</script>
</head>

<table border="0" width="100%" id="table1">
	<tr>
		<td>
		<table border="0" width="100%" id="table2">
			<tr>
				<td align="left" valign="top"><? include "http://www.goodcowfilms.com/farm/phpinclude/top.txt" ?></td>
			</tr>
		</table>
		<table border="0" width="100%" id="table3">
			<tr>
				<td align="left" valign="top"><? include "http://www.goodcowfilms.com/farm/phpinclude/navigation.txt" ?></td>
				<td align="left" valign="top">

<body background="images/largecowtile3.gif">

<table border="0" width="100%" id="table5" bgcolor="#000000">
	<tr>
		<td>
		<p align="left"><b><a target="_top" href="../index.htm">
		<font color="#FFFF00">goodcowfilms.com</font></a><font color="#FFFFFF">:</font> 
		<a target="_top" href="../farm">
		<font color="#FFFF00">farm</font></a><font color="#FFFFFF">:</font>
		</b></td>
	</tr>
</table>

<script language="JavaScript1.2">

/*
Watermark Backgound Image Script- © Dynamic Drive (www.dynamicdrive.com)
For full source code, 100's more DHTML scripts, and TOS,
visit dynamicdrive.com
*/

if (document.all||document.getElementById)
document.body.style.background="url('../../images/largecowtile3.gif') white repeat fixed"

</script>

<p align="center"><b>TITLE GOES HERE</b></p>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="table6">
  <tr>
    <td width="100%" valign="top">NEW CONTENT GOES HERE</td>
    <td width="50%" valign="top"><? include "http://www.goodcowfilms.com/phpinclude/adframe.htm" ?></td>
  </tr>
</table>

<? include "http://www.goodcowfilms.com/phpinclude/copyright.htm" ?></body>

&nbsp;</td>
			</tr>
		</table>
		<table border="0" width="100%" id="table4">
			<tr>
				<td align="left" valign="top"><? include "http://www.goodcowfilms.com/farm/phpinclude/bottom.txt" ?></td>
			</tr>
		</table>
		</td>
	</tr>
</table>
</body>

</html>

So the navigation (side, top, bottom) is always there, but what I want is, if you click to a link I may not specify myself... such as livejournal, but then a comment link on my livejournal that I can't anticipate, then it still retains the template.

I don't know if your code does that.
 
goodcow said:
So the navigation (side, top, bottom) is always there, but what I want is, if you click to a link I may not specify myself... such as livejournal, but then a comment link on my livejournal that I can't anticipate, then it still retains the template.

I don't know if your code does that.

You're losing me here. Try again...slowly.
 
I want to say no, but I'm sure there is a way that's out of my reach.

I keep screaming "iframe iframe iframe" in my head...
 
goodcow said:
Okay...

http://www.goodcowfilms.com/farm/test_livejournal.htm

Now, if you click any link from livejournal, such as "calendar view," that whole page is being feteched from livejournal.com, not my site. So I can't anticipate what links people are going to click.

I want THOSE links to open within my template, but without frames.

Is that possible?


Yes.

You need to have page open up in the table column where your main content is, if you are indeed using tables for content layout. But a straight up link isn't going to do that, you're going to need some kinda scripting (php, perl, ruby, whatever) to do it.
 
If I'm understanding your needs correctly you're out of luck unless you use an iframe, or a popup, or something along those lines. You could use an include to insert that page into another page, but that would be an unpredictable kludge and therefore not recommended.
 
Status
Not open for further replies.
Top Bottom