Git Product home page Git Product logo

dokuwiki-plugin-publish's Introduction

Plug-in to allow simple page approval process.

dokuwiki-plugin-publish's People

Contributors

alexgearbox avatar annda avatar araname avatar chris--s avatar christiansueur avatar cpesoft avatar cschive avatar delpoint avatar dom-mel avatar dturkalj avatar flallo75 avatar geco2 avatar gjrobert avatar hersoncruz avatar klap-in avatar kotm avatar lpaulsen93 avatar micgro42 avatar mprins avatar nfriedli avatar per-hed avatar phy25 avatar rneej avatar sadupl avatar samwilson avatar sawachan avatar schplurtz avatar sitenl avatar splitbrain avatar vkristian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dokuwiki-plugin-publish's Issues

lang/fr/lang.php "a été Approuvée"

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.';

[APPROVALS] doesn't show subfolders

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).

language translation

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.

Draft mode for approved pages

Hi,

since the last update (?) some pages are marked as draft although they were approved. The page itself gives this hint:
publish 1

However, the history shows the real state (green), that the latest version is also approved:
publish 2

Best regards
Juergen

Approval

In DokuWiki Adora Belle, dokuwiki/inc/common.php doesn't have $_POST variable anymore.

Hide drafts to read only users not working as expected

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

Report bug in "Publishing" when use option $conf['apr_mail_receiver']

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 :
plugin_config

Here is a picture before change :
wiki_ok

and after filling the parameter:
wiki_ko
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

Unable to clear "APPROVALS" table

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.

Do not export unapproved pages

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

[APPROVALS] doesn't respect 'useheading'

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].

no sides to approve but there are someone

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

Using of the publish plugin with linked pages

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.

(not a bug) publish & data plugin

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

Publish Banner Breaks Printable View

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.

PHP Warning: Illegal string offset

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

Sending notifications to multiple email addresses

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.

Anon users are unable to create new pages even though they have access rights

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:
image

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!

An approval should redirect to the page without "rev" number?

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?

Publish Plugin not sending Notifications

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:

  • DokuWiki notifications are correctly delivered to e-mail listed in the
    notifications configuration section
  • Publish Plugin notifications (approval sugestions/approvals), although flagged
    to send notifications in Publish Configuration and with e-mail of destination of
    notifications, no messages are sent for approval suggestions (no msg error)
    and for approvals (error msg in pink banner:

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.

Full path of a page is visible until it is approved

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).

Serios issue (not a bug)

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

Approve by action button instead of checkbox in edit

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:

template_approve_key

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.

Show Summary

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?

Make 'multiple users' the mainline?

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.

Approbator infos

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.

[APPROVALS] with header

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

Feature request: Approval without delete/admin rights

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.

Feature Request: Config option to limit draft viewing

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!

Discussion: Best way to avoid the 'not current revision' message?

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.

Publishing media

Is there a possibility to use this nice plugin for media data, too?

Always says the pages are a draft

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!

Invisible to unregistered users

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.

plugin»publish»hidereaderbanner doesn't work

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.

Link to approved revisions

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

Getting Publish plugin errors in the Recent Changes display

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.