SimplePortal

Support => English Support => Topic started by: sevrva22 on April 29, 2011, 10:12:56 PM

Title: IE doesnt detect links on a block
Post by: sevrva22 on April 29, 2011, 10:12:56 PM
I modified the Aeva Gallery block, it works perfect in Firefox but IE doesnt detect the links

PD: is the Media block

Firefox:

(http://musicommunity.org/MGalleryItem.php?id=40)

IE:
(http://musicommunity.org/MGalleryItem.php?id=41)

Block Code:


Code: [Select]
foreach ($items as $item)
{
  echo !$direction ? '
<tr>' : '', '
<td>
<div class="sp_recent_subject">';

if ($mod == 'aeva_media')
{
echo '
<img src="http://musicommunity.org/Themes/default/images/sp/mediaspicon.png" border=0 ">&nbsp&nbsp<a href="', $galurl, 'sa=item;id=', $item['id'], '">', $item['title'], '</a>', $item['is_new'] ?'<img alt="" src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" border="0" />' : '';
}
elseif ($mod == 'smf_media_gallery')
{
echo '

How can í fix it?
Title: Re: IE doesnt detect links on a block
Post by: grafitus on April 30, 2011, 03:35:05 AM
First, design looks good. Congrats! ;P

You can use this:
Code: [Select]
foreach ($items as $item)
{
  echo !$direction ? '
<tr>' : '', '
<td>
<div class="sp_recent_subject">';

if ($mod == 'aeva_media')
{
echo '
', sp_embed_image('mediaspicon'), '  <a href="', $galurl, 'sa=item;id=', $item['id'], '">', $item['title'], '</a>', $item['is_new'] ?'<img alt="" src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" border="0" />' : '';
}
elseif ($mod == 'smf_media_gallery')
{
echo '
Title: Re: IE doesnt detect links on a block
Post by: sevrva22 on April 30, 2011, 10:27:06 AM
Exelent, the only thing is that the code

Code: [Select]
<img src="', sp_embed_image('mediaspicon'), '">
is that appears this thing on the template:

example: mediaspicon"> 01 The Red Room.

I can fix it writting the url of the image that is http://musicommunity.org/Themes/default/images/sp/mediaspicon.png but i would like to know how to write it in php mode .

Thanks for the help  :D
Title: Re: IE doesnt detect links on a block
Post by: AngelinaBelle on May 03, 2011, 12:44:43 PM
I found function sp_embed_image in Subs-Portal.php, and saw that it already handles the entire img tag, so I think you can change the code Sinan suggested a little bit:
Code: (find) [Select]
<img src="', sp_embed_image('mediaspicon'), '">
Code: (replace) [Select]
',sp_embed_image('mediaspicon'),'If I haven't made any terrible mistakes, that should work. But you may need to do a little more debugging.
SimplePortal 2.3.8 © 2008-2024, SimplePortal