Page Builder
From HadronWiki
- Why is this called Page Builder? Well first, it was the name I gave the directory where I chose to "build" my webpage. Secondly, I'm too lazy to come up with something else better, not like this deserves such a name or anything, anyway.
Contents |
Download
- Downloads are here: http://hadron.physics.fsu.edu/~coltharp/dl/
v1 (full) page.builder.v1.00.tgz v1.01 (full) page.builder.v1.01.tgz v1.01 (upgrade) index.php.v1.01.tgz
Warning
|
The script in this package, when run will write to files in the directory for which it is installed. Example, this package is normally installed in ~/public_html . When the scripts in the package are run, files will be copied to ~/public_html . Incase you do not want files in your ~/public_html directory to be meddled with, it would be best to install this elsewhere. |
Install
1. Go to your public_html directory and unpack the tarball.
cd ~/public_html tar -xzf ~/page.builder.tgz
Create you web page
1. Login to hadron.physics.fsu.edu. Hadron has all the necessary software that you'll need. (PHP for instance.)
2. Go into the page.builder directory.
3. Edit the content.php file to add your personal information. See below for a list of other changes you may make.
4. Issue a make statement in the page.builder directory.
cd ~/public_html/page.builder make
5. If there are no errors from the PHP parser then you may view your new "draft" webpage at http://hadron.physics.fsu.edu/~<Your Login>/page.builder.
6. If you wish to change anything go back to step 3. Notice that no changes are happening to your regular homepage. All edits you make are being done to ~/public_html/page.builder .
7. Once you have reviewed and approved the "draft" of your webpage, and you want to publish this webage over what is in your ~/public_html directory, overwriting the page that is there now, then issue this make statement:
cd ~/public_html/page.builder make publish
This command subsequently copies all appropriate files from page.builder to page.builder/.. (which should be ~/public_html if you followed these instructions.)
8. At this point your new webpage is viewable at http://hadron.physics.fsu.edu/~<Your Login> .
Ways to edit
Files you should edit... and files you should not edit
| This file feed the php script with your information. | |
| Adds HTML content to the main section of your webpage. | |
| Adds HTML content to the right sidebar of your webpage. (above the banners if you use them) | |
| incase you need some extra CCS code-- this is advanced stuff. | |
| I would avoid editing this file, unless you want to play. | |
| The scripts in the makefile overwrite changes made here. So if you use the scripts then your changes here will not be permanent. | |
| Graphic files reside in folders gfx and img. Add to this as desired. | |
| You should pretty much leave these alone, unless you really really like playing! |
Philosophy of coding
- I chose make for this implementation because we use make to compile c++ in this group alot. So with a very simple make file this should not confuse any of us. Hopefully it helps some who is new to Linux and GNU Make by providing them an example of a simple makefile.
- Furthermore I chose PHP because I feel it shares alot of syntax rules with c++, so it is not totally alien. Plus PHP shares many syntax traits to tcsh/csh and perl, which are tools for which it behooves one in this group to be familiar with.
Changes
v1.01
- index.php was changed to include a title underneath the users name.
- index.php for this change can be downloaded separately at index.php.v1.01.tgz.
- To use this feature:
- Replace the index.php. (only if you have version 1.00)
- Edit your content.php file to include the follow key in the $user array. In other words...
- Change this :
$user= array( "name" => "--Your Name--",
"email" => "--Your e-mail address--");
- To this:
$user= array( "name" => "--Your Name--",
"email" => "--Your e-mail address--"),
"title" => "--Your Title--");

