Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted April 12, 20159 yr 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!
April 12, 20159 yr Author 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>'; } ?>
Archived
This topic is now archived and is closed to further replies.