I Have My PHPR App In A Wrapper In My Joomla Site.
I Have Added A Java Redirect To My PHPR Site To Redirect To Joomla If Not In IFrame
<!-- Redirect If Not Show In Iframe -->
<!-- Begin Redirect -->
<script language="JavaScript">
<!--
function getgoing()
{
top.location="http://www.mysite.com/wrapper.html";
}
if (top.frames.length < 1)
{
alert("You will be redirected to our main page in 1 seconds!");
setTimeout('getgoing()',1000);
}
//-->
</SCRIPT>
<!-- End Redirect -->
This Works Fine.
I Have Added Facebook "Like" Wrapper To My PHPR View Page
<iframe src="http://www.facebook.com/widgets/like.php?href=http://example.com"
scrolling="no" frameborder="0"
style="border:none; width:450px; height:80px"></iframe>
FYI
Replace http://www.mysite.com/myrecord_view.php?editid1=223
Note At The End Of The URL The "223" Is The Key Replace It With {$key_value} This Will Make Your "Like" Refer To The Exact And Correct Record.
If You "Like" Record 223 On Facebook It Will Say Chris Likes PHPR Record 223
(If You Put {$key_value} In The HTML Title
<title>PHPR Reccord {$key_value}</title>
)
Note: In The Title You Can Put Any Variable It Dose Not Have To Be The Key To Work
Such As {$name_value} Or {$description_value}
My Problem Is When You Click On The Like In Facebook It Takes You To Record 223 As It Should However Its Not In A Wrapper Which In Turn Redirects You To The Joomla Wrapper Witch Displays Login/Menu Not The Record.
I Have Done All This Work To End Up On The Menu Page.
I Am Looking For Javascript To Redirect Iframe To Referring URL If Not Refered By My Site.
Maby something like
function getgoing()
{
iframe.location=refering url;
}
if (top.frames.length > 1)
Pardon My Java I Do Not Know JavaScript Just Guessing
Is This Possible Can Anyone Help?