Simple Portal

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:

(https://simpleportal.net/proxy.php?request=http%3A%2F%2Fmusicommunity.org%2FMGalleryItem.php%3Fid%3D40&hash=da331f9b4b69fc3cd0624ab60d111794a2637827)

IE:
(https://simpleportal.net/proxy.php?request=http%3A%2F%2Fmusicommunity.org%2FMGalleryItem.php%3Fid%3D41&hash=68a75882ec45a942c3387e591c00c71adcf2831f)

Block Code:


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
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:
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

<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.
EhPortal 1.39.8 © 2024, WebDev