Data driven content management
| From: | dwalker | Date: | Fri, 18 Apr 2003 06:58:51 +0000 |
| Subject: | Data driven content management | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-144384@lists.php.net to get a copy of this message | ||
I have a data driven page that assembles links to content (images and other
files within the site) using information retrieved from my database. It
works beautifully, except, I'm not sure how to force it to differentiate
images from other files. Currently the page outputs the ascii
representation of the image and not a human viewable picture.
I have three columns (and some tables) within the page and 3 corresponding
database searches for each column. ( columns are numbered from left to
right). Each search is responsible for 'working' the database from top to
bottom looking for content that hasn't expired, belongs in its column and/or
is scheduled to start. Content that is supposed to 'stick together' gets
placed into the database one corresponding record after the other (in the
order I want them viewed).
I'm trying to write the code in such a way that I don't have to worry about
the image versus 'other file' and thought I'd try to implement something
within the database, but I'm not really sure what that something aught to
be.
Any suggestions would be much appreciated?
NOTE: records within the database will be manipulated via another page
within the site.
To make it a little more complicated, I also have a table consisting of
links to alternate images for the purpose of giving the site a little flare.
The image groups will have a Parent > child relationship and will
interchange at a specific, currently unknown rate.
The 'content' table is structured accordingly:
SubmissionDate timestamp(14) NOT NULL, -- system generated. when content
added to site
ActivationDate date default NULL, -- date the content displays
ExpirationDate date default NULL,--date the content expires
Pagename varchar(50) default NULL,--page name of file to include
Pagepath varchar(150) default NULL,--path to page name
ImageName varchar(50) default NULL,--image name of image to include
ImagePath varchar(255) default NULL,--path to image name
Eventnotes varchar(255) default NULL,--notes about the content
TextFileName varchar(50) default NULL,--name of txt file or XML file to
include
TextFilePath varchar(255) default NULL,--
ColumnNumber int(11) default NULL,defines which column the content belongs
Eventnoteslink varchar(255), -- a link to more info about the content