How to add post count in acp

pattycake2

Active member
In ACP, when pulling up a member, can I add message counts to their page?

Also, how can I make the displayed email address clickable so I can send them an email from their profile page? It would be nice if it used PHP mail but at this point, I'm ok with an a href mailto link

Do I need to edit the admin template or is this a no-no?
 
In ACP, when pulling up a member, can I add message counts to their page?
Yes, modify template admin:user_edit and output variable $user.message_count where you woud like it to appear.

Also, how can I make the displayed email address clickable so I can send them an email from their profile page?
Do you refer to ACP here is well?
If so: Add <a href="mailto:{$user.email}">{$user.email}</a> where you would like it to appear

It would be nice if it used PHP mail but at this point
There is no direct built-in functionality to do that, so this would need a bit of programming - but should be easy.

Do I need to edit the admin template
Yes, you will have to modify admin templates.
 
wow.... that was quite an ordeal just to insert one line into the template... but, got it done .. thank you.
 
Last edited:
Enable development mode (do not do this on a production system - never!), create a template modification - directly editing cached code is useless; it might get overwritten any time (it will get overwritten on XenForo upgrades).

you state to never do this on a production system - never.
I got it done on my test site... now how to get it on the production site without going into development mode?
 
Create the template modification as an add-on.

Install it in your production site.
 
Well, you can do this but you never should.
Gsving development mode is kinda dangerous and exposes critical system info to guests.
Gotcha... Ozzy47 must have felt pity on me and created an add-on that works perfectly. And by looking at his add-on, I'm pretty sure I can do similar things now by creating my own add-on. Thanks Kirby, and super thanks to Ozzy47
 
Learning to create add-ons was a big help to me. It does require command line access and learning how to use cmd.php. Any template modifications I do are add-ons, so I can easily add them to a production site and also turn the template modifications, or the add-on itself, if there is an issue. I run a separate, non-public forum instance for development work and by now, have nearly 20 add-ons I use in various places, some which are specific to the forums I manage.

There is a command where you build a release, which creates the installable zip file. Then you can install it on a live, production forum easily. The official XF docs should cover most of what you need. 👍
 
Learning to create add-ons was a big help to me. It does require command line access and learning how to use cmd.php. Any template modifications I do are add-ons, so I can easily add them to a production site and also turn the template modifications, or the add-on itself, if there is an issue. I run a separate, non-public forum instance for development work and by now, have nearly 20 add-ons I use in various places, some which are specific to the forums I manage.

There is a command where you build a release, which creates the installable zip file. Then you can install it on a live, production forum easily. The official XF docs should cover most of what you need. 👍
Thank you
 
Back
Top Bottom