Fork me on GitHub

#1 2015-07-31 12:13:27

Wolfy
Member
Registered: 2015-05-12
Posts: 313

can I still open a file in extern using iframe?

Let's say I put a small website in directory called extern/apps/eyeBall/ loaded with file ball.php.

I want that site to load into iframe, so I put:

$homepage = 'index.php?extern=apps/eyeBall/ball.php';

Well, naturally, that fails. I assume I just didn't get the format right. What's the
format again, including the "Type=" tag that I know is missing?  Thanks


Wolfy
https://www.facebook.com/groups/oneye/
Currently accepting new users...  http://www.OS1.hawkwolf.net
onEye admins: OS1 is a beta testing hotbed. Non-core apps available upon request.

Offline

#2 2015-07-31 14:43:22

lars-sh
Administrator
From: near Hamburg, Germany
Registered: 2011-07-14
Posts: 731
Website

Re: can I still open a file in extern using iframe?

I guess you're looking for "index.php?extern=apps/eyeBall/ball.php&type=dynamic&params[]=".

In order to get it working you'll additionally need to put the following function into that file, while it should return the requested content.

function get_dynamic_content($params = null) {
	return 'Hello Ball';
}

Best regards,
Lars Knickrehm

The oneye project.

Offline

#3 2015-07-31 16:46:42

Wolfy
Member
Registered: 2015-05-12
Posts: 313

Re: can I still open a file in extern using iframe?

ah, thanks, I was fairly close.  I'm not sure I follow the last bit, but I'll doing some searching of the existing code to see if I find an example of it being used.


Wolfy
https://www.facebook.com/groups/oneye/
Currently accepting new users...  http://www.OS1.hawkwolf.net
onEye admins: OS1 is a beta testing hotbed. Non-core apps available upon request.

Offline

#4 2015-08-01 01:32:19

Wolfy
Member
Registered: 2015-05-12
Posts: 313

Re: can I still open a file in extern using iframe?

I ended up with the following:

        function get_dynamic_content($params = '') {
        header('Content-type: text/javascript; charset=utf-8');
        $homepage = 'index.php?extern=apps/eyeBall/ball.php
                &type=dynamic&params[]=';}

So far it's only given me a blank page when passed to eyeiframize..


Wolfy
https://www.facebook.com/groups/oneye/
Currently accepting new users...  http://www.OS1.hawkwolf.net
onEye admins: OS1 is a beta testing hotbed. Non-core apps available upon request.

Offline

#5 2015-08-01 01:45:53

Wolfy
Member
Registered: 2015-05-12
Posts: 313

Re: can I still open a file in extern using iframe?

also tried

        function get_dynamic_content($params = '') {
        $homepage = 'index.php?extern=apps/eyeBall/ball.php&type=dynamic&params[]=';
        return $homepage;}


Wolfy
https://www.facebook.com/groups/oneye/
Currently accepting new users...  http://www.OS1.hawkwolf.net
onEye admins: OS1 is a beta testing hotbed. Non-core apps available upon request.

Offline

#6 2015-08-01 11:19:03

lars-sh
Administrator
From: near Hamburg, Germany
Registered: 2011-07-14
Posts: 731
Website

Re: can I still open a file in extern using iframe?

You need to call "index.php?extern=apps/eyeBall/ball.php&type=dynamic&params[]=" via eyeIframize and a sample ball.php could look like this:

<?php
function get_dynamic_content($params = null) {
	header('Content-Type: text/plain');

	return 'Hello Ball';
}
?>

It should show "Hello Ball" inside that Iframe.


Best regards,
Lars Knickrehm

The oneye project.

Offline

#7 2015-08-01 22:02:04

Wolfy
Member
Registered: 2015-05-12
Posts: 313

Re: can I still open a file in extern using iframe?

I think I see what you are saying now.  The php being loaded is quite a bit more complicated, of course.  If I understand correctly, the ENTIRE php file becomes a function, and follows the return.  I'll give that a whirl in a little bit.


Wolfy
https://www.facebook.com/groups/oneye/
Currently accepting new users...  http://www.OS1.hawkwolf.net
onEye admins: OS1 is a beta testing hotbed. Non-core apps available upon request.

Offline

#8 2015-08-02 08:53:19

Wolfy
Member
Registered: 2015-05-12
Posts: 313

Re: can I still open a file in extern using iframe?

I still can't seem to get it.  I think I'll start with something smaller, I must look for a less complicated php app to try.


Wolfy
https://www.facebook.com/groups/oneye/
Currently accepting new users...  http://www.OS1.hawkwolf.net
onEye admins: OS1 is a beta testing hotbed. Non-core apps available upon request.

Offline

Board footer

Powered by FluxBB