Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt November 11, 2024
Calise563 Posted December 13, 2024 Posted December 13, 2024 Hello, previously, on older versions of ips, I simply added code to profile.php to provide data about game characters belonging to a given account on the forum. Then I displayed them in the profileactivity template. I have a question about the IPS 5 beta. How should I display the characters? How to pass data to profile activity or how to edit it? Maybe there is another option to do this type of thing? Thank you very much for all your help, I count on your help! Regards try { $select = \IPS\Db::i()->select( '*', 'srv_characters', 'char_gid='.$this->member->member_id); foreach( $select as $key => $id ) { $characters[] = $id; } } catch( \UnderflowException $e ) { \IPS\Output::i()->error( 'no_module_permission', '2C122/1', 403, '' ); } try { $select = \IPS\Db::i()->select( '*', 'srv_penalties', 'penalty_user_global_id='.$this->member->member_id); foreach( $select as $key => $id ) { $penalty[] = $id; } } catch( \UnderflowException $e ) { \IPS\Output::i()->error( 'no_module_permission', '2C122/1', 403, '' ); } $tabContents = \IPS\Theme::i()->getTemplate( 'profile' )->profileActivity( $this->member, $latestActivity, $statusForm, $characters, $penalty );
Recommended Posts