RothCode Logo

RothCode.com
C++ PHP FLTK code && art

Summary

I have been updating and testing the XHTML page creation PHP classes. There may be periodic outages with the Code main page. HTML content PHP classes will be the next stage. They will hold static content or be filled dynamically from the page main PHP script.
2005.09.25
size 8940

Programming a Site using PHP, C++ and FLTK

This site is to become my contributions to any site developer that would prefer to build their site using PHP to create the HTML. It will become the home of various PHP and C++ class families designed to handle the nuts and bolts of adding content to a site. I use FLTK for helper applications when it is just easier to run something on the desktop instead of through a web interface. In a perfect world, it will all run from the same Makefile.

My first Goal will be to take the static page you are looking at and create it using PHP functions that will create the HTML code. It will be a class of PHP functions that build in a group manner, similar to the way FLTK builds groups. Content will be plugged in as desired.

My next Goal will be to design an editor with a web interface that will handle marking up the content areas on this site. The editor should support the bracketed bbstyle markup code used by forums. That should make it easy to be able to output content code for a number of different, yet similar, applications.

How I use/view PHP, HTML and CSS

I came across PHP after starting to learn C++. For years I have dabbled with programming in many different forms but C++ has been the first one that really seemed interesting and held my interest. That was until I met PHP.

Finding PHP was like finding a key to a door I had given up on. That door said WebMaster’s Only, all others will be shot on sight! Now, since the door was securely locked behind a wall of crypic things like Apache, HTML, XML and CSS, I never thought I would even bother with the door.

Oh how wrong I was...

I hate HTML. It rubs me the wrong way. I don’t know why, it just does. PHP on the other hand reads more like code I am used to reading. A little to C’ish for me, but I hope to change that as this site grows. I was looking for a way to shield myself from the page markup while still being able to feed information to people using the web to become in touch with the world in general.

Having been introduced to CSS I have tempered my hatred for HTML a bit. AH HA, a way to control that markup without having to think so much about it. I am liking this more and more already. It feels a little more like programming. Maybe it is just the semi-colons, who knows. At any rate, it convinced me that there is more to all this web stuff than having to write raw HTML code. I am a bit more interested already.

Wrapup for 2005.09.21

I have been making enough progress with the XHTML page generation PHP classes to use them on the code main page. I will post the code in the appropriate sections in the next day or so and will likely write an article for GIDNetworks as well. For now though, the content is still in the generator PHP class until I finish writing the content containers. Everything is generated as XHTML Transitional and will validate. The creator classes still need to have error checking against known page names. The containers are designed to be very simple to use and will be called from the main pagename script. As with everything, they are dependent on classes defined in the CSS file and will be passed into the generator classes as a content list to be added to the div’s during creation. Once the content has been properly removed and placed in containers I will bring the rest of the pages up to that point. From there, I will move to the markup code which can be controlled by subclassing a content container for its actual type. I hope this will make the syntax highlighting as well as normal output a breeze.

GID news

GIDForums™
C++ to PHP
Sunday Morning Humor
C++ Decks and Dice
C++ Directories

FLTK news

FLTK
FLTK 1.1 r4527
Six FLTK STR’s left
FLTK CHANGES file
FLUID Live Mode