13:59 Mon Sep  3, 2007
Cheap Hummer!

12:18 Tue Jul  4, 2006
Hummer Camp After

12:15 Tue Jul  4, 2006
Hummer Camp

Help Me Humpa
PHP and MMS Server Help
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


PHP for my pages..
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Help Me Humpa Forum Index -> Anything PHP
View previous topic :: View next topic  
Author Message
Mark_Venture



Joined: 26 Sep 2006
Posts: 16

PostPosted: Tue Sep 26, 2006 11:58 am    Post subject: PHP for my pages.. Reply with quote

OK, I got that.. it does look easy... and I like the fact that the menu then would be in all one file... edit one time, and not have to for every page...

If I understand it correctly, if someone links to one of those pages directly then, the headder, and side menu will show up too, right?

If so, that is exactly what I'm after.

Now, can I edit those, and paste the content of my pages into them via Frontpage? or some other editer perfered??

Also, i don't have to worry about anything on the server side, right?? because I'm not sure what Jim has setup...
Back to top
View user's profile Send private message Visit poster's website
Humpa
Site Admin


Joined: 06 Nov 2005
Posts: 10258

PostPosted: Tue Sep 26, 2006 12:18 pm    Post subject: Reply with quote

Yeah, the server won't have any problem with parsing those php files - that is totally standard stuff. Any server nowadays supports php.

You can still use front page - but you might have to take an extra step, depending on how good front page is.

The header.php will need to stay a php file - but you won't be editing that, so that doesn't matter.
And the index.php will need to stay a php file, and all your other main pages will need to be php files as well.

For all your pages, you can just copy the index.php and then simply paste in the html code below the "content, insert text and content below" comment line.
So you are going to have to create the html code in front page and then simply copy and paste. Just make sure to just strip out the body and meta tags first (if front page puts that stuff in automatically or whatever).

For the logoTop.php, navLinks.php, and footer.php - you can change those to logoTop.html, navLinks.html, and footer.html. That way you can edit them easier if you want.
But you'll have to change the "includes" in your template/index.php to include("logoTop.html"); ... you can "include" php files or html files or whatever - it will work just the same.

Actually, I have a better idea.
Give me a few and I'll post back.
Back to top
View user's profile Send private message
Humpa
Site Admin


Joined: 06 Nov 2005
Posts: 10258

PostPosted: Tue Sep 26, 2006 12:44 pm    Post subject: Reply with quote

ok, I think you might like this better.
I made them all html files, except the header.php and the index.php
But you should never have to edit either of those! You can edit them if you want to make some changes to the meta tags or something like that - but I imagine that will be a one time thing.

Just make your pages like normal, and all you have to do is add them to the navLinks.html file
www.humpa.com/mark/mark.zip

Check out the navLinks.html and you will see how the links need to be made.
For Example: index.php?page=V710_INFO.htm

And that's it.
You don't have to worry about the template or the title or anythiing.
Just create/edit your htm pages (and they can be htm or html, it doesn't matter, so long as you make the link using the correct filename)

My index.php file will simply include that file for you, based on the "page=whatever.htm" - if no file is requested (if $page is empty), then it will use the main.html file.
So, edit the main.html file as your main page.

Just remember, for all your pages (main.html, V710_INFO.htm, etc) - you just want the straight up html code - you don't want the body or meta or title or any other tags .... right?

Give that a try and see what you think - just upload those files to a new folder somewhere and check them out.
Back to top
View user's profile Send private message
Humpa
Site Admin


Joined: 06 Nov 2005
Posts: 10258

PostPosted: Tue Sep 26, 2006 1:03 pm    Post subject: Reply with quote

Now, I imagine you have a lot of links already in your pages, and they just go to V710_INFO.html (for example) - right?

Well, you don't have to edit those.

We'll just use .htaccess to do that for us.
This is all you need for an .htaccess file:
Code:

RewriteEngine on

RewriteRule ^(.+)(\.html)$ /mark/index\.php?page=$1$2  [L]
RewriteRule ^(.+)(\.htm)$ /mark/index\.php?page=$1$2  [L]

Using this will also let you use normal links in the navLinks.html if you want.

www.humpa.com/mark/index.php?page=V710_INFO.htm will take you to the EXACT same place as:
www.humpa.com/mark/V710_INFO.htm

Check it out by clicking the above links.

I've re-edited the navLinks.html, since there is no reason to now include that index.php?page= crap (we might as well keep that hidden)
And I included the htaccess file (the code I pasted above) - but the htaccess file will need to be edited, depending on the folder where you put this stuff.

I keep changing the mark.zip, so you can get it again ... lol


Last edited by Humpa on Tue Sep 26, 2006 1:08 pm; edited 1 time in total
Back to top
View user's profile Send private message
Humpa
Site Admin


Joined: 06 Nov 2005
Posts: 10258

PostPosted: Tue Sep 26, 2006 1:07 pm    Post subject: Reply with quote

I'm done messing around with the files/template/idea now - that is good to go. Very Happy

... I think. Wink
Back to top
View user's profile Send private message
Humpa
Site Admin


Joined: 06 Nov 2005
Posts: 10258

PostPosted: Tue Sep 26, 2006 1:40 pm    Post subject: Reply with quote

One thing you are going to have to do when you edit your pages - you need to get rid of all the css style "position: absolute" stuff.
I'm sure front page has various options for this, but postion: absolute will not work correctly, unless you can tell front page that you need to leave a margin on the top and on the left (because there will be the logo on top and the nav links on the left).

So, you need to either use NO css absolute positioning, or you need to set a default top and left margin in front page so that your page shows up in the correct spot.

In case you are unfamilar with the css attribute "postion", that tells the browser where to show the code. And your pages have a postion: absolute of left: 0px
That tells the browser to postion the code 0 pixels from the left - so the code would be overlayed on top of the navLinks, since they are on the left already

Your frames worked because each frame is its own page.
Back to top
View user's profile Send private message
Mark_Venture



Joined: 26 Sep 2006
Posts: 16

PostPosted: Tue Sep 26, 2006 3:02 pm    Post subject: Reply with quote

Cool. Thanks!! Will look at this more tonight when I get home from class...
Back to top
View user's profile Send private message Visit poster's website
Mark_Venture



Joined: 26 Sep 2006
Posts: 16

PostPosted: Tue Sep 26, 2006 10:36 pm    Post subject: Reply with quote

Ok, using the link you gave above to see... www.humpa.com/mark it works fine....


must be a smalll problem with the way Jim has his server setup.... see http://mark.cdmaforums.com/mark

it doesn't seem to access the links properly... click on the V710 Info in the nav list, and instead of showing the contents of that html file, it acts as if that file isn't there... it does the same thing with XAMPP running as PHP server on my local PC..
Back to top
View user's profile Send private message Visit poster's website
Humpa
Site Admin


Joined: 06 Nov 2005
Posts: 10258

PostPosted: Tue Sep 26, 2006 10:40 pm    Post subject: Reply with quote

Sorry, you must have register_globals set to Off (which is a good thing)
Add a newline to the index.php, right after the opening php tag, so it looks like this:
Code:
<?php
$page = $_GET['page'];
Back to top
View user's profile Send private message
Mark_Venture



Joined: 26 Sep 2006
Posts: 16

PostPosted: Tue Sep 26, 2006 11:43 pm    Post subject: Reply with quote

ok, that works much better...

now to strip out the formatting from the frames. and upload... that is gonna take some time... BUT it will be MUCH BETTER!!!

THANKYOU!!!
Back to top
View user's profile Send private message Visit poster's website
Humpa
Site Admin


Joined: 06 Nov 2005
Posts: 10258

PostPosted: Tue Sep 26, 2006 11:47 pm    Post subject: Reply with quote

No problem.

It will be a lot easier linking people to your pages. Very Happy
Back to top
View user's profile Send private message
Mark_Venture



Joined: 26 Sep 2006
Posts: 16

PostPosted: Wed Sep 27, 2006 6:31 am    Post subject: Reply with quote

yeah, its gonna be a while till i get finished...

1 page at a time.. Smile

Btw, I stripped out SOME stuff on the E815 page... but something was left... because while it "fits" and looks ok, the font for the links along the left changes... Looks like I have my work cut out for me....
Back to top
View user's profile Send private message Visit poster's website
Humpa
Site Admin


Joined: 06 Nov 2005
Posts: 10258

PostPosted: Wed Sep 27, 2006 10:13 am    Post subject: Reply with quote

It shouldn't be that hard.
Maybe to do it right might take some real time, but just to get it looking like it does now is pretty simple.

www.humpa.com/mark
I did the first 4 pages real quick.

I simply went to your site, and just used my mouse/cursor to highlight and copy your main frame.
Then I simply pasted that into Microsoft Word.
Then I saved as webpage.
Then I opened that saved webpage in an editor (my copy of Word doesn't have html editor installed Sad )
I simply deleted everything up to and including the opening body tag, and I scolled to the bottom and delete the closing body and html tag.

I did that 4 times (once for each of the first 4 links on the left of my "mark" page) ... took me a couple of minutes.
Back to top
View user's profile Send private message
Mark_Venture



Joined: 26 Sep 2006
Posts: 16

PostPosted: Wed Sep 27, 2006 8:09 pm    Post subject: Reply with quote

yeah, its going faster today... I have about 20 done in under a 1/2hr....
Back to top
View user's profile Send private message Visit poster's website
Mark_Venture



Joined: 26 Sep 2006
Posts: 16

PostPosted: Wed Sep 27, 2006 10:22 pm    Post subject: Reply with quote

btw, how difficult would it to be to put a set of links in the LOGOTOP.HTM?? like how the current page has the buttons for MAIN, ABOUT, CONTACT, NEWS, FAQ, and SITE SEARCH?
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Help Me Humpa Forum Index -> Anything PHP All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum