I think there was some confusion, or I am simply misinterpreting the code. Based on my understanding of plugin you created, I am to assume that it will fetch specific data (and display it) by using the $friendinfo function on a template.
This is not what I am looking for, as the content I wish to appear is already in the template, I simply want to restrict the content to only those permitted, in this case being the friends of the user.
At the moment in my profile if i specify 'friends only', it will only show the content in the following conditional to only that users friends.
Code:
<if condition="$prepared['isfriend']">
content
</if>
The issue is that this code was hard coded to only function only certain pages, although I would like to extend this functionality elsewhere. I have already posted above how it is included inside member.php, it is also included inside
profile.php, but this code is very specific to this page, so I can't use it in my plugin exactly as is:
PHP Code:
$userinfo = verify_id('user', $vbulletin->GPC['userid'], true, true, FETCH_USERINFO_ISFRIEND);
I tried using your plugin as follows:
PHP Code:
$friendinfo = fetch_userinfo($vbulletin->GPC['userid'], FETCH_USERINFO_ISFRIEND);
But I am almost postive this is incorrect, but received no error. Neither did my content appear as it should by using <if condition="$userinfo['friendinfo']">