1
thatscountry
Small i-frame in a block

I'm a newbie to XOOPS and I love the program. I'm trying to update an existing website using xoops. I've run into a little snag. I have a radio station and wanted to show the album cover that was playing in an i-frame in a block. It works but the only trouble with it is that it drops any block after that block on the page.

I tried putting it in the last spot in the right column but now the footer isn't showing. The URL is http://www.thatscountry.com/xps

I'd be very grateful for any suggestions

Marti

2
davidthomas1
Re: Small i-frame in a block

are you sure you're closing the i-frame tag properly?

I was using i-frames successfully recently. It can be done.

D.

Follow-up :

Actually, I just checked your site and the code.

I suspect your problem has something to do with the file you are including in the i-frame.

Is it possible to strip it of the HTML and HEAD section tags? (i.e just include the BODY (no <BODY> tags though)

does that make sense?
みんなちがってみんないい。

XOOPS 2.0.13.2

3
thatscountry
Re: Small i-frame in a block

This is the code in the block. I blanked out the page it's pointing to....

<iframe border="0" name="I1" marginWidth="0" marginHeight="0" src="http://xxxxxxxxxx.php" frameBorder="0" width="145
" scrolling="no" height="160">

Just checked the actual page and, unless there's another way to add a refresh page script other than in the head, I can't strip the rest of the code. The page has to be able to refresh in order to change the album covers as the songs change on the radio

4
davidthomas1
Re: Small i-frame in a block

I mean to edit the php file that is referenced in the i-frame, not the i-frame code.

Can you edit that PHP file to remove the extraneous HTML headers etc...? just keep the table information.
みんなちがってみんないい。

XOOPS 2.0.13.2

5
thatscountry
Re: Small i-frame in a block

I just stripped everything from the page except the refresh script and the table and the configuration and it still works but doesn't change any problems with the page.

6
thatscountry
Re: Small i-frame in a block

This is the script for the php page as I have it now.

Quote:
<script>
<!--

/*
Auto Refresh Page with Time script
By JavaScript Kit (javascriptkit.com)
Over 200+ free scripts here!
*/

//enter refresh time in "minutes:seconds" Minutes should range from 0 to inifinity. Seconds should range from 0 to 59
var limit="0:30"

if (document.images){
var parselimit=limit.split(":")
parselimit=parselimit[0]*60+parselimit[1]*1
}
function beginrefresh(){
if (!document.images)
return
if (parselimit==1)
window.location.reload()
else{
parselimit-=1
curmin=Math.floor(parselimit/60)
cursec=parselimit%60
if (curmin!=0)
curtime=curmin+" minutes and "+cursec+" seconds left until page refresh!"
else
curtime=cursec+" seconds left until page refresh!"
window.status=curtime
setTimeout("beginrefresh()",1000)
}
}

window.onload=beginrefresh
//-->
</script>



<table width="147" height="160" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="159" height="127" valign="middle">
<?
require("config.php");
$db->open("SELECT songlist.*, historylist.requestID
as requestID FROM historylist,songlist
WHERE (historylist.songID = songlist.ID) AND (songlist.songtype='S')
ORDER BY historylist.date_played DESC LIMIT 1");
$history = $db->rows();
reset($history);
list($key, $song) = each($history);
$picture = $song["picture"];
?>
<font color="#FFCC00" size="2" face="Arial, Helvetica, sans-serif"><strong><font color="#990000">NOW
PLAYING:</font></strong></font><font color="#990000" size="2" face="Arial, Helvetica, sans-serif">&nbsp;</font>
<div align="center"><img src="pictures/<? echo $picture; ?>" border="1" width="100">
</div></td>
</tr>
<tr>
<td height="29" valign="middle"><div align="center"><font color="#000000" size="2" face="Arial, Helvetica, sans-serif"><font color="#FFCC00"><a href="http://www.cancountry.com/playlist.php?limit=50" target="_blank"><strong>CLICK
HERE</strong></a><strong> <br>
</strong><font color="#333333">to make a request</font></font></font>
</div></td>
</tr>
</table>

7
davidthomas1
Re: Small i-frame in a block

Do you have the block type set to HTML?

perhaps the PHP Script option would be best (for block type)

either HTML or PHP script. You could try both and see if it helps.

Sorry, I can't see any other glaring reason why you're having the problem.

_possibly_ it has to do with the auto-refresh script. You could try it without the auto-refresh see if that works.

I think it should be a PHP script block type.

D.
みんなちがってみんないい。

XOOPS 2.0.13.2

8
thatscountry
Re: Small i-frame in a block

Thanks so much for your help but this is getting futile. I have the block set to HTML (when I tried php, nothing showed up except the block title).

I just tried something else and it's the same thing. I tried putting the original page into another php page with <?PHP include("the_file.php");?> as the only code. I then pointed it to that page in the i-frame. There is no difference.

Also tried taking the refresh script out and that didn't make a difference either. Since others are using i-frames, there's got to be a way to fix this!

9
thatscountry
Re: Small i-frame in a block

You're not going to believe this one. I didn't have the i-frame closed! I can't believe I didn't see that! It works great now.

Thankd for all of your help!