Hello.
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.
And this:PHP Code:$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
}
do not work corect. :S Alt tag shown empty. :S I tray to change alt="<?php echo $game->name; ?>" in to alt="<?php echo $game->namett; ?>" but then in alt tag are shown name of pictures, which most of time look weird, :S and not name of games. :S I whant to put hier name of games.PHP Code:<img src="<?php echo $game->imgname; ?>" width="100" height="100" alt="<?php echo $game->name; ?>"/><br/>
In the last part of code, their is code to shown name of games, and this work ok. :S So i do not understand whay in last part work ok, and in images tag do not work. Are syntax are bad?


Reply With Quote
Bookmarks