ex gratia Posted July 24, 2006 Share Posted July 24, 2006 Someone has sent me about 50 file written and saved in word as .doc files.They want me to put them onto their php website as modules.I have tried to download a doc to html converter and then convert the html to php but microsoft add so much GARBAGE to the doc file that it spits out errors.I just want a simple way of uplaoding their .doc files to the modules folder and have it show up correct with right hand blocks etc....help? pleaseeeeeeeeeeee??? :-[ Quote Link to comment https://forums.phpfreaks.com/topic/15476-converting-doc-to-php-tearing-my-hair-out/ Share on other sites More sharing options...
ex gratia Posted July 24, 2006 Author Share Posted July 24, 2006 OOps forgot to mention the PHP is a nuke site... Quote Link to comment https://forums.phpfreaks.com/topic/15476-converting-doc-to-php-tearing-my-hair-out/#findComment-62779 Share on other sites More sharing options...
designationlocutus Posted July 24, 2006 Share Posted July 24, 2006 Uh you poor soul! Try converting them to .txt files. That should strip the files of all the Word formatting. Quote Link to comment https://forums.phpfreaks.com/topic/15476-converting-doc-to-php-tearing-my-hair-out/#findComment-62782 Share on other sites More sharing options...
onlyican Posted July 24, 2006 Share Posted July 24, 2006 What ever way you look at it.You have to do something to all files. Convert to Plain Text, not Rich text.Copy and Pasting everything somewhere.If it is just text, I think PHP can read the text from Word Docs.If the files are nameddoc01doc02just run a loopfor($i = 1; $i <= 50; $i ++){Code for Grabbing text, and spitting it into a php file} Quote Link to comment https://forums.phpfreaks.com/topic/15476-converting-doc-to-php-tearing-my-hair-out/#findComment-62785 Share on other sites More sharing options...
ex gratia Posted July 24, 2006 Author Share Posted July 24, 2006 No converting them to .txt file removes ALL formatting.. which means I would have to go through and format it again... I may as well do that to the word file and then cut and paste into an index.php file for each module but it is taking AGES... and with 50 .doc files I could be here all month...Why does microsoft fill the files with so much crud?? I just want a basic html file with basic formatting not all the junk... *kicks Bill Gates** Quote Link to comment https://forums.phpfreaks.com/topic/15476-converting-doc-to-php-tearing-my-hair-out/#findComment-62786 Share on other sites More sharing options...
ex gratia Posted July 24, 2006 Author Share Posted July 24, 2006 The guy added images to the files too and refuses to formet the files saying he hasnt time.... I asked him to do the basic <br> <img src=> etc etc... too much effort for him and now Im left with a doc file that i would either have to manually format or convert to word html and then remove all the junk... Quote Link to comment https://forums.phpfreaks.com/topic/15476-converting-doc-to-php-tearing-my-hair-out/#findComment-62792 Share on other sites More sharing options...
AndyB Posted July 24, 2006 Share Posted July 24, 2006 Demoronizer - http://www.fourmilab.ch/webtools/demoroniser/ - might do the trickor download Microsoft's filter software - http://www.microsoft.com/downloads/details.aspx?FamilyID=209ADBEE-3FBD-482C-83B0-96FB79B74DED&displaylang=ENdetails on that - http://office.microsoft.com/en-us/assistance/HA010548651033.aspxAnd most importantly, send the idiot a HUGE invoice. Quote Link to comment https://forums.phpfreaks.com/topic/15476-converting-doc-to-php-tearing-my-hair-out/#findComment-62816 Share on other sites More sharing options...
ex gratia Posted July 24, 2006 Author Share Posted July 24, 2006 Alas while the demoroniser worked it didn't keep the formatting for the images and still didnt remove the microsoft rubbish so trying to find where the images are is taking as much time as me sitting here and reformatting it by hand... grrrrrr....Thank you all anyway! Quote Link to comment https://forums.phpfreaks.com/topic/15476-converting-doc-to-php-tearing-my-hair-out/#findComment-62851 Share on other sites More sharing options...
kenrbnsn Posted July 24, 2006 Share Posted July 24, 2006 Convert all the doc files to PDF and serve the PDF files.Ken Quote Link to comment https://forums.phpfreaks.com/topic/15476-converting-doc-to-php-tearing-my-hair-out/#findComment-62864 Share on other sites More sharing options...
ex gratia Posted July 24, 2006 Author Share Posted July 24, 2006 Well after what seems hours of faffing about I eventually loaded each file and images in their own folder and have them as htm files... it looks shoddy and not in keeping with the rest of the phpnuke site but I will go through them all one by one when i am less... vexed!The PDF didn't work I kept getting errors that because the files had been sent as attachments they were not decoded.I need a rather large wall to beat my rather sore head against...WHY cant people learn simple formatting?? I sent him a simply sheet with basic formatting on it telling him that by the time he has highlighted text and clicked on bold he may as well type < b > around it.he said it was too difficult to understand.I wont be doing any more work for him unless he starts formatting.... this is NOT fun! ::) >:( Quote Link to comment https://forums.phpfreaks.com/topic/15476-converting-doc-to-php-tearing-my-hair-out/#findComment-62899 Share on other sites More sharing options...
ex gratia Posted July 24, 2006 Author Share Posted July 24, 2006 YES YES YES!!!!OK heres what i did....created a modules folder in the phpnuke,threw all the junk for that module in there... including the htm filecreated an index file and added the following coding... spent the last 30 minutes tweaking it about but it works...[code]<?phpif (!eregi("modules.php", $PHP_SELF)) { die ("You can't access this file directly...");}$index = 1;require_once("mainfile.php");$module_name = basename(dirname(__FILE__));include("header.php");OpenTable();include("modules/Antiage/Antiage.htm");CloseTable();include("footer.php");?>[/code]My only p[roblem now is the fact it isnt finding the images but rather leaving RED EX spaces... so I'll HAVE to faff about inside the microsoft coding and find where they are mentioned and img src them all...But I did it!!! kind of!Yay to blondes! lol Quote Link to comment https://forums.phpfreaks.com/topic/15476-converting-doc-to-php-tearing-my-hair-out/#findComment-62909 Share on other sites More sharing options...
ex gratia Posted July 24, 2006 Author Share Posted July 24, 2006 All files done and dusted and the site looks fab!!Downloaded arather nifty tool called:PHP designer 2006 It was simpley the best to find the images and I had all 47 files re formatted and included in the phpnuke site in no time.. not sure what else the PHP designer does but it looks fab!Thank you for all your help guys... Quote Link to comment https://forums.phpfreaks.com/topic/15476-converting-doc-to-php-tearing-my-hair-out/#findComment-63086 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.