MyBB Community Forums

Full Version: Pull User Website Links
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm trying to pull the URLs of homepages from users of a specific group and display it in a list, with the title being another custom profile field.
This is what I have in mind for the formatting:
if $mybb->user['displaygroup'] == 10 then
{
echo '<a href="'.$mybb->user['website'].'" target="_blank">'.$mybb->user['fid4'].'</a><br />';
}
I'm trying to find out how to be able to put {$sitelist} and get a list.
I'm really horrible with PHP, and I don't know where to go on from there.
Can someone help me? Thanks!
Is this going to be in a plugin, because if so it is being done incorrectly.
Oh well, yeah, but I haven't gotten any of the outline coded out yet.
I'm trying to get the middle section finished.
The plugin format I have.
The plugin format is most of the plugin, you should insert a template with what you want displayed.

E.G.

<a href="{$link}">{$username}</a>

That is an example of the template, you should add the tables, etc however you want it displayed.

Have your plugin add {$websites} or whatever you want to a template you want it displayed in (E.G. Index) then in your plugin add a plugin hook for index_start then under that hook add:

global $mybb, $db, $username, $link, $websites;

Define $username and $link with the ones you want and use

eval("\$websites = \"".$templates->get("template_name")."\";");

If you use echo it will display at the top of the page. You will need to add it through templates and hooks.