1
Bassman
IFrames module
  • 2004/1/9 2:41

  • Bassman

  • Friend of XOOPS

  • Posts: 1272

  • Since: 2003/5/23


I read somewhere there was an I-Frames module? Does anyone know where I might download this?

2
Bassman
Re: IFrames module
  • 2004/1/9 9:11

  • Bassman

  • Friend of XOOPS

  • Posts: 1272

  • Since: 2003/5/23


anyone?

3
carnuke
Re: IFrames module
  • 2004/1/9 10:12

  • carnuke

  • Home away from home

  • Posts: 1955

  • Since: 2003/11/5


What would an iframe module do?? I am not aware of a module so far. Iframes/frames are considered with some suspicion by many people. Maybe you could post a little more about what you want to achieve

Have you tried simply inserting iframe tags into a custom block and treating it as html??

Richard

4
svaha
Re: IFrames module
  • 2004/1/9 10:46

  • svaha

  • Just can't stay away

  • Posts: 896

  • Since: 2003/8/2 2


Maybe you've read this here but I could not find this module, so it probably does not exist.

Iframes can be made like this :

Quote:
<body bgcolor="#FFFFFF" text="#000000">
<iframe src="http://www.mysite.com" width="90%" height="400" name="Iframe Mysite">Iframe Mysite</iframe>
</body>


Make a html file with the above text and (in my case ) wrap it with CJay.

Aloha

5
philou
Re: IFrames module
  • 2004/1/9 12:09

  • philou

  • Quite a regular

  • Posts: 384

  • Since: 2002/5/6 8


You can use a little module I have made... called contenu.
you can fin d this
here

reda the remame.txt first of all


6
Bassman
Re: IFrames module
  • 2004/1/9 12:22

  • Bassman

  • Friend of XOOPS

  • Posts: 1272

  • Since: 2003/5/23


Thanks guys, i'll let you know how i go.

7
Bassman
Re: IFrames module
  • 2004/1/11 23:32

  • Bassman

  • Friend of XOOPS

  • Posts: 1272

  • Since: 2003/5/23


OK i'm not having much success, I guess I should fill in some details -

I'm doing a XOOPS site related to the Utopia online game. Another Utopia-related site, www.utopiatemple.com, offers an online "formatter" for information taken from the Utopia game, which it formats into a readable/usable form. Now, Utopiatemple also offer the code for this formatter to put on your own site. The first part, which is the input section, works great - i've put it into a custom block, no problems -

Quote:

<form method="post" action="http://www.utopiatemple.com/allinone.php">
<input type="hidden" name="src" value="siteid">
<input type="hidden" name="goto" value="http://yoursite/format.htm">
<textarea name="data"></textarea><br>
Networth: <input type="text" name="netw" size="8" maxlength="10"><br>
<input type="checkbox" name="genesis" value="1"> Genesis Server<br>
<input type="submit" value="Format!">
</form>


now, my problem comes when I try to put the output into a normal XOOPS page, if I wrap it in CJaycontent, I get a page with no XOOPS blocks, header etc, just the information. Same problem with Iframes, except it's in a neat window with a scrollbar. This is the code for the output:

Quote:
<script language="javascript">
<!--
var random = new Number (Math.floor (99999999 * Math.random ()) + 1);
document.write ('<scr'+'ipt language="javascript" src="http://www.utopiatemple.com/allinone.php?show=siteid&rand=' + random + '"></scr'+'ipt>');
// -->
</script>
<noscript>
<font color="red">Error: JavaScript is required in order to use this formatter!</font>
</noscript>


If I try to wrap it in PHP, I get a parse error on line 14 (in the javascript)

I'm not smart enough to know what to do, any ideas?

8
AAINC
Re: IFrames module
  • 2004/1/12 0:20

  • AAINC

  • Not too shy to talk

  • Posts: 121

  • Since: 2003/10/18


Quote:
<?
include("../../mainfile.php");
include("../../header.php");
//standard for module name recognition
$ModName = "My Horoscope";
?>
<table width="100%" align="center" >
<tr>
<td align="center"><big><strong>Daily Horoscopes</strong></big><br>
<br>
<a href="javascript:jumpto('http://www.scopes-mart.com/horoscopes.php?sign=Aries&use=absent')"><small>Aries</small></a> <a href="javascript:jumpto('http://www.scopes-mart.com/horoscopes.php?sign=Taurus&use=absent')"><small>Taurus</small></a> <a href="javascript:jumpto('http://www.scopes-mart.com/horoscopes.php?sign=Gemini&use=absent')"><small>Gemini</small></a> <a href="javascript:jumpto('http://www.scopes-mart.com/horoscopes.php?sign=Cancer&use=absent')"><small>Cancer</small></a> <a href="javascript:jumpto('http://www.scopes-mart.com/horoscopes.php?sign=Leo&use=absent')"><small>Leo</small></a> <a href="javascript:jumpto('http://www.scopes-mart.com/horoscopes.php?sign=Virgo&use=absent')"><small>Virgo</small></a> <a href="javascript:jumpto('http://www.scopes-mart.com/horoscopes.php?sign=Libra&use=absent')"><small>Libra</small></a> <a href="javascript:jumpto('http://www.scopes-mart.com/horoscopes.php?sign=Scorpio&use=absent')"><small>Scorpio</small></a> <a href="javascript:jumpto('http://www.scopes-mart.com/horoscopes.php?sign=Sagittarius&use=absent')"><small>Sagittarius</small></a> <a href="javascript:jumpto('http://www.scopes-mart.com/horoscopes.php?sign=Capricorn&use=absent')"><small>Capricorn</small></a> <a href="javascript:jumpto('http://www.scopes-mart.com/horoscopes.php?sign=Aquarius&use=absent')"><small>Aquarius</small></a> <a href="javascript:jumpto('http://www.scopes-mart.com/horoscopes.php?sign=Pisces&use=absent')"><small>Pisces</small></a><br></td>
</tr>
<tr>
<td>
<center>
<!--CHANGE LINKS BELOW TO YOUR OWN-->
<br>
<script language="javascript">
<!--
//Drop-down Document Viewer II- © Dynamic Drive(www.dynamicdrive.com)
//For full source code, 100's more DHTML scripts, and TOS,
//visithttp://www.dynamicdrive.com
//Specify display mode (0 or 1)
//0 causes document to be displayed in an inline frame, while 1 in a new browser window
var displaymode=0
//if displaymode=0, configure inline frame attributes (ie: dimensions, intial document shown
var iframecode='<iframe id="external" style="width:100%;height:710px" src="http://www.scopes-mart.com/horoscopes.php"></iframe>'

/////NO NEED TO EDIT BELOW HERE////////////

if (displaymode==0)
document.write(iframecode)
function jumpto(inputurl){
if (document.getElementById&&displaymode==0)
document.getElementById("external").src=inputurl
else if (document.all&&displaymode==0)
document.all.external.src=inputurl
else{
if (!window.win2||win2.closed)
win2=window.open(inputurl)
//else if win2 already exists
else{
win2.location=inputurl
win2.focus()
}
}
}
//-->
</script>
</center>
</td>
</tr>
</table>
<?
include(XOOPS_ROOT_PATH."/footer.php");
?>


view here:
http://archangelartifacts.com/modules/myhoroscope/

Olde version of MyHoroscope. Is example of a iFrame module. Multiple links at top opening in iFrame. Two Blocks one showing example of calling javascript in block. Other block with image links opening new window.

http://archangelartifacts.com/modules/mydownloads/singlefile.php?cid=5&lid=6

Adjust width, height and links.

AAINC

9
Bassman
Re: IFrames module
  • 2004/1/12 23:49

  • Bassman

  • Friend of XOOPS

  • Posts: 1272

  • Since: 2003/5/23


thanks AAINC

I tried your suggestion (nice module BTW!) - this is my index.php file:

Quote:

<?php
include('/data/members/free/tripod/uk/k/c/s/kcskingdom/htdocs/mainfile.php);
include(XOOPS_ROOT_PATH.'/header.php');
//standard for module name recognition
//$ModName = "My Horoscope";
?>
<table width="100%" align="center" >
<tr>
<td align="center"><big><strong>Utopia Angel</strong></big><br>
<br>
<form method="post" action="http://www.utopiatemple.com/allinone.php">
<input type="hidden" name="src" value="kcskingdom">
<input type="hidden" name="goto" value="http://members.lycos.co.uk/kcskingdom/modules/cjaycontent/content/format.htm">
<textarea name="data"></textarea><br>
Networth: <input type="text" name="netw" size="8" maxlength="10"><br>
<input type="checkbox" name="genesis" value="1"> Genesis Server<br>
<input type="submit" value="Format!">

<input type="hidden" name="color_header" value="#FFEECC">
<input type="hidden" name="color_field" value="silver">
<input type="hidden" name="color_value" value="lightcyan">
<input type="hidden" name="color_intrakd" value="orange">
<input type="hidden" name="color_defend" value="#FF7777">
<input type="hidden" name="color_attack" value="lightgreen">
<input type="hidden" name="color_relations" value="white">
<input type="hidden" name="color_dragon" value="lemonchiffon">
<input type="hidden" name="color_death" value="gray">
<input type="hidden" name="color_aid" value="powderblue">
<input type="hidden" name="color_sep" value="gray">
<input type="hidden" name="color_hide" value="black">
<input type="hidden" name="color_error" value="red">
</form>
<!--CHANGE LINKS BELOW TO YOUR OWN-->
<br>
<script language="javascript">
<!--
//Drop-down Document Viewer II- © Dynamic Drive(www.dynamicdrive.com)
//For full source code, 100's more DHTML scripts, and TOS,
//visithttp://www.dynamicdrive.com
//Specify display mode (0 or 1)
//0 causes document to be displayed in an inline frame, while 1 in a new browser window
var displaymode=0
//if displaymode=0, configure inline frame attributes (ie: dimensions, intial document shown
var iframecode='<iframe id="external" style="width:100%;height:710px" src="http://members.lycos.co.uk/kcskingdom/modules/cjaycontent/content/format.htm"></iframe>'

/////NO NEED TO EDIT BELOW HERE////////////

if (displaymode==0)
document.write(iframecode)
function jumpto(inputurl){
if (document.getElementById&&displaymode==0)
document.getElementById("external").src=inputurl
else if (document.all&&displaymode==0)
document.all.external.src=inputurl
else{
if (!window.win2||win2.closed)
win2=window.open(inputurl)
//else if win2 already exists
else{
win2.location=inputurl
win2.focus()
}
}
}
//-->
</script>
</center>
</td>
</tr>
</table>
<?
include(XOOPS_ROOT_PATH."/footer.php");
?>


but I get a parse error:
Quote:
Parse error: parse error in /data/members/free/tripod/uk/k/c/s/kcskingdom/htdocs/modules/myhoroscope/index.php on line 38


Line 38 is Quote:

//For full source code, 100's more DHTML scripts, and TOS,


what have I missed?



10
svaha
Re: IFrames module
  • 2004/1/13 1:25

  • svaha

  • Just can't stay away

  • Posts: 896

  • Since: 2003/8/2 2


Only guessing, maybe you copied the above script of AAINC and something went wrong in a long line, for instance this line :
Quote:
//0 causes document to be displayed in an inline frame, while 1 in a new browser window
var displaymode=0

If a hard return is copied then you get a parse error from : var displaymode = 0

Hope this helps

Login

Who's Online

181 user(s) are online (114 user(s) are browsing Support Forums)


Members: 0


Guests: 181


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits