Jump to content

Character List in profile BETA IPS 5


Go to solution Solved by Calise563,

Recommended Posts

Posted

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 );

 

Posted

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.

Posted

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...