- Postagens: 62
- Obrigados Recebidos: 0
- Fórum
- /
- Suporte Joomla
- /
- Módulos
- /
- Joomla 1.5
- /
- Ajuda para editar o Módulo mod_alphauserpoints_mostactiveuse
Ajuda para editar o Módulo mod_alphauserpoints_mostactiveuse
- riggsba
-
Autor do Tópico
- Offline
- JCB! Junior
-
Menos
Mais
14 anos 2 meses atrás #51999
por riggsba
[i:e5lbzznr]Bruno || Riggs
Bacharel em Sistemas de Informação[/i:e5lbzznr]
riggsba created the topic: Ajuda para editar o Módulo mod_alphauserpoints_mostactiveuse
Senhores, estou utilizando este módulo (mod_alphauserpoints_mostactiveusers), tentei de várias formas fazer com que o link seja o Avatar e retirar o nome e os pontos, mas sempre da algum erro.
Gostaria de saber se alguém pode ajudar.
Quero que os avatares sejam os links para o perfil, e que eles fiquem alinhados lado a lado, a cada um que vai ficando ativo, e não uma abaixo do outro
Eis o código:
Gostaria de saber se alguém pode ajudar.
Quero que os avatares sejam os links para o perfil, e que eles fiquem alinhados lado a lado, a cada um que vai ficando ativo, e não uma abaixo do outro
Eis o código:
<?php
/**
* @version $Id: mod_alphauserpoints_mostactiveusers.php 2010-05-02 v1.5.5 $
* @package AlphaUserPoints for Joomla
* @copyright Copyright (C) 2008-2009. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
$document = & JFactory::getDocument();
$db =& JFactory::getDBO();
$com_params = &JComponentHelper::getParams( 'com_alphauserpoints' );
$user = & JFactory::getUser();
if ( $list ) {
if (!class_exists('AlphaUserPointsHelper')) {
require_once (JPATH_SITE.DS.'components'.DS.'com_alphauserpoints'.DS.'helper.php');
}
if (!function_exists('getAvatar')) {
require_once (JPATH_SITE.DS.'components'.DS.'com_alphauserpoints'.DS.'helpers'.DS.'helpers.php');
}
$com_params = &JComponentHelper::getParams( 'com_alphauserpoints' );
$useAvatarFrom = $com_params->get('useAvatarFrom');
?>
<div>
<ul style="padding:0;margin:0;list-style: none;">
<?php
$i = 1;
foreach ($list as $item) {
$usrname = htmlspecialchars($item->usrname, ENT_QUOTES, 'UTF-8');
$userinfo = AlphaUserPointsHelper::getUserInfo($item->referreid) ;
switch ( $params->get('linktoprofile', '') ) {
case 'aup' :
$query = "SELECT id FROM #__menu WHERE `link`='index.php?option=com_alphauserpoints&view=account' AND `type`='component' AND `published`='1'";
$db->setQuery( $query );
$profileitemid = '&Itemid=' . $db->loadResult();
$profil = JRoute::_( 'index.php?option=com_alphauserpoints&view=account&userid=' . $item->referreid . $profileitemid);
break;
case 'ku' :
$query = "SELECT id FROM #__menu WHERE `link`='index.php?option=com_kunena' AND `type`='component' AND `published`='1'";
$db->setQuery( $query );
$profileitemid = '&Itemid=' . $db->loadResult();
$profilLink = JRoute::_( 'index.php?option=com_kunena&func=fbprofile&userid=' . $userinfo->userid . $profileitemid);
break;
case 'cb' :
$profil = JRoute::_( 'index.php?option=com_comprofiler&task=userProfile&user=' . $item->userID);
break;
case 'cbe' :
$profil = JRoute::_( 'index.php?option=com_cbe&task=userProfile&user=' . $item->userID);
break;
case 'ju' :
$profil = JRoute::_( 'index.php?option=com_joomunity&profile=' . $usrname );
break;
case 'js' :
$profil = JRoute::_( 'index.php?option=com_community&view=profile&userid=' . $item->userID);
break;
default :
$profil = "";
break;
}
?>
<li style="background:none;padding:5px 0;border-bottom:solid 0px #ccc;list-style: none;">
<?php
if( $params->get('showavatar', 0) ){
?>
<div style="float:left;width:38px;">
<div style="padding:0px;border:solid 0px #ccc;">
<?php
echo getAvatar( $useAvatarFrom, $userinfo, 40 );
?>
</div>
</div>
<?php
$margin = 42;
} else $margin = 10;
?>
<div style="margin-left:<?php echo $margin; ?>px;margin-top:0px;">
<?php
//if ( $params->get('linktoprofile', '') && $user->id ) {
//if ( $params->get('linktoprofile', '') ) {
if ( $params->get( 'linktoprofile', '') && $user->id || $params->get( 'linktoprofile', '') && !$user->id && $com_params->get( 'allowGuestUserViewProfil', 1) ){
echo '<a href="'.$profil.'">'. $usrname . '</a>';
} else echo $usrname;
?>
<div class="small">
<?php echo $item->points . ' ' . JText::_('MODAUP_POINTS'); ?>
</div>
</div>
</li>
<?php
$i++;
}
?>
</ul><div style="clear: both;"> </div></div>
<?php
}
?>
[i:e5lbzznr]Bruno || Riggs
Bacharel em Sistemas de Informação[/i:e5lbzznr]
Please Entrar ou Registrar to join the conversation.