cosmocode / dokuwiki-plugin-publish Goto Github PK
View Code? Open in Web Editor NEWSome improvements on the original plugin by Jarrod Lowe
Home Page: http://www.dokuwiki.org/plugin:publish
Some improvements on the original plugin by Jarrod Lowe
Home Page: http://www.dokuwiki.org/plugin:publish
Plug-in to allow simple page approval process.
line 13:
$lang['apr_approved'] = 'Cette version (%s) à été <em>Approuvé</em> par %s.';
should be:
$lang['apr_approved'] = 'Cette version (%s) a été <em>Approuvée</em> par %s.';
I have set publish only for one namespace (Erbauer) Erbauer and all it's subfolders show the banners and I also can approve all of the sites there.
On my page where I set the [APPROVALS] I'm only able to see the sites that are directly in Erbauer but none in the subfolders (which also have the banners).
How can I modify the message to match the user language? The best would be to display the message in different languages according to the page settings... but in fact I simply need to change the text permanently because the users of the wiki are from one country and very few of them understand english.
In DokuWiki Adora Belle, dokuwiki/inc/common.php doesn't have $_POST variable anymore.
When I enable "Hide drafts to read only users" I lose permission to view a page in the namespaces listed in "Namespaces this plugin applies to (space separated list)." . This is despite my account being in the group "superusers" that has full access at the root level and I've checked in ACL and I have full (edit) rights to all the pages and full (delete) rights to all the name spaces both through my group and tested as an individual user too.
If I disable the publish plugin or turn off "Hide drafts to read only users" it works fine.
I'm running Frusterick Manners an the 25/5/2017 version of Publish installed today. (removed and reinstalled too, but that made no difference.)
Any help or pointers appreciated
Hello,
I would like to give you a bug when I use the publishing plugin for dokuwiki.
There is a bug when filling the $ conf ['apr_mail_receiver'] parameter. When I put an email address, nothing works on the wiki.
Config file : /lib/plugins/publish/conf/default.php
Ex parameter : $conf['apr_mail_receiver'] = '[email protected]';
Here is my configuration taking into account an email address :
Here is a picture before change :
and after filling the parameter:
We do not see anymore the contents of the test page nor the debug part :-(
Thank you in advance for your return and correction.
Cordially
Fabien
I created [APPROVALS] tables on several of my wiki pages, all displaying the pages from different namespaces. On each one, I tried to 'approve' all the pages listed on the table--only to find that the last listing on each table refused to clear. The page itself shows as approved, but it still appears on the table (in red). Also, this might be unrelated, but the "approve namespace" button at the top of the table doesn't do anything.
When I got rid of the [APPROVALS] table, saved, then created a /new/ one, it showed "no documents pending approval". While this workaround seems to work just fine, it's definitely not ideal--particularly since I plan to have other employees approving pages. It would definitely float better with them if there were as little fuss as possible.
Hello,
Unzipped to lib/plugins/publish but it doesn't show up in admin/plugins.
Running 2012-10-13 "Adora Belle".
Any ideas ?
I have translated the plugin in italian.
Files attached (I dont have rights to upload in code repository).
Remove .txt extension from lang.php and settings.php files (php file upload denied).
create it subfolder in lang folder and copy them in it.
mailapprovetext.txt
mailchangetext.txt
lang.php.txt
settings.php.txt
When a page has not been approved yet, PDF or ODT exports are still offered and will happily export an unapproved page. This should be fixed
After customizing the CSS the Plugin works nearly as expected. There are only 2 drawbacks:
1.) The table listing generated by [APPROVALS] does not respect the general option 'useheading' configured in global configuration. It displays the namespace instead of the heading. How about make it an option in the configuration area of the plugin?
2.) You can't exclude specific pages, for example the page inside a namespace containing the TOC or the table listing generated by [APPROVALS].
Hi,
I got a DokuWiki [2015-08-10a "Detritus"] running under Microsoft IIS 7.5.
I have some sites to approve but my page with the [APPROVALS] tag say's there are no sides to approve. I tried some setting within the name space option under the configuration but nothing helps.
At the moment both options "apr_namespaces" and "no_apr_namespaces" are empty.
I also tried to restart the page inside the IIS and use a other browser to avoid cache problems.
I just generate a new page with the [APPROVALS] tag, that doesn't help too.
I know that publish isn't in the in compatibility list of Detritus but maybe you can tell me if you know something about that issues or if you can reproduce the behaviour.
Best regards
When updating the sidebar the menu items will become visible even though it has not been approved
Warning: Illegal string offset '_elem' in C:\Xampp\htdocs\dokuwiki1\lib\plugins\publish\action\revisions.php on line 37
Cleanup plugin is also developed by same author.
On a document that includes other wiki pages the publish plugin is not really usable , because changes, i.e. sub document is not approved anymore, on the include pages are not shown. A marker for that would be great.
Adding a specific namespace to Publish breaks the [APPROVALS] Tag. It will only display "No Documents Pending Approval".
Hello ,
Does anyone see a mean to use Publish with the Data plugin in order to display approval status of a document in Data output (datable and/or datalist) ?
Thanks by advance
The banner, while pretty, does not have a text only option for printable view. It would not be a problem if the banner was either ignored or printed as a single text line.
*Edit: The Print.css can, of course, be modified but that will get overwritten each time it is updated.
Is there a way to hide drafts to public view until approval?
I would like to be able to have publish work for the entire wiki, except for a few namespaces which are defined in the admin config.
In the error-log of my apache-server, the following line appears often:
PHP Warning: Illegal string offset '_elem' in /var/www/html/wiki/lib/plugins/publish/action/revisions.php on line 37
It must have to do with arrays, but I don't know what to do exactly.
EDIT: it seems that this issue was investigated yet at #35
Using the 2015-11-18 version in Dokuwiki 2015-08-10a "Detritus
If I add more than one email address to the "Default change-email receiver." I get an error saying 'One of email adresses entered for change notifications from the publish plugin is invalid:'
The error message suggests that it should be possible to have multiple email addresses, and it certainly is possible to use multiple addresses in Dokuwiki's main 'Notifications' section.
i have 100 erly wright documents, and i have that all these documents will be approved
Apologies ahead, the screenshots are in German.
Publish is configured to have publishing control over the "characters" wiki tree on my system. Permissions are set correctly as you can see:
However, when trying to add a new page, all I get as anon user is that I am not allowed to access the page. Members of the "editor" group can create new pages in that area without problems.
DokuWiki is Detritus 2015-08-10a
Plugins additional to the extended standard edition, all at their current release versions:
Indexmenu Plugin
Publishing Plugin
Translation Plugin
DokuWiki Upgrade Plugin
Wrap Plugin
If you need any additional info, please don't hesitate to ask in English or in German!
Right now, after a page is approved, the notification banner is show, but the publish plugin seems to always return a URL of the page with ...?rev=xxxyyyzzz
parameter. Is this necessary or an intended behavior? Or could it be avoided and a clean URL of the page could be provided instead?
DokuWiki Version: Release 2017-02-19b "Frusterick Manners"
Publish Plugin Version: Last updated on 2017-01-27
DokuWiki using Plugin Google Authentication by Andrew Kornienko
SMTP relay by google server by G Suite
Issue:
There was an unexpected problem communicating with SMTP: Unexpected return code - Expected: 354, Got: 503 | 503 5.5.1 RCPT first. xxxxxxx.1 - gsmtp
I suppose notification "From" field is absent or mal-formed or not accepted by
our google mail relayer. 503 means no previous MAIL SMTP command sent.
Hi,
The subject says it all:
After editing a page readers will see the "old version" message at the top and the full path of the document in the footer, regardless of the dokuwiki configuration.
When the page is approved the path line changes back to the configured setting (relative to the root namespace).
Hello,
As I understand this plugin was made agaist spam and content attacks..
However there is a serious thing that the plugin is missing.
The basic configuration of the plugin would be:
Read-only can see the page
Users can edit the page
Admins can approve the page
Until approval is met the page changes are invisible to Read-only users.
HOWEVER! If a user delete the text from the page completely - than the Read-only users will see that the page does not exist. So therefore I think that there shall be some kind of part of code to disallow users to delete the page or either to show the Read-only users the Revision which was approved before deletion.
It think this is a serios problem because people who want to attack the Wiki can just delete all pages and than admin will have to go though a long time of drawing back the old approved revisions. Also its a risk for SEO, because in this case such an attack can seriously harm the Google positions..
Best regards,
Pablo
I can't approve pages, which path have cyrillic letters http://imagizer.imageshack.com/img924/2807/9LZS0M.png
Vanga mode: maybe some php functions didn't rewrited in their unicode version
Hi,
I have suggestion for improvement. Why not approve by button on page toolbar ?
I try on my wiki following modification:
in action.php:
in function register(&$controller) I add:
#template addbutton
$controller->register_hook('TEMPLATE_PAGETOOLS_DISPLAY', 'BEFORE', $this, addbutton, array());
$controller->register_hook('ACTION_ACT_PREPROCESS', 'BEFORE', $this, approve_act, array());
and add two more functions:
public function addbutton(&$event, $param) {
global $ID, $REV, $conf;
global $INFO;
if(!$this->hlp->in_namespace($this->getConf('apr_namespaces'), $ID)) { return true; }
if($INFO['perm'] < AUTH_DELETE) { return true; }
if (!$REV) { $rev = $INFO['lastmod']; } else { $rev = $REV; }
# if page not exist
if (!$rev) { return true; }
# allready approved ?
if($INFO['meta']['approval'][$rev]) { return true; }
if($event->data['view'] == 'main') {
$params = array('do' => 'approve_act');
if($REV) $params['rev'] = $REV;
switch($conf['template']) {
case 'dokuwiki':
case 'arago':
$event->data['items']['approve_act'] =
'<li>'
.'<a href='.wl($ID, $params).' class="action approve_act" rel="nofollow" title="'.$this->getLang('apr_do_approve').'">'
.'<span>'.$this->getLang('apr_do_approve').'</span>'
.'</a>'
.'</li>';
break;
}
}
}
function approve_act(&$event, $param) {
global $ID;
global $ACT;
global $USERINFO;
global $INFO;
global $REV;
// our event?
if (( $ACT != 'approve_act' )) return false;
if(!$this->hlp->in_namespace($this->getConf('apr_namespaces'), $ID)) { return true; }
if($INFO['perm'] < AUTH_DELETE) { return true; }
$newdata = $INFO['meta']['approval'];
if (!$REV) { $rev = $INFO['lastmod']; } else { $rev = $REV; }
$newdata[$rev] = array($INFO['client'], $_SERVER['REMOTE_USER'], $USERINFO['mail']);
p_set_metadata($ID, array('approval' => $newdata), true, true);
$ACT = 'show';
return true;
}
next I add in style.ccs:
#dokuwiki__pagetools ul li a.approve_act {
background-position: right 0;
}
#dokuwiki__pagetools ul li a.approve_act:before {
content: url(template_approve_key.png);
margin-top: 0;
}
#dokuwiki__pagetools:hover ul li a.approve_act,
#dokuwiki__pagetools ul li a.approve_act:focus,
#dokuwiki__pagetools ul li a.approve_act:active {
background-image: url(template_approve_key.png);
}
#dokuwiki__pagetools ul li a.approve_act:hover,
#dokuwiki__pagetools ul li a.approve_act:active,
#dokuwiki__pagetools ul li a.approve_act:focus {
background-position: right -45px;
}
and create button image:
I borrow some code from dw2pdf (toolbar button) and publish to create those modifications, because my knowledge of PHP is minimal, and I only use my universal programing skills to handle with code. It works on my dokuwiki, but since this is my first steps in PHP there are probably more problems to be solved.
Anyway I think this is more clear and easier way for approval, doesn't depend on editor (specially if you use ckedit or something else).
I hope that this will help.
Dear all,
I like this plugin, but I´ve got the idea, that it would be great if the summary of the recent changes of a page is shown in the orange/green box. Would that be possible?
The multiple_users branch is great! I've been using it for ages. Is it going to be the main version of Publish, do you think? I reckon it could be.
Why is the login displayed instead of the full name? At least a link to the profile could help the reader to know more information about the approbator.
The error goes as follows:
Fatal error: Uncaught Error: Call to undefined method EmailAddressValidator::check_email_address() in lib/plugins/publish/action/banner.php:93 Stack trace: #0
Take a look at the related dokuwiki commit:
dokuwiki/dokuwiki@3d4e333#diff-4075ffa520d3212204c5e5bfdc697fe9
Hi,
it would be a great help if the table generated by [APPROVALS] would list the first heading text instead of the page name (depedant on the configuration of useheading)
Regards
Juergen
In many situations the people who should have then final word (either by hierarchy or legal requrements) on approval should not have more rights than read due to limited to zero IT-knowledge.
A configuration option to give users or groups approval-rights without any editorial rights would be great.
From my point of view the parameter 'note on unapproved pages' does not work nor the 'default approved marker'. Is there a special tagging at the beginning of the comments necessary?
Hi,
a user asked a question for ODT support in the publish plugin. I opened an issue for discussion at lpaulsen93/dokuwiki-plugin-odt#150. Please have a look at let us know what you think about it.
Thanks!
This is an absolutely wonderful plugin!
I hope to someday see a configuration option to to add additional permission levels to those who cannot see the draft without specifically requesting it. For us, we need to have only those who can approve, and the draft author, to see the drafts.
This plugin was my biggest ace when pitching a dokuwiki to my company, since we don't want certain pages to be edited without a review process, but we also want to have as wide of an edit-capable user base as possible.
However, having editing level users (our largest permission level) able to see everyone else's drafts kind of defeats the purpose for us, and I'm not sure if I can convince those in charge that the banners will be enough.
If anyone knows how to tweak the code, I'm not afraid to get my hands dirty in the config files!
When the latest version is not approved and non-approved versions (drafts) are hidden to read-only users, DokuWiki will show "this is not the latest revision" message, which isn't particularly helpful.
Does it make sense to request a new event in DokuWiki around that message?
TPL_OLDREVISION_ALERT
And a config option in this plugin to hide or replace that message.
Is there a possibility to use this nice plugin for media data, too?
Hi,
I'm an admin user and every single page I look at just says it's a draft at the top, regardless of if I'm trying to edit the page, click approved or anything else.
If I approve something and no one else tries to edit it, shouldn't I see a banner saying it's approved? Thanks!
I have a wiki "that anyone can read", but with restricted (trusted) editing rights.
I would like only the logged-in users being able to see the draft/approved box.
Warning: Illegal string offset '_elem' in /var/www/dokuwiki/lib/plugins/publish/action/revisions.php on line 37
....
many times
Just installed fresh versions of both the wiki and the plug-in and the plugin»publish»hidereaderbanner setting does not work for users that are not logged-in.
I have no public registration set.
Updated bootstrap 3 template.
Otherwise pretty vanilla.
Only one user registered with full access.
Hi,
I need a way to facilitate links to older approved revisions of a page.
At the moment I use
http://site/doku.php?id=ns:text&rev=1473944151
It would be nice to have something included into publish, so that I could give e.g.
[[ns:text@publish_1]] for the first approved version
[[ns:text@publish_0]] for the last approved version
[[ns:text@publish_-1]] for the previous to last approved version
Thanks,
Michael
When we select "Recent Changes" to see everything that has recently changed in the whole Dokuwiki, we see several pairs of these two lines:
Warning: Illegal string offset 'date' in D:\RAGs\VertrigoServ\www\DokuWiki\lib\plugins\publish\action.php on line 252
Warning: Illegal string offset '' in D:\RAGs\VertrigoServ\www\DokuWiki\lib\plugins\publish\action.php on line 252
For reference, line 252 of the code mentioned says:
if($meta['approval'][$meta['last_change']['date']]) {
The Publish plugin is very robust, so I suspect that I've bungled something with the wiki. Aside from this cruft in the Recent Changes report, it appears to be working well. Is there a way to "refresh" the plugin's database or something? I'll bet it's gotten messed up by something I did.
Thanks in advance!
-K
Difflink contains &rev[1]. W3C validator shows an error for missing escapement.
There is a bug in action.php at line 249. “$this→hlp→” is missing before the call of “in_namespace()”.
see also Forum: http://forum.dokuwiki.org/thread/7483
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.