Open Juergen-aus-Zuendorf opened 2 years ago
Can you describe your use case a bit more?
What would be the advantage compared to just creating the page in the normal way? You already have admin rights if you are using the Advanced Plugin so you should be able to create any page in any namespace. Copy/paste the page content if you already have it in a text file, save and you're done.
Also, why should this be part of the Advanced Plugin? It's about DW configuration settings not content. You could (should) have a completely separate Plugin für an import functionality if that has any merit.
But back to your question: An implementation would require some UI to specify and upload the text file, UI to specify the page id and a button to trigger the action.
The code would then need to upload the file, copy it to …/data/pages/<page-id>.txt
and call the URL <dokuwiki-base-url>/lib/exe/taskrunner.php?id=<page-id>
to trigger fixing up meta data, search index and the sitemap. Keep in mind that <page-id>
might contain namespaces as well, e.g. playground:example
.
Next you'll probably want the same thing for images (media) as well? Oops, I missed your #14 ;-)
My problem is the following:
We let translate German pages as a collection of certain files that are contained in different namespaces. We then receive the foreign language files back from the translation agency in an identical namespace structure. I import these pages via the import function of the Advanced plug-in. However, this is exactly the kind of work I would assign to a non-administrator.
@Juergen-aus-Zuendorf Ok, sorry, I misunderstood your issue. You want the existing import functionality, but for non-admin but selectable users/groups?
Then the problem broils down to:
I think this can be done by setting the DW configuration option manager
to include, e.g. the group @managers
and then assigning this group to the users in question. When I tested this, the Import/Export UI became visible in the DW Admin area for a user that was not a DW Admin, only a member of the mentioned group.
Does this help?
Very good, thank you !!!
Hi,
it would be a great advantage to be able to import pages not only with admin rights, but with a special role defined only for this purpose. Does anyone perhaps have an idea how this could be easily implemented?
Best regards Juergen