Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted December 13, 2024Dec 13 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 );
December 13, 2024Dec 13 You can add items into areas on the template using theme hooks now. You can see how those work here. Is this what you are looking for?
December 13, 2024Dec 13 Author Hey @Marc thank you for your answer Can you explain to me exactly how to create this in IPS 5 BETA? Currently I have a problem with creating a custom block querying the database to get characters. I would like to include characters from the srv_characters tab in player profiles that have memberid as the forum user id.
December 13, 2024Dec 13 You would be best to post within the beta forum. I wouldnt be the person to assist you on this (Im not one of the developers). Just thought the above might have been what you were looking for 🙂 What I would say, is some things you will need to create an application for