I am having a problem with my template system that takes variables embedded in templates such as {STYLE_DIR} and replaces them with php variables "theme/thestyledir".
The problem is this is only half working and variables in the template such as {row[n_title]} which ill use as an example will not be replaced. I know where the problem is i just don't know how to fix it.
The problem is in my theme class:
http://zeaus.wtfux.com/pcm/includes/theme.sphp
in my news class i have this code
while ($style->row = mysql_fetch_array($query))
{
$content = "$content". $style->get_page_new(TEMP_NEWS_HEADLINE);
}
this calls get_page_new which replaces the tags using the function variable_buffer..
My problem is that in my theme class $this->row will not print any information in the variable_buffer class. But it will in get_page_new.
I know my variable_buffer function works because i have tested it by putting $this->row[n_title]="blah" at the top of variable_buffer and this
$var = @constant($string[1]);
works great.
The only thing that i can see which could possibly be wrong with it is that i am either calling the variable up wrongly ( $this->row[n_title] ) or it has some thing to do with preg_replace_callback() in get_page_vars in my theme class..
I have tryed searching for preg_replace_callback() but i couldnt find anything..
Please does anyone know why my class variable $row will not allow information be passed to the function variable buffer? 😕 😕