Hallo,
ich habe vor, das MamboME Avatar Scroller Modul so anzupassen, dass es auch (animierte) Gif-Dateien wiedergibt.
Wer weitere Verbesserungsvorschläge hat, bitte hier posten : )
Diese Version funktioniert bei mir.
PHP-Code:<?php
/**
* MamboMe Avatar Scroller
* Copyright (C) 2005 Jeffrey Randall MamboMe.com
* All rights reserved
* Released under GNU/GPL License http://www.gnu.org/copyleft/gpl.html
* Version 1.2 File date: 04-04-2005
**/
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
$moduleclass_sfx = $params->get( 'moduleclass_sfx' );
$behavior = "scroll";
$direction = $params->get('direction', 'down');
$loop = 'infinite';
$align = $params->get('align', 'center');
$height = $params->get('height', '120');
$width = $params->get('width', '100%');
$scroll_amount = '1';
$scroll_delay = $params->get('scrolldelay');
//$type = $params->get('type');
$type = '1';
$limit = $params->get('limit', '5');
$image_link = "<img src =\"$mosConfig_live_site/images/comprofiler/tn";
$link_gallery = "<img src =\"$mosConfig_live_site/images/comprofiler/";
echo "<marquee behavior=\"$behavior\" direction=\"$direction\" align=\"$align\" height=\"$height\" width=\"$width\" scrollamount=\"$scroll_amount\" loop=\"$loop\" scrolldelay=\"$scroll_delay\" onmouseover=this.stop() onmouseout=this.start() >\n";
echo "<!-- MamboMe Avatar Scroller Module Copyright (C) 2005 Jeffrey Randall http://MamboMe.com -->\n";
if($type == 1) //All Profiles
{
if($limit == 'no_limit')
{
$query = "SELECT user_id,avatar FROM #__comprofiler WHERE avatarapproved=1 AND banned='0' AND avatar IS NOT NULL";
}
else
{
$query = "SELECT user_id,avatar FROM #__comprofiler WHERE avatarapproved=1 AND banned='0' AND avatar IS NOT NULL LIMIT $limit";
}
}
$database ->setQuery ($query);
$results = $database->loadObjectList();
foreach($results as $result)
{
$query_name = "SELECT id,username FROM #__users WHERE id = ".$result->user_id;
$database ->setQuery ($query_name);
$usernames = $database->loadObjectList();
foreach($usernames as $username)
{
if(preg_match('/(gallery)/',$result->avatar))
{
$profile_link = "<a href=\"index.php?option=com_comprofiler&task=userProfile&user=".$result->user_id."\">\n";
$avatar = $profile_link.$link_gallery.$result->avatar."\"border=\"0\" alt=\"member image\"/><br />$username->username</a>\n";
}
elseif(preg_match('/(jpg)/',$result->avatar))
{
$profile_link = "<a href=\"index.php?option=com_comprofiler&task=userProfile&user=".$result->user_id."\">\n";
$avatar = $profile_link.$image_link.$result->avatar."\"border=\"0\" alt=\"member image\"/><br />$username->username</a>\n";
}
elseif(preg_match('/(png)/',$result->avatar))
{
$profile_link = "<a href=\"index.php?option=com_comprofiler&task=userProfile&user=".$result->user_id."\">\n";
$avatar = $profile_link.$image_link.$result->avatar."\"border=\"0\" alt=\"member image\"/><br />$username->username</a>\n";
}
elseif(preg_match('/(gif)/',$result->avatar))
{
$profile_link = "<a href=\"index.php?option=com_comprofiler&task=userProfile&user=".$result->user_id."\">\n";
$avatar = $profile_link.$image_link.$result->avatar."\"border=\"0\" alt=\"member image\"/><br />$username->username</a>\n";
}
}
echo $avatar."<br /><br />";
}
echo "</marquee>";
?>


LinkBack URL
About LinkBacks
Zitieren
Lesezeichen