This content has been marked as final.
Show 2 replies
-
1. Re: bb template constants
jae77 Jan 23, 2004 11:23 PM (in response to jae77)"jae77" wrote:
also, how are tokens such as this ${bb.Edited_time_total_0} replaced? i've been poking around a bit, but i'm not having any luck. -
2. Re: bb template constants
julien1 Jan 24, 2004 4:37 AM (in response to jae77)"cooper" wrote:
some tokens are replaced on a per user basis : the thread creating the DelegateContext object stuff it with the values.
root.put("FORUM_NAME", forum.getName());
some tokens are replaced at a global level. that means that the Template object get them in another Context which is global to the Template object. They are defined at compile time (meaning when it is deployed and compiled into a Class) and the template compiler knows it has to do that when it get a property files associed.
if the value is immutable (like ) it is setup there.
if the value is changing (like number of users online), there are threads (Timer actually) that take the template object and update it at this global level. For instance :
theme.setTemplateProperty(TPL_THEME_INDEX_BODY, "TOTAL_POSTS", totalPostsMessage);