This week's book giveaways are in the Cloud and AI/ML forums.
We're giving away four copies each of Cloud Native Patterns and Natural Language Processing and have the authors on-line!
See this thread and this one for details.
Win a copy of Cloud Native PatternsE this week in the Cloud forum
or Natural Language Processing in the AI/ML forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Automatically loading avatars

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm planning on two improvements, but I've just looked at JForum for about 5 minutes, so I need to ask a few questions to get a head start

1) We have an avatar repository in my company, and I would like to load these based on the login id automatically. I use LDAP authentication, so user IDs will always match the correct avatars. Could/should this be done directly in the template, or should I look at the backend somewhere? I believe this improvement would result in a new entry in SystemGlobals.properties, something like

avatar.load.url = http://avatars.dk/avatar={$user_id}

2) I would like to show LDAP common names (long names) below the user ID of every posting. Is this possible? How much information is loaded from LDAP if any at all?

Thanks in advance!


/Martin
[originally posted on jforum.net by inzide]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The LDAPAuthenticator that comes with jForum is pretty simple. It just creates a matching jForum entry based on the username and e-mail. This is done in the SSOUtils.register(password, email) method.

Instead of using this method, you could replace it in a custom LDAPAuthenticator that populates the jForum user with as much info as you want to extract from the LDAP server, including your avatar reference.

As to using people's full name, this can be done by editing the template files to use the the user object's from value. E.g, in forum_show.htm, you could use ${topic.postedBy.from} and ${topic.lastPostBy.from} which maps into the jForum java code of topic.getPostedBy().getFrom(), etc.

There is one bug in JIRA related to this. Some of the user info was not fully populated when a topic was added. I'm not sure if the patch for this got into the final version of 2.1.7 or not.
[originally posted on jforum.net by monroe]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!