Esempio n. 1
0
 /**
  * Parse the user's name and include a link to profile if required.
  * 
  * @param $user
  * @param $params
  * @return unknown_type
  */
 function getName(&$user, &$params)
 {
     if ($params->get('link')) {
         $link = modJTipsOverallLadderModule::getProfileLink($user->user_id, $params->get('link'));
         if (!empty($link)) {
             return "<a href='{$link}' title='{$user->display}'>{$user->display}</a>";
         }
     }
     return $user->display;
 }
Esempio n. 2
0
            ?>
			<td class="<?php 
            echo $class;
            ?>
"><?php 
            echo modJTipsOverallLadderModule::getProfileImage($user->user_id, $params->get('link'));
            ?>
</td>
			<?php 
        }
        ?>
			<td class="<?php 
        echo $class;
        ?>
"><?php 
        echo modJTipsOverallLadderModule::getName($user, $params);
        ?>
</td>
			<td class="<?php 
        echo $class;
        ?>
" align="center"><?php 
        echo $user->score;
        ?>
</td>
		</tr>
		<?php 
    }
}
?>
	</tbody>
Esempio n. 3
0
defined('_JEXEC') or die('Restricted Access');
/**
 * Website: www.jtips.com.au
 * @author Jeremy Roberts
 * @copyright Copyright &copy; 2009, jTips
 * @license Commercial - See website for details
 *
 * @since 1.0 - 30/04/2009
 * @version 1.0.0
 * @package jTips
 *
 * Description: Build the layout for the ladder
 */
require_once dirname(__FILE__) . DS . 'helper.php';
// set default options
$params->def('display', 'username');
$params->def('field', 'points');
$params->def('limit', 10);
$params->def('order', 'DESC');
$params->def('link', '');
$params->def('avatar', 0);
// get all the users for the current competitions
$users = modJTipsOverallLadderModule::getList($params);
// can be used later to allow different layout options in xml parameters - Not currently used
$layout = $params->get('layout', 'default');
$layout = JFilterInput::clean($layout, 'word');
$path = JModuleHelper::getLayoutPath('mod_jtips_overall_ladder', $layout);
if (file_exists($path)) {
    require $path;
}