• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 404
  • Last Modified:

php transition (general php questions)

I have several questions about php and my existing site (observescience.org):
I wanted to allow the user to have more control over parts of the web page. I am told that this type of dynamic page should be written in php. From what I have read about php, it seems to be mostly for validation, small applications and other things similar to javascript. I guess my questions are around if I was to make a transition from HTML to a PHP site, as an overview how would this work? Very generally speaking, how does this scripting language do what HTML does? How much of the site would remain HTML? I could see how PHP would offer more control but I am seeing very little about what PHP can do to create a web page to work with CSS. I would appreciate any help in understanding this possible direction for my site. Am I misunderstanding PHP?
Thank you,
rhyno99  
0
rhyno99
Asked:
rhyno99
3 Solutions
 
OmniUnlimitedCommented:
Hi Rhyno!

Good to hear from you again!  Ha, it looks like you've swam into deep waters and don't know where to turn.  Don't worry.  Very normal for a highly technical area.  My best suggestion, now that you have studied PHP a little, is to upload WordPress to a location you can work with it at.  If you don't know how to set up WordPress, I would suggest that you work with your host and have them help you.
0
 
jeremyjared74Commented:
You missed it by a mile.

Here are some thoughts on your remarks:
it seems to be mostly for validation, small applications and other things similar to javascript
This is completely opposite of what PHP is. PHP is 1000% better for larges sites that plain HTML. PHP allows you to use common templates or template parts. What does this do for you? Very simple, it means when you want to make a change to the layout you don't have to update every single page. Just update one file.

EXAMPLE:
If you want to add a google plus one link in the header of your website

The HTML way: open each individual page and add the button.

The PHP way: open the header.php file add it... done!

If you want to add a post or pagination to your site how would yo do that with HTML? You would manually organize the pages in the correct timelie (this would be insane on a large site). If you use WordPress you can simply add one bit of code called the loop and it does the pagination, the origination of dates published.

How much of the site would remain HTML?
The output is 100% HTML.

I am seeing very little about what PHP can do to create a web page to work with CSS
Since the output is HTML it works no different than HTML.
Any more questions?
0
 
Dave BaldwinFixer of ProblemsCommented:
Some very large ecommerce sites are done with PHP as is the Wordpress blog software and the Joomla CMS software.  PHP is a pretty full featured programming language oriented towards web page generation.  And it has excellent documentation at http://www.php.net/ .

I personally think Wordpress is a very big first step if you have minimal programming experience.  There are a lot of smaller things you can do with PHP that are quite useful.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
rhyno99Author Commented:
I will download Wordpress and learn more. Thank you all for your help and support. I'm sure I will have more questions later.
0
 
OmniUnlimitedCommented:
Let me know when you have downloaded it, and I will post a default (skeleton) theme you will be able to play with relatively easy.
0
 
rhyno99Author Commented:
Thanks Omni! Go ahead and post. I am downloading it right now.
0
 
OmniUnlimitedCommented:
HA!  You caught me before I was ready!

As DaveBaldwin so aptly pointed out, WordPress is a big first step.  But, it can be made simple if you just have some basic instructions.

I am in the process of writing a couple of articles on exactly how to get your feet wet in programming a custom WordPress theme.  In the meantime, as I promised, here is a copy of the default theme for you to play with.  What I would recommend is that you simply download this file and unzip it, then look at each individual file to see how PHP interacts with HTML.  WordPress uses a lot of custom functions, so if you see some things in there you don't see in your reference book, don't worry.  I can explain them as we go along.

I'll let you know just as soon as I publish the articles (it will be sometime tonight, I hope, although it may take a few days to get them approved.)

Best of luck to you, and please, before you do anything, ask.  Better to be safe than sorry. default.zip
0
 
rhyno99Author Commented:
Ha. I know you are laughing because it doesn't take that long to download. I searched wordpress and installed. Somehow I was redirected and downloaded microsoft webmatrix ??? What the heck is this?? http://www.microsoft.com/web/gallery/wordpress.aspx

Anyway, I went to the cpanel and installed it. I have logged in and I will begin playing with it. Looking forward to seeing what you are talking about.
0
 
OmniUnlimitedCommented:
Hmm.  It appears to be something specific to your host.  Probably the script your host uses to upload WordPress to the server redirects you to that page when it is finished.  You can safely ignore it.
0
 
rhyno99Author Commented:
I forgot to refresh. I didn't see that you already wrote back. :)

Thanks so much for your help. I'll check out the zip and only play on the sidewalk and not in the street. :)

Take your time on the articles, but can you send a link when you finish?
Thanks,
rhyno
0
 
rhyno99Author Commented:
Sorry for the misunderstanding. Being microsoft I am not worried so I am ignoring it. I did get the right program working though. When I said "it" I meant Wordpress. I notice that many of the files I can't open. Do I need to open with a local host (I forget what it is called) such as easyphp?
0
 
OmniUnlimitedCommented:
Yeah, you probably won't be able to open any of the actual files unless you download them to the computer.  To download them to your computer, you would need a file server client like Filezilla or Dreamweaver.  The files I posted, however, can be opened, and they are the ones you will be working with as you develop your site.  I really wouldn't recommend you getting into WordPress' core files until you know a lot more about what you are doing.
0
 
OmniUnlimitedCommented:
Hi Rhyno!

Part I of my Getting Started In WordPress article has been published.  You can see it at:

http://www.experts-exchange.com/Web_Development/Blogs/WordPress/A_8410-Getting-Started-In-WordPress-Part-I.html

I will be working on Part II so please hold off questions until I am through.  I will let you know when I have finished.
0
 
OmniUnlimitedCommented:
Hello again, Rhyno!

Part II is now ready for viewing.

http://www.experts-exchange.com/Web_Development/Blogs/WordPress/A_8411-Getting-Started-In-WordPress-Part-II.html

Now, after you have finished reading these articles and have begun your experimentations, you will be able to post your questions as you go along.  (If the topic is a little involved, you may have to wait until I can finish another article.)

Best of luck to you, and I look forward to hearing from you again in the near future!
0
 
rhyno99Author Commented:
Hey Omni!
Thanks for the links. There is a lot there. It seems that WordPress breaks down PHP into manageable tools are parts -kind of like how spry breaks down javascript into easy, ready to use parts. WordPress allows the user to take these pre-scripted elements and put them together to make a dynamic web site. If the pre-scripted elements don't quite fit, use PHP to modify. Is this correct?
 
0
 
rhyno99Author Commented:
I opened the files in Dreamweaver. I wasn't able to get a live view though. I guess I will need a server. (Still checking everything out)
Thanks
0
 
OmniUnlimitedCommented:
No problem, and yes, I did warn you about a learning curve, but, I am confident that you will be able to handle it if you don't try to take it all in at once.  Just concentrate on getting individual tasks done, and as you gain success, try and understand how the code you placed works.

What you described as an analogy to spry is an extreme understatement, but I understand what you are trying to say, and yes, I agree you could look at it that way.  But as many have stated, PHP opens up a whole world of programming to you, whereas spry is for specific functions only.

Yes, you are correct.  Basically everything in WordPress can be customized, although you can accomplish a lot without ever touching the core files.

I don't understand.  If you don't have a server, where did you load WordPress?
0
 
rhyno99Author Commented:
I can't say how much I appreciate your coaching and encouragement. As an elementary teacher, its funny to be on the other side the "you can do it" mentoring.

I am using wordpress live. I guess what I'm saying is I need a testing server to view the live version of the files that you sent. Dreamweaver allows me to see the code, but shows little to nothing in the design view and live view asks for a server becuase it is PHP.
 
I have loaded a new WordPress theme and I can see how to drag widgets into areas. I am searching for how to customize a theme (further than the predefined options) to and create divs, etc. as I did with HTML.

But then... a page is composed of more than one PHP file that controls an area. How can I customize, or build an area. For example, building a header with a quick example of a menubar that would be used on all pages .

Where should I start when I want to customize? Looking at the code, it seems like every HTML div has the opening and closing PHP tags inside making everything that displays on the page PHP. Could I just add divs and PHP within and be fine?

Again, I'm sure I am over-simplifying. But I learn a lot from the answers to these questions. I know it would be much, much easier to just use what WordPress already offers but I would really like to have more control.  

Time for me to open another question if you like. I'll call it WordPress Divs. You can post your response to this there if you like.
0
 
OmniUnlimitedCommented:
HA!  I know that that could feel very strange but you know the old saying, "What goes around, comes around."

That is a new one on me as I have always used server based versions of WordPress.  I'm sorry but I really don't understand what is involved in a "WordPress live" setup.  Did you set up WordPress on your computer?

PHP files will never show up well in design view, since everything is manipulated by code.  You are stepping out of the area of novice web designer and into the area of serious programmer.  You better get used to using code view and understanding what it is you are looking at.

For your site, I probably would say, "Wait", as far as widgets are concerned.  Widgets are handy little modules you can quickly add to dynamic sidebars (and other areas of your them), but you certainly don't need them to develop your site.

For your purposes right now, if you have set up the settings as I suggested in my article, then I would suggest you create a new page (by using the Add New sublink under the Pages main link) and title it "Home".  You can put some dummy text in the Visual or HTML editor for now (something like "This is the home page.").  Also, sometimes WordPress already has example pages and posts present in its initial installation.  You can delete all of these if you want.

Once you have made a page for your home page (we can discuss templates later, for now just select the default), click on the Settings main link and the Reading sublink.  On the Reading Settings screen you will see just below the screen title a set of settings labeled "Front page displays".  Click on the radio button that says "A static page (see below)" and select "Home" from the dropdown labeled "Front page:".

The page you just created will now show up as the home page of your site.  The default theme has a sidebar where you can stick the advertising banner (you can do this with widgets, but for now you can just stick that code into sidebar.php).

I will go ahead and post to your new question the answer to "How do I build a new area?"
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now