Closed Thread Icon

Preserved Topic: Pulling Content With SSI Pages that link to <a href="https://ozoneasylum.com/backlink?for=20917" title="Pages that link to Preserved Topic: Pulling Content With SSI" rel="nofollow" >Preserved Topic: Pulling Content With SSI\

 
Author Thread
butcher
Paranoid (IV) Inmate

From: New Jersey, USA
Insane since: Oct 2000

posted posted 05-15-2001 22:57

I've swithched the site I'm working on over to .SHTML so as to benifit from the includes for headers and footers. Now I want to use them to pull in content. I have to break the content down to fit on a couple of different pages. Do I have to put a page lengths worth in each file and then use XSSI to call it one file at a time, or is there a function in SSI that can break down one say 2000 word file into 500 word increments, or would I have to go to PHP for that?

- Resolutions, Of All My Fruitless Searches -

jiblet
Paranoid (IV) Inmate

From: Minneapolis, MN, USA
Insane since: May 2000

posted posted 05-15-2001 23:24

I don't know what XSSI is capable of, but is there an easy way to determine what a page length is? If it's paragraphs of text (or some other indeterminate length token), you could run into trouble if it splits every x number of lines because it could be inside a tag. If you split it every so many <p>s then you could get very uneven pages if your content varies.

How is the content created? If it's output by a script of some sort then it makes sense to have the script split it up ahead of time. Adding PHP parsing to make the pages on the fly would work well, but it may be more processor-intensive than you want. I would think that this might be the only way to maintain a good dynamic navigation system without a lot of hand-coding.

-jiblet

linear
Paranoid (IV) Inmate

From: other places
Insane since: Mar 2001

posted posted 05-15-2001 23:25

Hmm, I'd say needs PHP. PHP offers you all the SSI benefits, BTW.

Think on this: I like to print articles (good ones anyway) and read them later. When someone page preaks them for me, I tend to fume beacause the amount of effort is multiplied (I have to click too much, lol).

Consider using DHTML/CSS to page the content. When yuu print, have a stylesheet that streams the whole body in *one page*. Use <DIV> tags to do your pageing, then hide/ahow the divs from JavaScript, kinda like this:

<DIV id="page1">
bla bla bla
</DIV>
<DIV id="page2">
bla bla bla
</DIV>
<DIV id="page3">
bla bla bla
</DIV>

Then write a teensy little JS function that shows the current "page" and hides the others using CSS properties. In the main style sheet, you absolutely position the divs on top of each other, but in the print stylesheet, you don't. It's magic.

That idea is so good, I might use it. Your PHP script could insert the div tags on the fly. Wow.

butcher
Paranoid (IV) Inmate

From: New Jersey, USA
Insane since: Oct 2000

posted posted 05-16-2001 13:21

That's a great idea Linear, and I'm fine with doing it all except the style sheet that streams the whole page when I print. Can you give me a pointer or a link on that one?

Thanks



- Resolutions, Of All My Fruitless Searches -

butcher
Paranoid (IV) Inmate

From: New Jersey, USA
Insane since: Oct 2000

posted posted 05-16-2001 13:59

Duh

Never mind, I just figured it out.

Thanks



- Resolutions, Of All My Fruitless Searches -

linear
Paranoid (IV) Inmate

From: other places
Insane since: Mar 2001

posted posted 05-16-2001 16:26

Post a link, man, I want to see it work.

butcher
Paranoid (IV) Inmate

From: New Jersey, USA
Insane since: Oct 2000

posted posted 05-16-2001 17:17

Still coding, I'll post a link when I get it done.

Had to do my yard work and get on the roof and clean the gutters and stuff first.

AHHH!!! The joys of home ownership



- Resolutions, Of All My Fruitless Searches -

butcher
Paranoid (IV) Inmate

From: New Jersey, USA
Insane since: Oct 2000

posted posted 05-16-2001 22:00

OK heres the link:
http://www.martysdesigns.com/greatdane/shtml/divtest.shtml

Sorry Linear, it's not quite the way you described it. I used your ideas for swapping the <Divs>, and a printer friendly version of the page, but I did it with seperate include files. I realized I didn't know how to split up the one big text file the way I would want to with PHP, and I'm getting tired of asking you guys everything, and not being able to answer anyones questions in return. So, I did it the way I could figure out by myself.

Thanks for your help and ideas.

Oh and BTW... Please don't try to view this page in Netscape




- Resolutions, Of All My Fruitless Searches -

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 05-16-2001 22:19

Butcher, your page doesn't look good in higher screen resolutions (layers are positioned underneath the menu)...

butcher
Paranoid (IV) Inmate

From: New Jersey, USA
Insane since: Oct 2000

posted posted 05-16-2001 22:32

Thanks Mr. Max

I'll change my res and try and fix it.



- Resolutions, Of All My Fruitless Searches -

butcher
Paranoid (IV) Inmate

From: New Jersey, USA
Insane since: Oct 2000

posted posted 05-16-2001 23:00

OK, I think that's got it.

It's my first real go around with positioning. Still working out the whole relative, absolute thing.

Thanks again Mr. Max

- Resolutions, Of All My Fruitless Searches -

linear
Paranoid (IV) Inmate

From: other places
Insane since: Mar 2001

posted posted 05-16-2001 23:01

Ooooh, you're almost there--you just need different stylesheets for print media.

<link rel="stylesheet" type="text/css" media="all" href="http://yourserver/global.css">
<link rel="stylesheet" type="text/css" media="print" href="http://yourserver/print.css">

Then set the visibility hidden for the page1, page2, page3 etc. DIVs in the print stylesheet.
Then you need to wrap the whole article text (like from the printer friendly version) in a DIV and show it.

Hmmm, seems inefficient now that I say it out loud... maybe you could position the same page1,2,3 DIVs and show them all.

<EDIT>OK, now that I've seen the way your page frame wraps the content, it would probably be too much to do what I'm asking. *But*, if you had an open bottom of the page, my trick could work. Or you could hide *all* the navigation stuff when you print too, which would be sweet. Maybe just show the club logo or something.</EDIT>

[This message has been edited by linear (edited 05-16-2001).]

butcher
Paranoid (IV) Inmate

From: New Jersey, USA
Insane since: Oct 2000

posted posted 05-16-2001 23:23

I went with the seperate print page with an include file that held the whole artical because I couldn't figure out how to make the <Divs> expand the <td> cell I have them in. But, when I do it with the whole artical include in the <td> cell with no <Div> the page expands as expected.

Did that make sense?


- Resolutions, Of All My Fruitless Searches -

Skatefx
Bipolar (III) Inmate

From: Small Patch of Grass in CT
Insane since: Mar 2001

posted posted 05-17-2001 04:15

I kinda had the same issue before and still havent had the time to resolve it.

What I was trying to do was make a table and use the php include function to embed other html files into the table cells. Does this sound like the way of doing it or is their an easier way?

I tryed it out and the only problem i had was links and how they were handled (if at all).

Is this the same as SSI or something different. and is there an easier way to do this?



"Society, we all know that somethings wrong. And we've know it all along" -Pennywise-

butcher
Paranoid (IV) Inmate

From: New Jersey, USA
Insane since: Oct 2000

posted posted 05-17-2001 04:33

SSI includes and PHP includes function in pretty much the same way.

As far as your links working or not, you need to post the page or the code so everybody can see what you are trying to do.



- Resolutions, Of All My Fruitless Searches -

WarMage
Maniac (V) Mad Scientist

From: Rochester, New York, USA
Insane since: May 2000

posted posted 05-17-2001 04:35

<!--#include file="thisfile.html"-->
<!--#include virtual="/thisfolder/thisfile.html"-->

You do this if you do not have any other scripting language on your page.

<? include("http://www.yourdomain.com/yourfolder/yourfile.html"); ?>

if you are using PHP on your site, or you want to pull in content from a remote site. A bunch of different options available to you here. I would think the SSI to be the fastest, PHP to be as fast as you have PHP running. They could be equally as fast, or they could be equally as slow. It all counts on many factors.

You can also call on SSI if statements in order to call in different files, dependant on limited conditions. You can use PHP to call certain pages based on a far extended criterion. There are lots of options here, it is all dependant on your choice of language.

Just remember pages parsed with SSI can not be parsed by the PHP compiler, or pages parsed with PHP can not be parsed with pages containing SSI.

You will have a bit of a conflict if you attempt to override the mime type handlers. And it will be grossly uneffective, in anything that you try to do. That is why there are normally seperate extentions to handle different situations. .php3 or .shtml

Have fun, be safe

butcher
Paranoid (IV) Inmate

From: New Jersey, USA
Insane since: Oct 2000

posted posted 05-22-2001 02:38

Hey Linear.... I got it!!!

Well, mostly anyway.

Link

The script puts the <Divs>, page numbers, <a href> tags and the JavaScript in them for the show/hide function on the fly.

Very cool idea you had! I had fun figuring this one out.

The only problem I'm left with is the print css style. If I load the page with only the print.css sheet, it displays in one long stream, and prints as expected.

When the page is loaded as it is in the link I gave you here, with the <divs> stacked, it won't print correctly. Instead of printing in 2 pages, it keeps giving me 9 pages with a lot of big blank spaces. I even tried it in one style sheet with the "@media print" rule.

I've been going through my books and tutorial web sites, but haven't been able to nail down the problem yet. I'll keep at it and let you know when I do.

Thanks again for a good project! Got any more?

<edit> Just messin with the link </edit>

- Resolutions, Of All My Fruitless Searches -




[This message has been edited by butcher (edited 05-22-2001).]

linear
Paranoid (IV) Inmate

From: other places
Insane since: Mar 2001

posted posted 05-22-2001 06:17

looks tight, man. good work all around.

« BackwardsOnwards »

Show Forum Drop Down Menu