TinyPortal

Development => Support => Topic started by: dapoppet on January 05, 2007, 12:51:28 PM

Title: Sitemap and Links
Post by: dapoppet on January 05, 2007, 12:51:28 PM
I have a question on how I get pages that are linked in the site map to open  in the main frame of TP.  I have everything installed in my root folder.  I have been going into admin--->block manager--->site map edit--->ad menu item---> and select the option of link.  Now for the address i have done it a couple different ways. /roster.php and http:://www.mysite.com/roster.php.  Each way it is opening up into a new screen.  I have looked over the forums for the last two days and can't seem to find an answer to my question.  I know it can be done because I have seen other sites with it working.  Any help would be apprciated.

Thanks
Title: Re: Sitemap and Links
Post by: Lesmond on January 05, 2007, 01:24:09 PM
If you go to Menu manager> Edit menu item, there are two options

Same window
Open in a new window
Title: Re: Sitemap and Links
Post by: dapoppet on January 05, 2007, 04:36:31 PM
I have the Same window marked and it is still opening in a new window.
Title: Re: Sitemap and Links
Post by: Lesmond on January 05, 2007, 04:41:54 PM
can you give me a link
Title: Re: Sitemap and Links
Post by: dapoppet on January 05, 2007, 09:53:13 PM
Sure.  www.killingspreeguild.com  thanks
Title: Re: Sitemap and Links
Post by: Lesmond on January 05, 2007, 10:04:23 PM
I can see 3 links

* Guild Roster
* Downloads
* Guild Application

all 3 open in the same window
Title: Re: Sitemap and Links
Post by: dapoppet on January 05, 2007, 10:46:20 PM
Really?  That is strange.  Wonder why it is not for me.   :-\

Title: Re: Sitemap and Links
Post by: IchBin on January 05, 2007, 10:48:36 PM
Make sure you don't have a shift or ctrl key stuck on your keyboard. :)
Title: Re: Sitemap and Links
Post by: dapoppet on January 05, 2007, 10:54:27 PM
Perhaps I am not being clear. (sorry if that is the case)  I want the roster to open up like the article i created for downloads and the application, in the center block within TP.
Title: Re: Sitemap and Links
Post by: Lesmond on January 05, 2007, 11:02:22 PM
Not being a expert with php, but could you put the code for your roster page within a php article, maybe some here has a better way to do this
Title: Re: Sitemap and Links
Post by: dapoppet on January 05, 2007, 11:07:56 PM
That's a good idea.  Let me try that.  Though I have a feeling that it might not work since it calls on it's own database as well. Doesn't hurt to try.  :)
Title: Re: Sitemap and Links
Post by: Lesmond on January 05, 2007, 11:11:39 PM
just thought use a iframe in your article, that would be a lot easier
Title: Re: Sitemap and Links
Post by: dapoppet on January 05, 2007, 11:15:35 PM
I tried creating a php article with the roster code and that didn't work.  I'll try the iframe.

I really appreciate you helping me.
Title: Re: Sitemap and Links
Post by: Lesmond on January 05, 2007, 11:23:29 PM
Ok try this, I have put in your roster page url so just copy and paste this into a article (not php)

<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[i])
//reveal iframe for lower end browsers? (see var above):
if ((document.all || document.getElementById) && iframehide=="no"){
var tempobj=document.all? document.all[iframeids[i]] : document.getElementById(iframeids[i])
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 id="myframe" src="http://www.killingspreeguild.com/roster.php" marginwidth="0" marginheight="0" vspace="0" hspace="0" style="width: 100%; display: none;" frameborder="0" scrolling="no"></iframe>
Title: Re: Sitemap and Links
Post by: dapoppet on January 05, 2007, 11:41:46 PM
That worked!!!!!  Thanks so much!  It looks beautimus!!
Title: Re: Sitemap and Links
Post by: Lesmond on January 05, 2007, 11:52:41 PM
your welcome :) I just had a look, looks good!