Add recipient avatar in messagerow block var

Discussion forum for Extension Writers regarding Extension Development.
Post Reply
RaduArmoury
Registered User
Posts: 3
Joined: Sat May 04, 2019 8:35 pm

Add recipient avatar in messagerow block var

Post by RaduArmoury » Sun Jun 02, 2019 9:43 pm

Hello,

I am currently following this tutorial in order to modify the "messagerow" block var before it is assigned in this event: core.ucp_pm_view_folder_get_pm_from_template. However, as a beginner I can't find enough documentation to help me do this.

What I am trying to do is include the author's avatar in the block var, so that when a user views their list of private messages, it would also show their avatar image alongside the message's title. I have succeeded in subscribing my custom method to the event, but now I have no idea how to send the avatar image information to my viewfolder page.

Can someone give me a tip on how I can do this?

User avatar
Autumn Shade
Registered User
Posts: 29
Joined: Thu May 30, 2019 12:38 pm

Re: Add recipient avatar in messagerow block var

Post by Autumn Shade » Tue Jun 04, 2019 6:20 am

You can first modify the sql, so you get the avatar alongside user_id, then you can pass it to the template arguments.
https://wiki.phpbb.com/Event_List#core. ... m_from_sql

Post Reply

Return to “Extension Writers Discussion”