Jump to content

Multiple Languages in a Page


TwisttyVodka

Recommended Posts

Hey, I've been searching recently for a way to use IPS framework, PHP and HTML in a newly created page, unfortunately I couldn't find a way.

Detailed:

I've created a new page using ACP and my idea was to put there my User Control Panel that I made, it includes HTML, CSS and PHP. Everything began ok before I realise PHP is not supported in pages. IPS framework works great with HTML, but PHP shows as plain text when browsing the page.

Example:

<?php
$dbIP = "localhost";
$dbUsername = "dbusername";
$dbPassword = "dbpass";
$dbName = "dbname";
$con = new mysqli($dbIP,$dbUsername,$dbPassword,$dbName);
?>

	// Here I gather the profile picture of loaded user with id 83 - this works fine //
										{{$loadedMember = \IPS\Member::load( 83 );}} {{$picUrl = $loadedMember->photo;}}
										<td class='avatar'><img src='{$picUrl}' /></td>
	// Now I'm tring to output the name of a user - doesn't work - read text after code box //
										<td class="nickname"><?php echo $row['nick']; ?></td>

So, the main problem is PHP doesn't work in pages and when I open the page I've created, it shows the PHP code as plain text.

 

Thanks in advance for any help.

EDIT: I didn't add mysql queries that I execute to gather the nickname. The only problem is showing php as a plain text.

Edited by TwisttyVodka
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...