Hi Borbole,
great add-on!
question:
was this block previously showing below the "top posters"-block (from the top posters add-on) ?
Did you switch this order?
Thanks!
If you use it in the combination with my other add on, sidebar higest-posting members, then the the order of showing up in the sidebar will depend on which add on you will install first.
I just posted on the other one ('daily' new members), but maybe it would be more appropriate within this one.
Any chance for a 'random members' block?
Best would be a combined 'newest' and 'random' separated by a line or something with the same block.
Yes, but I will not include it in this mod as it is better done as a new separate mod. I can code one for you but if it is a paid request as I do not have much free time to spend woking on free mods.
Thank you for the answer. I may reach out to you the closer I get to bringing my sites over to xF. I have a few custom mods being worked on right now, so I'll be sure to reach out to you if/when I need to. Thanks again
<?php
class Borbole_NewestMembers_Listener
{
public static function templateHook($hookName, &$contents, array $params, XenForo_Template_Abstract $template)
{
if ($hookName == 'page_container_sidebar')
{
$options = XenForo_Application::get('options');
$newusersnumber = $options->newusersnumber;
$criteria = array(
'user_state' => 'valid',
'is_banned' => 0
);
$latestUsers = XenForo_Model::create('XenForo_Model_User')->getLatestUsers($criteria,
array('limit' => $newusersnumber));
$params = array(
'latestUsers' => $latestUsers
);
$search = '<!-- end block: sidebar_online_users -->';
$contents = str_replace($search, $search . $template->create('borbole_newest_members', $params), $contents);
}
}
}
class Borbole_NewestMembers_Listener
{
public static function templateHook($hookName, &$contents, array $params, XenForo_Template_Abstract $template)
{
if ($hookName == 'page_container_sidebar') {
$search = '<!-- end block: sidebar_online_users -->';
if (strpos($search, $contents)) {
$options = XenForo_Application::get('options');
$newusersnumber = $options->newusersnumber;
$criteria = array(
'user_state' => 'valid',
'is_banned' => 0
);
$latestUsers = XenForo_Model::create('XenForo_Model_User')->getLatestUsers($criteria,
array('limit' => $newusersnumber));
$params = array(
'latestUsers' => $latestUsers
);
$contents = str_replace($search, $search . $template->create('borbole_newest_members', $params), $contents);
}
}
}
}
one small suggestion and i hope you'll not take it bad like some other devs...
It's just a small share of my own experiance
We use essential cookies to make this site work, and optional cookies to enhance your experience.