Archive of Unified Scifi Forums June 2002 - April 2005

Current forums visit Unified Scifi Forums

PHP Tutorials?

Any suggestions


[Archive Index] [Speculative Fiction Webmastering page 1] [Speculative Fiction Webmastering page 2]
PHP Tutorials? - by Arislyn on 10:24 21 Jul 2004
Okay. I think that I've had the Tower on sabbatical long enough. I'm ready to start working on it again. However, one thing that I would like to do in order to make my life much, much easier when updating is to learn PHP. I have tons of pages and, if I make a change to the menu, that means I have to go in and change each and every page's HTML by hand...and that can get to be a drag when you have as many pages as I do. I'd like to be able to just change a single file and be done with it.

So, if anyone out there knows of a good PHP tutorial for someone who has never even looked at the language before, I'd appreciate it if you could point me in its direction.

Thanks!
PHP Tutorials? - by Brad on 17:04 21 Jul 2004
It sounds like what you might need are server side includes (SSI).

Off topic:  Have you ever thought about a section on electronic games on the tower?  With your extensive knowledge it could open up whole new topics.  Just a thought.   ???
PHP Tutorials? - by Arislyn on 17:40 21 Jul 2004
Hmmmm....I thought PHP was an SSI. Now, I could be wrong. This is the first time that I've started looking into it, so I really don't know what I'm talking about. :D Do you know much about them because I really don't know whether it will be more of a headache to learn than not.

As far as the electronic games, I'm not sure what I would do. I mean, there are tons of sites out there that do reviews much better than I could. Beyond doing reviews and lists of recommended games (mostly RPGs since that is what I play)....I just don't know. Hehe! I suppose I could spend a few pages on my latest pet peeve: etiquette, or lack thereof, within MMORPGs.

Do you have any suggestions?
PHP Tutorials? - by Brad on 17:58 21 Jul 2004
>>SSI

Like a lot of stuff, I know the theory but not how to do it.  Hopefully din will come along because he is the guy who Knows About This Stuff.  :D

>>computer games

Hmm, i wouldn't sell yourself short Ari. You have been around the web and RPG community for a long time.  I bet people would like to know what  'Arislyn' thinks about different electronic game titles. If they like the rest of your site they will like your take on eRPG's.  I think most gamers don't don't exclusively play juust pen and paper RPG's so the overlap is natural.

Recommendations are always good.  I get a lot of mileage out of just the comments people post on Amazon for movies and games, so other people will probably read your recommended lists too.

The main thing is if it will capture _your_ interest?  If it does that will translate through to the reader.  So I guess I would suggest doing it if _you_ want to.  :)
PHP Tutorials? - by Brad on 20:41 21 Jul 2004
A beginners guide to MMORPGS could be really useful.  And some reviews of those you have played in would be good for other people.

You could rate cRPGs on a 5 zombie scale!  :D   Heck eveen edit some of your old posts in the forums here and make them into static page reviews.
PHP Tutorials? - by Arislyn on 09:42 22 Jul 2004
You know, that is a great idea! For days when I'm not feeling all that creative (no spells, artifacts or adventures forthcoming), then I can always fall back on doing a review. That way, even if I'm not quite up to par in the inventiveness department, I can still keep the website updated with new material. And, I know that you tend to lose people if the site goes for a long period with nothing new added.

Hehehe! "Five zombie scale"....So, if the rating includes half a zombie it's what....3 Zombies and a Spleen?  :laugh:
PHP Tutorials? - by din on 21:12 22 Jul 2004
Hi Ari,

As if by magic I appear :P ...

SSI and PHP are not the same thing. Anything you can do with SSI can also be done with PHP. For your menuing problem SSI would be enough, but if you had an interest in doing other things more involved than making a page out different parts maybe PHP would be interesting.

I can give a quick example here which may illistrate the differences/similarities.

You have an index page and a a text file you want to include as a menu.

Using SSI you'd name the page index.shtml and
Code Sample
<!--#include file="menu.txt"-->
or if you have the menu in a seperate directory than the index page
Code Sample
<!--#include virtual="menudirectory/menu.txt"-->

You could even go as far as making hte menu a shtml extenstion and include submenus into the main menu, say a title menu and a section menu. I did lots of stuff like this on my timelines site with a main menu that should on all the pages and submenus that showed in different era sections.

Using PHP the index would have the extension .php or index.php.  then instead of the include statements you would have.
Code Sample
<?php
include 'menu.txt';?>
or with the menu in a different directory
Code Sample
<?php
include 'menudirectory/menu.txt';?>


at this point the difference is purely visual. What happens in both cases, generally, is that the server gets the request for the page, sees the php or shtml extension and knows it has to do something other than just serve the text. In the case of SSI the server looks for the <!--# tags then follows the instructions including what the tags say to include. in PHP it fires up the PHP interpretor and then the PHP program follows all the instructions inside <?php .. ?> markers.

As for tutorials. for PHP stuff I use http://www.phpbuilder.com/ but that is more intermediate/advanced, it is very iffy finding specific newbie info. There are a few decent SSI tutorials, it is a simpler option. I'll hunt around and see if i can find something decent.

PHP Tutorials? - by Arislyn on 07:03 23 Jul 2004
Yeah!! Thanks, din!

Since I'm only working a half day today due to a doctor's appointment, I'll probably mess around with this some when I get home.

Now, for either of these, do I need any sort of extra software or is it entirely just a language? Can I just stick my text file in a directory on my server and by using the <!--include command, it'll know where to look if I path the file just as I would in normal HTML?

Thanks for your help, din! If I can figure this out, then I may actually get off my lazy butt and start updating again.  :D
PHP Tutorials? - by Brad on 07:13 23 Jul 2004
I'm going out on a limb so you might want to experiment with a test page, but I think you can just put it in.  The server already supports SSI and php.
PHP Tutorials? - by Arislyn on 14:44 23 Jul 2004
Fantastic! I was hoping the server was already set up for those. <Wheeee!>

Okay, I'm going to go see if I can make this work.

Hmmm....and while I'm in "WebMonkey Mode", let me ask a few opinions.

If I do get this to work, I'm still going to have to go in and change all my pages once. So, if I'm going to revamp, this will be the time to do it. The Tower has been gray and gold for a long time now, and I'm wondering if I should change the colors. Maybe I could go with something a bit more bright and natural....perhaps green/gold/white? Also, do you find the borders on the tables to be distracting or do they help delineate where things are, leading the eye to the right spot?

I just feel like the Tower is kinda of....bleh....in appearance. What can I do to spruce it up a bit?

<Arislyn dons her spring....errrr...early summer cleaning clothes and sets off towards the Tower, bucket and rag in hand>
PHP Tutorials? - by din on 18:00 23 Jul 2004
Ari, I think the borders are decent, they keep things focused and a dash of green wouldn't hurt .,. i'm partial to green anyways.

If you make a test page and can't get things to go the way you want send me PM or YIM me and I can look at what you have on the server or talk you through or whatever .. give a gentle nudge or a platonic prodding :P

While you looking at changing the look, and if your not doing anything structural to the pages your changing (same tables,etc) it might bear looking into cascading style sheets (CSS). You can set the colors, backgrounds, fonts and other style settings from a master sheet and any changes in the future can be made to just that sheet.

as you mentioned 'Webmonkey Mode' web monkey does have some decent tutorials on style sheets

http://webmonkey.wired.com/webmonkey/reference/stylesheet_guide/
and
http://webmonkey.wired.com/webmonkey/authoring/stylesheets/

and this has more complicated php menuing stuff, sort of higher end, but it can give an idea of what you can do with it

http://webmonkey.wired.com/webmonkey/99/25/index2a.html?tw=programming
and for SSI
http://webmonkey.wired.com/webmonkey/html/97/07/index2a.html

the is saved by webmonkeys :p
PHP Tutorials? - by Arislyn on 20:57 23 Jul 2004
Thanks for all the help!! You guys rock. :D

I'm going to read and experiment with this over the weekend. Since I'm not wanting to do anything fancy (just catering to my own laziness, really), I'm hoping that it won't take me long to figure out what I need and make the necessary changes.

Thanks for the offer of advice, din. I may well end up bugging ye for more help. Heh!
PHP Tutorials? - by Brad on 21:22 23 Jul 2004
I think at one time you had a site on Tripod with a background that was the most beautiful green.  It was really striking, I thought.  That might be something.

Of course I'm partial to black backgrounds.   :D   I remember the first time I saw the Tower it had a black background.   :cool:
PHP Tutorials? - by Arislyn on 22:43 23 Jul 2004
I may have to see if I still have that background somewhere. Hehe! As many time as I've had to reformat my hard drive, it may be lost to time unless I can remember where I got it.

I've been persuing template sites, looking at color combinations and I just keep coming back to grey! What is it with my fascination with the most Uber-Neutral Color Ever? <laughs>
PHP Tutorials? - by Arislyn on 16:45 28 Jul 2004
Yeah!! It works...and it was so easy to do! I have no idea why I didn't do this earlier. It's going to make updating my pages so much easier. *Glee!* Now, If I decide to mess with the page hierachy, it's not a matter of many, many days of work.

Thanks for pointing me in the right direction, guys. I really appreciate it.   :D

Current forums visit Unified Scifi Forums