• 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

Automatically loading avatars

 
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'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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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]
 
reply
    Bookmark Topic Watch Topic
  • New Topic