accessing $PHORUM array in template??
Posted by asdfasdf4285
accessing $PHORUM array in template?? January 10, 2005 01:11AM |
Registered: 19 years ago Posts: 6 |
//in index.php i added this lines,
$PHORUM["DATA"]["LANG"]["last_msg"]["body"]="blah";
echo PHORUM["DATA"]["LANG"]["last_msg"]["body"];
//works great, but i wanna use templates to do formating
i was kind of hoping that i just have to add
{LANG->last_msg->body} in the index template, but dont work...
...really lost...
how do i access vars in the template, that are genearated in the php file????
$PHORUM["DATA"]["LANG"]["last_msg"]["body"]="blah";
echo PHORUM["DATA"]["LANG"]["last_msg"]["body"];
//works great, but i wanna use templates to do formating
i was kind of hoping that i just have to add
{LANG->last_msg->body} in the index template, but dont work...
...really lost...
how do i access vars in the template, that are genearated in the php file????
Re: accessing $PHORUM array in template?? January 10, 2005 03:17AM |
Admin Registered: 21 years ago Posts: 9,240 |
Re: accessing $PHORUM array in template?? January 10, 2005 03:53AM |
Registered: 19 years ago Posts: 6 |
stufed it in
$PHORUM["DATA"]["msg"]
tryed just $PHORUM["DATA"] but that scrued up everything lol
but {FORUMS->DATA->msg} in index.tpl seems to be emty still
is the FORUMS arry in the tpl file a different array then the one in the php file? is there some sort of string replacement performent to display the data?
$PHORUM["DATA"]["msg"]
tryed just $PHORUM["DATA"] but that scrued up everything lol
but {FORUMS->DATA->msg} in index.tpl seems to be emty still
is the FORUMS arry in the tpl file a different array then the one in the php file? is there some sort of string replacement performent to display the data?
Re: accessing $PHORUM array in template?? January 10, 2005 04:02AM |
Admin Registered: 21 years ago Posts: 9,240 |
Re: accessing $PHORUM array in template?? January 10, 2005 05:02PM |
Registered: 19 years ago Posts: 6 |
cool that worked...but i want to stuff an message array into $PHORUM["DATA"]["msg"] itll be a last posted message preview, in the index page
$PHORUM["DATA"]["msg"]=phorum_db_get_message(phorum_db_get_last_msg_id($forum["forum_id"]);
echo $PHORUM["DATA"]["msg"]["body]; //will pint last posted message body
but [msg->body} is embty....is body not an element in array msg?
$PHORUM["DATA"]["msg"]=phorum_db_get_message(phorum_db_get_last_msg_id($forum["forum_id"]);
echo $PHORUM["DATA"]["msg"]["body]; //will pint last posted message body
but [msg->body} is embty....is body not an element in array msg?
Re: accessing $PHORUM array in template?? January 10, 2005 05:05PM |
Admin Registered: 21 years ago Posts: 9,240 |
Re: accessing $PHORUM array in template?? January 11, 2005 05:20PM |
Registered: 22 years ago Posts: 1,076 |
Re: accessing $PHORUM array in template?? January 11, 2005 05:23PM |
Admin Registered: 21 years ago Posts: 9,240 |
Re: accessing $PHORUM array in template?? January 11, 2005 07:13PM |
Registered: 22 years ago Posts: 1,076 |
Re: accessing $PHORUM array in template?? January 13, 2005 11:02AM |
Admin Registered: 23 years ago Posts: 4,495 |
print_r is the most useless function in the world without a wrapper. I and a coworker patched and proposed a change to allow an optional HTML flag to the function. It was denied by the PHP team.
Brian - Cowboy Ninja Coder - Personal Blog - Twitter
Sorry, only registered users may post in this forum.