Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within JForum
Search Coderanch
Advance search
Google search
Register / Login
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
Forum:
JForum
Display user online/offline status in each post
Migrated From Jforum.net
Ranch Hand
Posts: 17424
posted 19 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Can we add the user online/offline status below "Location" of each post's author area.
Maybe there could also be the total amount of his Duke points.
[originally posted on jforum.net by andowson]
Migrated From Jforum.net
Ranch Hand
Posts: 17424
posted 19 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Ok, I registered it in JIRA:
http://www.jforum.net/jira/browse/JF-222
Rafael
[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand
Posts: 17424
posted 19 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
OK, I finished it now.
The step needed is as follows:
1. add a new method isOnline() to net/jforum/entities/User.java
import net.jforum.SessionFacade; ... /** * Is the user online? * * @return true if user is in Session */ public boolean isOnline(){ return SessionFacade.isUserInSession(this.id) != null; }
2. modify post_show.htm
add this
<#if post.userId != 1> =<#if user.isOnline()> ${I18n.getMessage("PostShow.userOnline")} <#else> ${I18n.getMessage("PostShow.userOffline")} </#if>= </#if>
below
<#if post.userIp?exists && isModerator> ${I18n.getMessage("PostShow.userIP")}: ${post.userIp}<br /> </#if>
BTW, we can add user's registrationDate also, modify the following
<#if post.userId != 1> ${I18n.getMessage("PostShow.userTotalMessages")}: ${user.totalPosts} </#if>
to
<#if post.userId != 1> ${I18n.getMessage("PostShow.userRegistrationDate")}: ${user.registrationDate?date('dd/MM/yyyy')}<br /> ${I18n.getMessage("PostShow.userTotalMessages")}: ${user.totalPosts} </#if>
The following key needed to be added for I18n
PostShow.userRegistrationDate = Joined
PostShow.userOnline = Online
PostShow.userOffline = Offline
If possible, please add them to CVS.
[originally posted on jforum.net by andowson]
Migrated From Jforum.net
Ranch Hand
Posts: 17424
posted 19 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
W00t
Great Andowson!. I have modified the files! Thank you.
Rafael
[originally posted on jforum.net by Rafael Steil]
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
?
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
jtree problem
Disable hyperlink and Mouseover
Online user Vs Offline
Tiles advice
Do stuffs when browser closes
More...