UBB.Dev
Posted By: joshsaul Emailed links that can use frames? - 12/28/2003 11:37 PM
I have been trying to figure this out for a while. My UBB sits inside a frame on my site. When the email system sends a user a PM or reply notification, the link that is embedded in the email points directly to the message.

As a result, when you click on the link, you end up on the UBB formatted page, not the website with the message inside of the proper frame (what I'd like to do).

Does anyone have any idea how to make the link sent via email return the user to the properly formatted webpage?

Thanks!

-Josh
Posted By: Mark Schonfeld Re: Emailed links that can use frames? - 12/29/2003 12:27 AM
In your UBB head content insert:

Code
<script language="javascript" type="text/javascript"> 
<!--
if (top.location == self.location) {
top.location.href = "URL TO FRAMESET" + "?" + window.location.href;
}
//-->
</script>
In the frameset HEAD content insert:

Code
<script language="javascript" type="text/javascript"> 
<!--
pageURL = "YOURINDEX.HTML";
if (parent.document.URL) {
parentURL = parent.document.URL;
if (parentURL.indexOf('?') != -1) {
pageURL = parentURL.substring(parentURL.indexOf('?')+1,parentURL.length);
}
}
function fillFrame() {
parent.main.location.href = pageURL;
}
//-->
</SCRIPT>
in your frameset you need to insert:

Code
onLoad="fillFrame();"
that calls it. For example:

Code
<frameset rows="100,*,100" onLoad="fillFrame();" border="1" frameborder="1" framespacing="1" bordercolor="#000000">
Try that..
Posted By: joshsaul Re: Emailed links that can use frames? - 12/29/2003 3:36 AM
OK, I did the first part, no problem.

In the second part, the one that gets added to the frameset head, what filename should I put into it where you indicated?

Also, I'm not clear on how it is called...

This will also affect how the URLs are treated in email?

Sorry for the beginner's questions.

Thanks.
Posted By: Mark Schonfeld Re: Emailed links that can use frames? - 12/29/2003 4:04 AM
you put whatever is the main frame index for your site. You put that in both parts where I said to put the path to your frame index.

this affects whenever anyone views the page, no matter where they got the URL from.
© UBB.Developers