Content in an iFrame

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
cguenther
Posts: 111
Joined: Sun 11. Jan 2004, 12:41
Location: Halle, Germany
Contact:

Content in an iFrame

Post by cguenther »

Hello,

i wanna setup an design-full website. an the content in the main-field should be loaded in an iFrame, coz the bg-image should be no repeated an set to fixed position.

Any proposals how to get the {CONTENT} loaded to / in an iFrame ?

Thx
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Post by frold »

I´m not sure if this work and this is just a thought...

what about using the print output in the iframe?

eg.

This is the normal site url:
http://www.phpwcms.de/index.php?id=2,0,0,1,0,0
The print url is:
http://www.phpwcms.de/index.php?id=2,4,1,1,1,0

you maybe have to edit print.css and some other stuff but I guess it would be the most easy way to do it?

Let me know if it works!!

Or you can use the div function as I have used here:
Sorry the site is down right now :(

this is just a test, and it will not let the print function work, but thats another way to fix it.. :wink:

Just some ideas from frold
http://www.studmed.dk Portal for doctors and medical students in Denmark
Pappnase

Post by Pappnase »

hello!

why did you need to show the content in an iframe!?
am i wrong!? or did you don't need the iframe vie only for complex external scripts!?

pappnase
User avatar
Oliver Georgi
Site Admin
Posts: 9892
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

But there might be a problem with iframes - often internal links are using target="_top". So to use it you should create a custom pagelayout/template that handles this for you - or maybe what you need in iframe.

Then you have to patch the index.php a bit -> at line 74 try this:

Code: Select all

echo str_replace('target="_top"', 'target="_self"', $content["all"]);
You can also use iframe's name rather than "_self";

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
cguenther
Posts: 111
Joined: Sun 11. Jan 2004, 12:41
Location: Halle, Germany
Contact:

Post by cguenther »

I'm really sorry guys, but i think, that my english is too bad to explain the problem in a foreign language, that why i'm going to use german for further entries.

Ok, iss vielleicht ein bissl tricky zu erklären, deshalb habe ich hier mal zwei Links vorbereitet.

[1] http://nameserver2.gotdns.org/~loki/php ... ,0,0,1,0,0

[2] http://nameserver2.gotdns.org/~loki/php ... ,0,0,1,0,0

wie man im zweiten Beispiel sieht, ist der Content länger als die festgelegte Höhe von 550 px für die gesamte Page bzw. 490px für die Content-Höhe.

Deshalb möchte ich nur den Content unter Vorlagen -> Haupt als iFrame einbinden.

Wie kann ich den Content also an das Externe iFrame übergeben ?
User avatar
Oliver Georgi
Site Admin
Posts: 9892
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

Versuch mal sowas hier im Template. Den Content fügst Du einfach in den Layer ein:

Code: Select all

<div id="myscrolllayer" style="position:absolute; left:16px; top:21px; width:430px; height:387px; z-index:1; overflow: auto;">{CONTENT}</div>
Dann erhältst Du bei Überlauf einen normalen Scrollbalken. Musst ein bißchen damit rumspielen, was die Position betrifft. Das sollte gehen.

Kannst Dich diesbezüglich auch mal nach den Sachen wie JavaScript Scroll Layer umsehen. Gibt recht gute Beispiele, um sowas mit eigenen Scrollbalken zu versehen. Wie hier z.B.
http://javascript.internet.com/scrolls/ ... oller.html

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
hidiho
Posts: 38
Joined: Wed 3. Dec 2003, 23:44

Post by hidiho »

Found this on a website
first I would (and have done this before) build two tables, one for the headers and one for the content. since you want to scroll the content I would suggest a div with the height attribute set to the desired size, also set the scrolling attribute to either auto or scroll.
If you need horozantal scrolling capabilities (scroll the data left or right and the headers move with it) let me know, I have some javascript that does the trick.
As for the resorting there are lots of variables involved before answering this one... are you using any serverside code, if so what language? is the table content static or dynamic?
I wuerde einfach im Main teil das ausprobieren, also erst zwei tabellen erstellen, in der zweite dann DIV tag benutzen, und dazwischen {CONTENT}

alles gute

hidiho
User avatar
pSouper
Posts: 1552
Joined: Tue 11. Nov 2003, 15:45
Location: London
Contact:

Post by pSouper »

as of 2:54pm 14/01/04 your scrolling back ground look fantastic ;)
I've not seen that effect before and I love it.
your sites colour choices a re beatifull too
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Post by frold »

pSouper wrote:as of 2:54pm 14/01/04 your scrolling back ground look fantastic ;)
I've not seen that effect before and I love it.
your sites colour choices a re beatifull too
Sry, but do you live in your own world.. Hallo, this is the earth..you know in the milky way.... :roll:

To be serius, what is it you are comment? pSouper?
http://www.studmed.dk Portal for doctors and medical students in Denmark
User avatar
pSouper
Posts: 1552
Joined: Tue 11. Nov 2003, 15:45
Location: London
Contact:

Post by pSouper »

hehe, I guess I don't get around much.
It's true, I never seen that before.

I make the artwork to computer games not websites s ohave never really spent to long looing at web pages before. I started thinking about doing my own website only since I went freelance last summer. I su[pose I should use some more of this bandwidth I'm paying for ;)
Bijan Hemati
Posts: 191
Joined: Sun 9. Nov 2003, 00:18
Location: Austin, TX

Re: Content in an iFrame

Post by Bijan Hemati »

cguenther wrote:Hello,

i wanna setup an design-full website. an the content in the main-field should be loaded in an iFrame, coz the bg-image should be no repeated an set to fixed position.

Any proposals how to get the {CONTENT} loaded to / in an iFrame ?

Thx
I'm looking for similar effect also. I don't think FRAMES are supported in phpwcms.

What I am looking for is to be able to show an external webpage for example http://www.cnn.com inside a frame in my webpage.
User avatar
Oliver Georgi
Site Admin
Posts: 9892
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

Bijan, never open external content inside your content. It is recommend to open new window - that's fair.

But to use external pages - use iframes.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Bijan Hemati
Posts: 191
Joined: Sun 9. Nov 2003, 00:18
Location: Austin, TX

Post by Bijan Hemati »

I do understand what you mean Oliver.

There are instances where someone has the permission of a particular site owner to include a particular content of that site into theirs.
For example, one could have a subscription (membership) to a service, with their own account number and password.

When I used CNN as an example, was to make clear what I meant by "external webpage". :wink:

I know this occurs a lot in real estate industry
http://www.360house.com/ this site provides a tool to real estate agents who are a member.

This agent is using that tool in her site. http://frittshomes.com/ Click on Our Listings from the menu.

Regards,
Bijan
User avatar
Oliver Georgi
Site Admin
Posts: 9892
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

OK,

I've seen you've understand what I mean. If this is a websites feature it's OK - but to use external content to make it your own content then not...

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Post Reply