Extra options - select user and taxonomy for new pages
dman - January 28, 2006 - 01:13
| Project: | Import HTML |
| Version: | HEAD |
| Component: | User interface |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
Via debtman7 (http://drupal.org/user/22773)
> 4) An option for user to import as, and perhaps taxonomy term to use,
> would be handy.
I've got some more plans for taxonomy setting, but this would make sense...

#1
I would love to be able to assign newly created nodes to particular taxonomy categories! I've been playing with this, but have not been able to get it to work.
I have also found it useful to be able to set publishing options (published, promoted, etc). I was able to hard-code the settings I wanted for these, but a form element for this would be great.
Thanks!
#2
It's on the wish list. Please feel free to give it a go. Shouldn't be too tricky.
Add a form element to the import page, much like the menu root selector.
Tag it in the code during the node build, and saving should just work.
When thinking of this, I'd also thought of fixing up a bulk category assignment page, but that's a different project. I ended up doing neither.
#3
Here are a few things that I added to import_html.module for my own purposes; I hope they will be of use to someone.
Under "administer" -> "import HTML" I added three new form elements
Other publishing options might easily be added; these were useful for my project.
I have attached a patch file. Comments and criticisms greatfully accepted!
#4
Cool, I've patched that in.
I shifted the bit where it adds the new properties to the node into the bit where the node is built and the other properties (body/title/teaser) are being added - _import_html_process_html_page()
It was happening a bit late in the process where you had it, (immediately before the save) and was causing errors for re-imports.
Otherwise, seems to work.
I tweaked a few other bits while I was there. Gosh I left a lot of debugs in there! Code looks a mess. Still, they come in handy , you're in no doubt about what's happening.
Anyway. New version in CVS now.
.dan.
#5
Thanks for the inputs. They've been working well for a while now (although I shifted them into a subroutine)
#6
I've patched in user selection support
Current version diff
Not fully tested, but did the job.