On our home page we have a list of the latest forum entries - see http://ellislab.com/expressionengine/user-guide/modules/forum/recent_forum_topics.html. The only thing that is missing is the last_author avatar.

So far I've been trying to get around it with using the last_author ID and replace the image. Example: <img src="/images/avatars/uploads/avatar_{exp:low_replace find="site_url/SITE_INDEX/" replace=""}{last_author_profile_path}{/exp:low_replace}.jpg"> , but if course I get in to trouble if the member have something else then .jpg image.

Have anyone found a solution and will I have to do a hack to the module?

Thanks! John


I think, you should develop a small plugin which would take {last_author_profile_path} as parameter. In the plugin code, fetch the last segment of last_author_profile_path and search it within the directory with PHP functions like strstr or preg_match and output the full name of avatar image (with image extension).

It would work for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.