1
noisia
Converting many html files to xoops
  • 2004/12/15 0:29

  • noisia

  • Not too shy to talk

  • Posts: 123

  • Since: 2004/8/24


I have a few hundred html files, that used to be searched and displayed through a database search engine.

I want to import the files into XOOPS and make them searchable in xoops.

I have tried several methods, but I can't find a suitable way to bulk import them. When I import them into a module like wf-section, I lose the picture links and links between some of the documents.

I have tried xoogle, but google has not crawled the files yet, so the files are not indexed in google

What would be the best way to bulk import a whole lot of html files into XOOPS automatically?

Any suggestions is highly appreciated.

2
JMorris
Re: Converting many html files to xoops
  • 2004/12/15 1:34

  • JMorris

  • XOOPS is my life!

  • Posts: 2722

  • Since: 2004/4/11


I once was in a similar situation. I never did find a viable way of accomplishing this. The best I came up with was "wrapping" the pages by converting them all to php pages and including the following code. I created a directory called html in my document root and dumped all the files there. Then....

At the top of the file, paste the following code:
include("../mainfile.php");
include(
"../header.php");
$xoopsOption['show_rblock'] = 1//0 for no right block
?>


Your HTML Content Here (No Head and Body Tags)

At the bottom of the file, paste the following code:
include("../footer.php");
?>


You might want to look at JackJ's MyPage module. It might give you some ideas.

Hope this helps.

3
JasonMR
Re: Converting many html files to xoops
  • 2004/12/15 4:00

  • JasonMR

  • Just can't stay away

  • Posts: 655

  • Since: 2004/6/21


I would suggest the same as Jmorris, only he forgot to mention, that you will need to rename the files, so that they no longer have the .html extension, but end with .php.

Write a little script that inserts the snippets and renames the files, and you're all sweet

4
smdcom
Re: Converting many html files to xoops

additional suggestion:

then you can use multimenu module to link the php file.

5
noisia
Re: Converting many html files to xoops
  • 2004/12/21 9:51

  • noisia

  • Not too shy to talk

  • Posts: 123

  • Since: 2004/8/24


Thanks for the advice.

I have played around with the mypage module and I noticed that if you use iframe, you do not have to convert your files to php.


The index.php file of my onepage module is as follows:
include("../../mainfile.php");
include(
XOOPS_ROOT_PATH."/header.php");
$xoopsOption['show_rblock'] = 1;
?>

              height=4000 
              width=100% 
              frameborder=0>



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


It will call the html web site within the iframe, so you do not need to change anything to the original web site.

One more question:
Is there any way to make the vertical measurement of the iframe flexible?
I tried "height=100%", but it does not work.

Any suggestions?

Additionally, I have not been able to resolve the find issue on the html files within my xoops.

6
carnuke
Re: Converting many html files to xoops
  • 2004/12/21 10:06

  • carnuke

  • Home away from home

  • Posts: 1955

  • Since: 2003/11/5


try "height=auto", instead of "height=100%",

why not try FREECONTENT module? it wraps pages, but has a separate keywords field for each entry so that the db can register your content as well. This link doesnt tell you much about it, because its the updated version. Go to wjue's site.

This is not an import module, though you maybe able to utilise its features. I had exactly the same challenge myself with a 400 page site. In the end I had to bite the bullet and re=enter all the content afresh into an article module. I used wf sections. an important criteria for going down this route was a decent editor that allowed me to cut-n-paste content complete with formatting etc. A bult find and replace script also comes in handy for URLs .

Richard

7
noisia
Re: Converting many html files to xoops
  • 2004/12/21 11:07

  • noisia

  • Not too shy to talk

  • Posts: 123

  • Since: 2004/8/24


Hi Richard,

Thanks for the suggestions.

Quote:
try "height=auto", instead of "height=100%",

I tried it, but it opens a scrolable window of about 100 pixels high

I will play around with freecontent, thanks for the lead.

I've been playing with WF Sections as well. Pretty powerful, but a lot of work to convert.

Quote:
an important criteria for going down this route was a decent editor that allowed me to cut-n-paste content complete with formatting etc.

Which editor did you use? Spaw?
It only works on I.E. I have tried Koivi, but it does not do the copy and paste very well.

8
carnuke
Re: Converting many html files to xoops
  • 2004/12/21 12:41

  • carnuke

  • Home away from home

  • Posts: 1955

  • Since: 2003/11/5


put this in your iframe tag scrolling='no' It will suppress all scrollbars for ie and mozilla. If your auto height works properly and the width is correct you won't need scrollbars.

Re editor, yes, I used the spaw editor and ie to convert the site over.

Consider carefully the wisdom of using an iframe:... If a search engine indexes it, what happens when it serves the page to a browser? You need to make sure it includes the rest of your XOOPS site surrounding it and in correct context.

9
noisia
Re: Converting many html files to xoops
  • 2004/12/21 23:37

  • noisia

  • Not too shy to talk

  • Posts: 123

  • Since: 2004/8/24


Quote:
put this in your iframe tag scrolling='no' It will suppress all scrollbars for ie and mozilla. If your auto height works properly and the width is correct you won't need scrollbars.


Unfortunately the height='auto' does not work properly, so the web page shows up in a small window.

I will stick to height=4000 for the moment.

Quote:
Consider carefully the wisdom of using an iframe:... If a search engine indexes it, what happens when it serves the page to a browser? You need to make sure it includes the rest of your XOOPS site surrounding it and in correct context.

Thanks for the tip. I hadn't thought about that.

10
noisia
Re: Converting many html files to xoops
  • 2004/12/23 3:17

  • noisia

  • Not too shy to talk

  • Posts: 123

  • Since: 2004/8/24


Since iframe is not the ideal solution, I have started looking into content tools, like tinycontent, WF-section, freecontent, etc.

If I upload my html files to the "content" folder, I have the following problems:

1. the link to the image folder is different, since the file from within XOOPS is displayed from the module root folder, where as the original html and images are stored in the module/content folder

2. Interlinks between the different html files does not work also because the file is displayed from the module root folder and the actual linked files are in module/content folder.

Anybody has a good solution?
Perhaps the converting to php is the only solution?

Login

Who's Online

298 user(s) are online (159 user(s) are browsing Support Forums)


Members: 0


Guests: 298


more...

Donat-O-Meter

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

Latest GitHub Commits