Say your portal table's primary key is named: __pkPortalTableID. Say your portal's table is named "Portal".
The OnObjectEnter trigger on your portal might run this script:
Set Variable [ $$PortalID ; value: Portal::__pkPortalTableID ]
Hide Object When for the buttons might be set as: Portal::__pkPortalTableID ≠ $$PortalID
Haven't actually tried this, if you get problems getting things to update smoothly, give the button an object name and include a Refresh Object step specifying that object name as the last line of the OnObjectEnter performed script.