• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Change or create an entry in a theme template file

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I see in the bottom.htm there is ${usersOnline} where you get the status of the user.
I?m personalizing the template and I need only the number of connected users the ${usersOnline} returns me a sentence.
Where can I change the code to add and entry to do this like ${numberUsersOnline}? Is there documentation or something I can read to understand this model?

TIA
Marco
[originally posted on jforum.net by radar]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Edit the file net/jforum/view/forum/ForumAction.java, method "list". There you will find all code for the forum's home page.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
thanks for the quick answer, I saw there are many useful entries that I can use like "totalOnlineUsers" that could be what I need.


[originally posted on jforum.net by radar]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I see the ${totalOnlineUsers} is valid only for the home page but if I go to login page, for instance, this entry doesn't exist. Is there a way that I make it global?

I see ${forumTitle?default("JForum")} entry in the header.htm, for instance

TIA
Marco

[originally posted on jforum.net by radar]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Was this resolved? I am trying to do the same but getting the same error... any help would be appreciated. thanks.

[originally posted on jforum.net by hsb]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For performance reasons, the "global" template variables are pretty much static lookups from the cached config file. However, if you need some custom globals, it's not too hard to modify the prepareTemplateContext method in the ControllerUtils class to add what you need.
[originally posted on jforum.net by monroe]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks. So can i just not add static variable to config file? if not can you help me with modifying prepareTemplateContext method? I am not really Java person.
[originally posted on jforum.net by hsb]
reply
    Bookmark Topic Watch Topic
  • New Topic