Ivo Pereira Posted April 12, 2015 Share Posted April 12, 2015 Hello,I'm using PHP & TXT Widget and I'm needing to insert an iframe that needs to include the ID of the current logged-in user in the URL.As with this plugin I can use PHP, how can I print the ID of the actual user? Thanks a lot! Link to comment Share on other sites More sharing options...
Ivo Pereira Posted April 12, 2015 Author Share Posted April 12, 2015 I was able to achieve it. I was using the wrong code block. Needed to activate the "Active PHP widget" in plugin settings, then get the "PHP Code" block (that appeared after activating the setting) and get it to layout.After that, this did it:<?php $logged_in = \IPS\Member::loggedIn(); if (!empty($logged_in)) { echo '<iframe src="http://example.com/' . $logged_in->member_id . '" width="100%" height="400" frameborder="0"></iframe>'; } ?> Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.