Jump to content

Recommended Posts

Posted

Ive been making websites for awhile but regretably theyve been pretty inefficient. im self taught so i end up doing things the hard way usually until i come across something better. what im trying to do now is to get my current site simplified a bit. if you go to http://www.electriccoyote.com and enter the site. youll see that i have the logo and menu at the top, then content in a little box below. i tried using CSS so that i only had to change the content when making a new page, but that still left me with the problem of the site shifting a few pixels to the left or right on certain pages. perhaps this is jsut an issue with cells or tables or something? what i want is sort of the same concept as frames, only not using frames because i hate them with a passion. if i could just have the main site with the logo and menu, then dynamic content that loads below when the link is clicked....so i dont have to worry about certain pages being off center or shifting all weird..... that would make me oh so happy. ive tried layers and all sorts of things and im just not sure where to go. like i said ive been making sites for years so im not a complete idiot at design, i just need the occasional push in the right direction. B) any help would be much appreciated. btw i use dreamweaver mx.

 

thanks!

Posted

I don't know if this would be the best way but you could use a server side includes. Put your logo and navigation on seperate page (if it isn't already) and name it something like header.shtml

 

Then add this directly under the body tag of each content page either centered or in a table .

 

<!--#include virtual="header.shtml"-->

Posted

Hi,

 

I would use like turtle suggests, includes which would save you a lot of hassle.

 

Can I also suggest that you optimize the image on the front page, haveing a 160K picture as the first thing to load will take quite a few seconds on a 56K connection and some people may be turned away by this

 

Jim

Posted

Hi Guys,

 

I'd like to usae "include" type statements as it would simplify my work enormously in setting up new pages to a set standard and also in changing that standard without editing each page in turn.

 

Howevemr whane I tried a test with the line

 

<!--#include virtual="header.htm"-->

 

It didn't work - I just got a blank screen.

 

Any thoughts on what am I doing wrong?

 

thanks,

Posted

Hi Jim,

 

many thanks. I knew that the thread was out there somewhere but for the life of me I just couldn't find it :D .

 

I'll check it out now and see if I can make use of it.

 

Thanks for the offer of further help - I may need it.

 

Great to have this sort of support behind you Rock Sign

Posted

Hi Jim,

 

two quick questions from my first read thru the thread:

 

1. does using php and includes have an adverse effect on search engine crawlers? I know that frames unless set up correctly can confuse the hell out of the robots, wondered of php needed to be set up in a special also?

 

2. I run all testing on my own laptop before FTPing up to TCH for going live. How would I be able to continue doing this if I start using php? [my laptop under windows doesn't seem to cope with php statements IE is ignoring them]

 

many thanks,

Posted

Hi,

 

1) php Includes will not confuse robots, they will see the finished page as includes are compeleted before the page leaves the server

 

2) You should be able to get php includes to work on your laptop, although you could always download apache for free

 

Jim

Posted (edited)
1. does using php and includes have an adverse effect on search engine crawlers? I know that frames unless set up correctly can confuse the hell out of the robots, wondered of php needed to be set up in a special also?

 

2. I run all testing on my own laptop before FTPing up to TCH for going live. How would I be able to continue doing this if I start using php? [my laptop under windows doesn't seem to cope with php statements IE is ignoring them]

 

(Jimuni was faster on the draw and posted while I was writing this...)

 

 

Answer to 1:

 

No.

 

php is one of the most (if not the most) popular server side programming language in use today. There are plenty of sites with top rankings on search engines and directories that use php as their web 'glue'

 

One nice advantage of php is that all the magic is done on the server level and then basically html is served up.

 

If you use php, you need to end your pages with .php instead of .htm or .html or anything else. There's a way around this with .htaccess but let's stick to the basics for now. I believe a help thread was recently pinned that has info on the .htaccess trick.

 

 

Answer to 2:

 

PHP is a server side language. So if you want to check EVERYTHING before FTP to the server, then you essentially need to set up a mini server on your computer. There is also another thread here covering this topic ... but unfortunately I couldn't find the post. I'll look again and post if I find it.

 

But I will give you a suggestion that may help. I use Dreamweaver (not required) and hand code PHP. The pages look nothing like they do when I upload them. So for testing, I usually set up a new directory, upload files there, and see what they look like. If they look bad, I try again. If they look and function correctly, they get re-uploaded to the public portion of the site.

 

You mention that IE is ignoring the php statements. One of two things is happening. If these are pages that you loaded to the server then you need to rename the pages with a .php ending so the server knows what to do. If that doesn't help, then your php is malformed.

 

If you are looking at your pages before uploading them to the server, as can be done with Dreamweaver and other html editors, then the reason for the problem is that php is a server side language and your computer is not set up to run like a server and perform php actions.

 

The cool thing about php is that it works with all browsers and all user settings because everything happens on the server before the page is sent over the internet. Therefore, it's just not possible that IE isn't interpreting the php... it's the server that does that and sends regular old html to the browser. But the server only knows what to do if you tell it the page is written with php code in it. Again, you do this typically by ending your page with .php

 

Hope this helps.

Edited by surefire

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...