Unregistered
Unregistered
Guest   Less than 1 minute ago
#1

Hi,

I have a zen photo install on one site. Now I would like to keep it there but display it on another site.

The site where I want to display it on is a posterous.com blog so that is why I cant just install zenphoto over there. This i not possible as its a hosted service.

I wonder though if there is a way to embed a zen photo gallery somehow into a post while the zen photo gallery lies on another site.

Administrator
Administrator
acrylian   22-04-2010, 08:04
#2

You probably could use an ugly iFrame to do so. But maybe getting proper webspace is the better option...

Member
Member
saundstu   22-04-2010, 09:41
#3

Instead of an iframe:

put this in the head section of the page you want to display content on:

var rootdomain="http://"+window.location.hostname

function ajaxinclude(url) {
var page_request = false
if (window.XMLHttpRequest) // if Mozilla, Safari etc
page_request = new XMLHttpRequest()
else if (window.ActiveXObject){ // if IE
try {
page_request = new ActiveXObject("Msxml2.XMLHTTP")
}
catch (e){
try{
page_request = new ActiveXObject("Microsoft.XMLHTTP")
}
catch (e){}
}
}
else
return false
page_request.open('GET', url, false) //get page synchronously
page_request.send(null)
writecontent(page_request)
}

function writecontent(page_request){
if (window.location.href.indexOf("http")==-1 || page_request.status==200)
document.write(page_request.responseText)
}

then in the body section of the same page

ajaxinclude("mypage.htm")

Its a damn sight nicer than an iframe and you get the bonus of being able to style the incoming content...

Hope that helps.

Stu

Administrator
Administrator
acrylian   22-04-2010, 09:53
#4

Most everything is nicer than an iFrame..;-)

Member
Member
saundstu   22-04-2010, 13:38
#5

Oops. Forget what I said... It will only work if the content is all on the same domain...

Still an elegant alternative to the dreaded iframe...

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.