PDA

View Full Version : Mixing HTML and PHP


LMXI
12-16-04, 10:30 PM
I'm curious, when I begin to implement my design I want a mixture of static and dynamic elements on the pages. Do I just drop PHP code into specific html table cells as if it were a graphic file?

B&T
12-16-04, 10:38 PM
I'm curious, when I begin to implement my design I want a mixture of static and dynamic elements on the pages. Do I just drop PHP code into specific html table cells as if it were a graphic file?
You can do that if you are creating a graphic with php. An example of that technqiue is shown here in my counter example:
http://prettyworthless.com/tips.php?tip=counter#tip
You can also see it in my sig

LMXI
12-16-04, 10:46 PM
Thanks for replying...

So what is most appropriate in the cas of hybrid text, a index.html or an index.php? Or does it matter significantly?

And could I trouble you to post a string of example code?

B&T
12-16-04, 10:53 PM
Thanks for replying...

So what is most appropriate in the cas of hybrid text, a index.html or an index.php? Or does it matter significantly?

And could I trouble you to post a string of example code?
I cannot tell you what is best because I do not know what you want to do.

You can see all kinds of php code examples here:
http://prettyworthless.com/tips.php

LMXI
12-16-04, 11:05 PM
I want a clean graphically unique interface...I know thats a simplistic way of putting things without having an example. Because I am not familiar enough with php I am assuming that under normal circumstances pages are largely built by server side code as opposed to creative graphics. The default OSC store has a lot of "extras" and I'm trying to grasp how difficult it's going to be to move all that stuff around and put it where I want it to go. I know it can be done there are good examples here...I'm just not sure of the typical approach to heavilly customizing OSC. Do you just chip away at the code until a month later you have what you want?

I hope that makes some kind of sense...I've been on the computer for 7 hours working with this thing and looking for answers so my brains a bit numb.

B&T
12-16-04, 11:12 PM
I don't use OSC so I will let someone else answer.

stevel
12-17-04, 10:41 AM
First of all, you want all your store pages to be .php so that the session context, including cart, can be maintained across the pages. The appearance of the pages is whatever you want it to be, and coming from a PHP page is not a restriction.

Making extensive appearance changes in osC can be difficult, because of the lack of modularity. You typically have to update some 30 files when making a significant layout change. There are some "template" contributions that can make this much easier, but I have not used them.

Most of the "extras" are easy to dispose of - just comment out or remove the code that calls the graphics or boxes. Look at my Cheshire Garden site to see an example of doing this.