Loading...
 
Skip to main content

Features / Usability


You are viewing a reply to Batch upload of wiki pages?

Re: Batch upload of wiki pages?

Thanks again M, and thanks xavi

I couldn't try it until this morning (my source files were not at my pc last night), and I finally got it working the way I wanted. Turns out when \ and " were next to each other, it was escaping the double quote (even if there were two). What I had to do was replace all path separators \ in my file with two \\ , then use str_replace on the return from fgetcsv re-replacing all double \\ with single \ . It was driving me crazy since I couldn't figure out why the routine worked for probably 90% of my files, but then completely abandoning all (my assumed) logic for the other 10%

I also made a couple minor spelling corrections and added some comments to the file. I will be writing a description on the doc pages showing how to use this and everything, still just putting it through more testing so I fully understand how it works before I try and explain to others (I hadn't written anything with PHP prior to Tuesday-- talk about a fun crash course 😊) so I will get to that eventually.

Could you possibly refer sylvieg here to this thread, I'm going to try to attach my updated php file for this, and the available file should be updated.

Also, though I didn't change it, the wording on "the category must exist" should be changed, since if the category didn't exist the script created it for me (figured that out accidentally while trying to figure out the syntax to put it in a subcategory, and a new category called "maincategory::subcategory" was created). I never did figure that syntax out, but realized it was probably better that way and I organized my layout a new way that I now like.