Calise563 Posted Friday at 09:58 AM Posted Friday at 09:58 AM 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 );
Marc Posted Friday at 11:08 AM Posted Friday at 11:08 AM 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?
Calise563 Posted Friday at 11:18 AM Author Posted Friday at 11:18 AM 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.
Marc Posted Friday at 11:20 AM Posted Friday at 11:20 AM 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
Solution Calise563 Posted Friday at 11:23 AM Author Solution Posted Friday at 11:23 AM okay, thanks for your time 🙂
Recommended Posts