I use Joomla, and from databese one component add pictures of games, but unfortunaly images do not show alt tag corect. :S
Hier is code.
- Code: Select all
$db =& JFactory::getDBO();
for($i=0;$i<count($this->games);$i++) {
$game=$this->games[$i];
$slug=$game->slug;
$game->imgname=$this->params->get('dir_swf').$slug.'/'.$game->imgname;
$game->description=$db->getEscaped($game->description);
$game->description=str_replace("\\\"","\'",$game->description);
$game->namett=$db->getEscaped($game->name);
?>
<div class="game" style="text-align:center;">
<a style="border:0;" href="<?php echo JRoute::_('index.php?option=com_yoflash&view=game&id='.$slug.'&Itemid='.$this->Itemid); ?>" onmouseover="Tip('<strong><?php echo $game->namett; ?></strong><br/> <?php echo $game->description; ?>',WIDTH,300,FADEIN,0,DELAY,0,BGCOLOR, '<?php echo $this->params->get('ttip_bgcolor'); ?>', BORDERCOLOR,'<?php echo $this->params->get('ttip_bordercolor'); ?>',FONTCOLOR,'<?php echo $this->params->get('ttip_fontcolor'); ?>',FONTSIZE,'<?php echo $this->params->get('ttip_fontsize'); ?>',FONTFACE,'<?php echo $this->params->get('ttip_fontface'); ?>')" onmouseout="UnTip()">
<img src="<?php echo $game->imgname; ?>" width="100" height="100" alt="<?php echo $game->name; ?>"/><br/>
<?php echo $game->name; ?>
</a>
</div>
<?php
}
And this:
- Code: Select all
<img src="<?php echo $game->imgname; ?>" width="100" height="100" alt="<?php echo $game->name; ?>"/><br/>

