You welcome. Your idea is implemented
Issue resolved and tested with the JS version. Permits you to place the JS link anywhere you wan't
1. Remove the next 2 lines from referbbtofriend.php
Code:
$threadid = verifyid("thread",$threadid);
$threadinfo=getthreadinfo($threadid);
2. Edit the JS link to read:
Code:
var popurl="referbbtofriend.php?s=$session[sessionhash]"
Place the new JS code anywhere you want and loged in user can use it.