1
Stewdio
Question about those HTML wrappers...
  • 2003/12/7 10:27

  • Stewdio

  • Community Support Member

  • Posts: 1560

  • Since: 2003/5/7 1


Hi gang!

Ok, I know it's been asked about a dozen times, (ok a million) and I'm sorry for floding (is that a word or a typo?))the forums with repeat questions that I could easily search for (well, not so easily). Testing this scheme in a live environment with every module is equally time consuming, if not more. Anyhow...

I love C-jay content, FreeContent and all those types of goodies. Over the past year and a half these simple to use modules have really grown and matured. It's nice to see continued work with popular mods.

Now heres my question. Of any of these great tools we have at our ready disposal, does any of them offer or allow me the chance to display (traverse) entire subdirectories within directories contained in an XOOPS environment?

To clarify more, say for instance I set up Freecontent to display an .html file. Great it works, however, in order for it (me) to display and use links within the specified .html file, it appears to me at least (from what I saw) that I would have to create, upload and set each subsequesnt file within the first file in the freecontent module itself. As you can well imagine, this task can get very time consuming if I want to show dozen's of pages.

Essentially, to gain more perspective on my round about way of talk, I would like to in essence, display a website (structure) within the XOOPS environment. This way, when a link is pressed it opens within xoops, not outside of it. Keep in mind, I am trying to avoid I-Frames, as this looks sloppy and unprofessional. Will a <?php include> work in this case, or am I just nieve?

I hope you all follow what I'm trying to ask and once again, sorry for the obvious repeat post. Gathing your input in one easy to remember spot is much more desirable for me at 5:30 in the morning when I know I should be sleeping

Stew Brennand
StewdioNet
In your Space!

2
carnuke
Re: Question about those HTML wrappers...
  • 2003/12/7 13:08

  • carnuke

  • Home away from home

  • Posts: 1955

  • Since: 2003/11/5


Quote:
Essentially, to gain more perspective on my round about way of talk, I would like to in essence, display a website (structure) within the XOOPS environment.

Basically there are two ways to include/wrap HTML pages into your Xoops

1 Including 3 basic inlcude statements into your HTML file
2 Use a content module to wrap your HTML pages You have already explored this idea from what you have said, found it inadequate for your needs.

here is the other wrap method using existing static files.

1. Basic include statements

You have to edit your HTML file and add the following lines above and below your HTML content. The relative path to mainfile.php depends on the folder you saved your HTML file. You can delete $xoopsOption['show_rblock'] = 1; if you don't want the right blocks to appear!

<?php
include("../mainfile.php");
include(XOOPS_ROOT_PATH."/header.php");
$xoopsOption['show_rblock'] = 1;
?>

The content of your original html file goes here!!

<?php
include(XOOPS_ROOT_PATH."/footer.php");
?>

After you have done that, save your file as filename.php and no longer filename.html! The extension is important! Now when you call filename.php it will be perfectly included into your XOOPS theme!

Merit of using this method is that you will not lose the link integrity even if the links are relative.
You could also use auto-prepend and auto-append feature of PHP to append and prepend the above snippets to the HTML files.

The downside here is that the file structure is not integrated within the XOOPS system, they are merely linked in a menu system that works discreetly and allows pages to be wrapped in the site layout. That means any file wrapped in this way can not be 'seen' by some of the built in XOOPS features like seach, commenting, rating, etc. etc.

If that is not a problem, this is a possible option.

The subject you raise is very relevant to my own requirements, as I'm planning on how to migrate a large 500 page site into the XOOPS structure AND inherit all the features that XOOPS offers to the content. To date Ive not found a satisfactory 'module solution' but I suspect modules like ARMS and WF-Content come the closest. I'm sorry to say (as far as I'm aware) there is no magic bullet module that whips a whole site complete with directory structure graphics and the like into XOOPS as if it were made to measure! Remember XOOPS primarily uses a database not static pages, otherwise one might be able to implement a mass url replacement device like BK replaceEM. This of course WOULD be useful if you opted for the simple wrap method outlined above.

Hope this helps, please post if you find a better solution

Richard

3
CBlue
Re: Question about those HTML wrappers...

Thanks Richard for posting that basic includes script! It works for php pages too not only html ones. You just have to leave off the php tags when you put the includes into your php files.

I was able to make some games on my site look like they are included in my XOOPS site.

4
Stewdio
Re: Question about those HTML wrappers...
  • 2003/12/7 19:00

  • Stewdio

  • Community Support Member

  • Posts: 1560

  • Since: 2003/5/7 1


Thanks Richard, this is just the advise I need to get underway! Now I understand the practical side of the solution offered.

My current little "project" is a bit complex when it comes to generating the pages, so I've had a bit of difficulty getting it to work properly. It has it's own self generating archiving system with karma and comments, although they are separate from the XOOPS environment.

Thanks again!


Login

Who's Online

135 user(s) are online (114 user(s) are browsing Support Forums)


Members: 0


Guests: 135


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits