XF 2.1 Help turning a code modification to an add-on

Oblivion Knight

Well-known member
I'm still very much learning the tricks of the trade. I've managed to piece together what I wanted to achieve via a code modification, but I'd like to achieve this as an add-on to save the classic upgrade headaches..


I've basically removed the profile tabs, combined a couple of bits with the member blurb (website & contact), relied on the member statistics for other parts (latest activity, postings, & media) and have made a couple of other tweaks via template modifications.

The part that relies on a code modification is moving the followers/following block from the About tab -> merging much of the code from public function actionAbout with public function actionView in src/XF/Pub/Controller/Member.php.

I've tried learning from other addons, going along the lines of class Member extends XFCP_Member and adding the relevant class extension, but can't get it to work. I've also tried simply modifying and including the member_about template in member_view but received an error from another add-on when attempting this.

Alternatively (and perhaps preferable) I'd like to add a "Followers" count alongside the various other counts present, and link it to {{ link('members/followers', $user) }}" data-xf-click="overlay", but I couldn't get such a count to work in the right location either.

Could somebody please educate this newbie? :ROFLMAO:
 
Last edited:
Back
Top Bottom