throwing myself in this with my current coding project.
I have been dreading/wishing to get this completed for a while
now, and am finally forcing myself to work on it.
The below, is my 'Alpha' idea on how to have a start for
a system that will make css based design much easier
within php, and welcome (want) ideas on what I should
look at to do it differently.
First thing is I try to use CSS for design as much as possible,
which in turn would mean creating tag recognition within php
to use the css.
This is what I have thought of so far, but not sure how well it is,
and this isn't the full code... but excerpts to give an idea
of what I have worked on so far...
TAGS.PHP
This would hold all the css tag values that would be used by
the preg_replace within TEMPLATE.PHP:
(would eventually be Web-Adminable)
Code: Select all
$newstart = "<div id='showindexnews'>";
$newsend = "</div>";Converts tags to the css as well as hold
any values such as newsid etc...:
Code: Select all
$html = preg_replace("#\[news\](.*?)\[/news\]#i", "{$newstart}\\1{$newsend}", $html);This would hold any display functions
and keep them until they are finally called to be used
by DISPLAYNEWS.PHP:
Code: Select all
function displayNewTitles($sitename)
{
global $sql;
$query = "select * from table where published='1' order by did desc limit 100";
$result = $sql->query($query);
do
{
$title = $sql->row[lova];
$string = "[news]{$title}[/news]";
$joetest = submitTags($string, 1, 1, $siteurl, $directory, $imgalt, $vf);
echo $joetest;
}while($sql->next_row());
}Now I finally display the News Titles :
Code: Select all
displayNewTitles($sitename);