Mutt
03-07-2003, 07:32 PM
I posted this in the wrong forum and can't delte it there, sorry
sometimes when I'm making a hack, I want to have the hack make a post and I'd like to use a template to format that post so it's easy to change later. I always seem to have to make the template / post an html post. When I try to set up the template using vbcode, I get errors.
example template
Offending User: $postusername
Offending Post: Go directly to post #$postid ($bburl/showthread.php?postid=$postid#post$postid)
Original Post Date : $postdate $posttime
Thread: $posttitle ($bburl/showthread.php?threadid=$threadid)[hr]$message[hr]The offending post has been copied below
now this seems like a perfectly fine template but if I try and use it I get this error
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /path/to/forum/report.php(61) : eval()'d code on line 2
it's caused by the brackets in the template. If I remove the brackets and leave everything else, it works. If I add a backslash before the brackets it works, but the backslashes get printed. I'm sure this is something real simple but I don't know what. I'd like to use
I'm calling the template like this
eval("\$message = \"".gettemplate("reportbadpost_post",1,0)."\";");
thanks in advance and sorry again for the double post
sometimes when I'm making a hack, I want to have the hack make a post and I'd like to use a template to format that post so it's easy to change later. I always seem to have to make the template / post an html post. When I try to set up the template using vbcode, I get errors.
example template
Offending User: $postusername
Offending Post: Go directly to post #$postid ($bburl/showthread.php?postid=$postid#post$postid)
Original Post Date : $postdate $posttime
Thread: $posttitle ($bburl/showthread.php?threadid=$threadid)[hr]$message[hr]The offending post has been copied below
now this seems like a perfectly fine template but if I try and use it I get this error
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /path/to/forum/report.php(61) : eval()'d code on line 2
it's caused by the brackets in the template. If I remove the brackets and leave everything else, it works. If I add a backslash before the brackets it works, but the backslashes get printed. I'm sure this is something real simple but I don't know what. I'd like to use
I'm calling the template like this
eval("\$message = \"".gettemplate("reportbadpost_post",1,0)."\";");
thanks in advance and sorry again for the double post