TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,004
  • Total Topics: 21,330
  • Online today: 500
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 97
  • Total: 97

Couple of article questions

Started by MargateSteve, June 24, 2008, 01:00:22 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MargateSteve

I have created an article simply to use Coppermine from within my TP wrapper (http://margate.wsnw.net/forum/index.php?page=3). As this is the only article that I will need I have no need for the link and it means the gallery drops further down the page (and even if I wanted to use it it just gives an error when it is clicked - possibly due to being in an IFRame?). Is there a way to get rid of this/
Also, at the very bottom of the frame it cuts of some of the bottom of the page that is being called. Is there anyway to stop this happening? The code for the article is
<script type="text/javascript">

/***********************************************
* IFrame SSI script II- Ã,© Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
* Visit DynamicDrive.com for hundreds of original DHTML scripts
* This notice must stay intact for legal use
***********************************************/

//Input the IDs of the IFRAMES you wish to dynamically resize to match its content height:
//Separate each ID with a comma. Examples: ["myframe1", "myframe2"] or ["myframe"] or [] for none:
var iframeids=["myframe"]

//Should script hide iframe from browsers that don't support this script (non IE5+/NS6+ browsers. Recommended):
var iframehide="yes"

var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
var FFextraHeight=parseFloat(getFFVersion)>=0.1? 16 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsers

function resizeCaller() {
var dyniframe=new Array()
for (i=0; i<iframeids.length; i++){
if (document.getElementById)
resizeIframe(iframeids)
//reveal iframe for lower end browsers? (see var above):
if ((document.all || document.getElementById) && iframehide=="no"){
var tempobj=document.all? document.all[iframeids] : document.getElementById(iframeids)
tempobj.style.display="block"
}
}
}

function resizeIframe(frameid){
var currentfr=document.getElementById(frameid)
if (currentfr && !window.opera){
currentfr.style.display="block"
if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) //ns6 syntax
currentfr.height = currentfr.contentDocument.body.offsetHeight+FFextraHeight;
else if (currentfr.Document && currentfr.Document.body.scrollHeight) //ie5+ syntax
currentfr.height = currentfr.Document.body.scrollHeight;
if (currentfr.addEventListener)
currentfr.addEventListener("load", readjustIframe, false)
else if (currentfr.attachEvent){
currentfr.detachEvent("onload", readjustIframe) // Bug fix line
currentfr.attachEvent("onload", readjustIframe)
}
}
}

function readjustIframe(loadevt) {
var crossevt=(window.event)? event : loadevt
var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement
if (iframeroot)
resizeIframe(iframeroot.id);
}

function loadintoIframe(iframeid, url){
if (document.getElementById)
document.getElementById(iframeid).src=url
}

if (window.addEventListener)
window.addEventListener("load", resizeCaller, false)
else if (window.attachEvent)
window.attachEvent("onload", resizeCaller)
else
window.onload=resizeCaller

</script>  <iframe frameborder="0" scrolling="no" style="width: 100%; display: none;" hspace="50" vspace="0" marginheight="0" marginwidth="0" src="http://margate.wsnw.net/forum/cpg/index.php" id="myframe">&lt;br&gt;&lt;br&gt;</iframe>


Thanks in advance for any suggestions
Steve

Ken.

#1
MargateSteve, please use tags when posting you code, its the "#" sign in the controls above your message window.

Here's a post that you may find useful, in fact if you read the entire topic you should pick up a lot of info on iframes.
http://www.tinyportal.net/index.php?topic=8653.msg78932#msg78932
... the code posted there may work better for you.

On the cut off at the bottom, even when using an 'auto-resizing' iframe you sometimes have to set the scrolling function to "yes" before it will work correctly.

"As this is the only article that I will need I have no need for the  link"
Not sure what you are saying there?
EDIT: Do you have "Show all articles in same category " enabled in your Article Options?
" If everything seems under control, you're not going fast enough." - Mario Andretti
Yesterday When I was Young.

Bluto

#2
I think he wants the top of the article to line up with the side blocks. The icon produces some extra space at the top.
Edit: Even if I hide images, there is still space at the top of the article.

MargateSteve

Quote from: Ken. on June 24, 2008, 02:22:48 AM
MargateSteve, please use tags when posting you code, its the "#" sign in the controls above your message window.
Sorry Ken. It was late last night when I posted it and did look for a 'code' button but as I could not find one opted for 'quote'.
I will have a look at that link as I like IFrames and would probably have a lot of use for them.
Bluto is spot on with what he says I am looking for. Simply the 'row' that the image is in means the actual article starts too far down the page. I want to be able to remove this area completely.
Steve

This website is proudly hosted on Crocweb Cloud Website Hosting.