dokuwiki-plugin-publish icon indicating copy to clipboard operation
dokuwiki-plugin-publish copied to clipboard

Authors of unapproved versions

Open Rainbow-Spike opened this issue 5 years ago • 33 comments

Please add a column for observing authors of last edits

Rainbow-Spike avatar Jan 21 '20 12:01 Rainbow-Spike

Thank you for opening this issue. CosmoCode is a software company in Berlin providing services for wiki, app and web development. As such we can't guarantee quick responses for issues opened on our Open Source projects. If you require certain features or bugs fixed, you can always hire us. Feel free to contact us at [email protected] for an offer.

auto-comment[bot] avatar Jan 21 '20 12:01 auto-comment[bot]

Please!

Rainbow-Spike avatar Oct 21 '20 04:10 Rainbow-Spike

I need exactly that, too: A line with the "author and date of the last edit" in each banner.

Since this is already shown at the bottom of the page (page footer), it should be not so hard to transfer it into the banner (or page header). I will try to build it in. I will post my solution, if I succeed.

Yours, Christian

Chris75forumname avatar Jul 21 '21 09:07 Chris75forumname

Hi Spike, I managed to do so! It was not all that hard to do. It took me some time only because I am a total beginner. I just modified the messages in the banner. (I think, columns would be great too, it should be possible, but I didn't try to make columns and I will stick with the banner layout right now.) I found some code how to display the last editor here: https://www.dokuwiki.org/plugin:verinfo (an old plugin, but the code is plain and well documented). Also I found the layout of the $INFO array here: https://www.dokuwiki.org/devel:infoarray (so I could verify I use the correct data). I will send you all the necessary changes / files, if you want? (I run latest Dokuwiki Hogfather and latest version of publish plugin.) Yours, Christian

Chris75forumname avatar Jul 25 '21 20:07 Chris75forumname

Yes, I want it. I have a previous version of the engine, but I can try to adapt the amendments

Rainbow-Spike avatar Jul 25 '21 20:07 Rainbow-Spike

Alright, there is one little thing you would have to do, after I send you all the files, I recommend using: https://www.deepl.com/translator to translate all my german changes into your language. (some little bits of language are in the code of banner.php) This is just my quick and dirty fix, so I didn't know how to do this better. And please, make safety copies of all files you overwrite with mine. By the way, I found I had to set my timezone in order to have the right timestamps in the publish plugin by setting it in conf/local.protected.php https://www.dokuwiki.org/start?id=tips:timezone Goto: dokuwiki/lib/plugins/publish and: .../publish/action and: .../publish/lang and replace the files given. files.zip Yours, Christian

Chris75forumname avatar Jul 25 '21 20:07 Chris75forumname

Christian, I already use DeepL %) in November 2020 one German came to my project and we communicate using this translator (...and also a Frenchman, a Spaniard, a Pole, and a couple of Hungarians. We're a warm bunch). BTW, this German make half of German translation of a great sci-fi webcomic through yesterday and it got a silver star ;)

Rainbow-Spike avatar Jul 25 '21 20:07 Rainbow-Spike

Also I use a userscript to manage all timemarks https://github.com/Comicslate/Userscripts/blob/master/Comicslate/TimeFix.user.js and plan to eventually remake it into a plugin with an option in the profile and storing the time zone in localStorage. And we have a huge variety of backups ≺(☉‿☉)≻

Rainbow-Spike avatar Jul 25 '21 20:07 Rainbow-Spike

Great! I used DeepL last year to translate a book (150 p.) from Dutch to German even though I do not speak a single word of Dutch. It worked! :-)

Chris75forumname avatar Jul 25 '21 20:07 Chris75forumname

Wow! What do you need this for? If you collaborate with others all around the world?

Chris75forumname avatar Jul 25 '21 20:07 Chris75forumname

Yes, it's more effective than GT, and even than Yandex Translator with Tomita-parser. The convolutional neural network wins!

Rainbow-Spike avatar Jul 25 '21 20:07 Rainbow-Spike

No, I meant your timefix plugin? :-)

Chris75forumname avatar Jul 25 '21 20:07 Chris75forumname

I live in Russian Far East +10 GMT Vladivostok server use GMT+0 London most of my readers so far are from GMT+3 Moskow and quite a few readers from other zones

Rainbow-Spike avatar Jul 25 '21 21:07 Rainbow-Spike

Wow! Great! I love Russia! Alright, let me know if it works and I will try to help if anything does not work. Yours, Christian

Chris75forumname avatar Jul 25 '21 21:07 Chris75forumname

And conf/local.protected.php causes the Discord RSS-bot to revolt, so I don't use it...

Rainbow-Spike avatar Jul 25 '21 21:07 Rainbow-Spike

Oh, I got it!

Chris75forumname avatar Jul 25 '21 21:07 Chris75forumname

Please take a look at our work https://comicslate.org/de/sci-fi/freefall/d0000

Rainbow-Spike avatar Jul 25 '21 21:07 Rainbow-Spike

Wow! Cool! Great work!!!

Chris75forumname avatar Jul 25 '21 21:07 Chris75forumname

You can help us if you want ≺(☉‿‿☉)≻

Rainbow-Spike avatar Jul 25 '21 21:07 Rainbow-Spike

Thank you for your trust in me! I am afraid I am too busy with other things! Yours, Christian

Chris75forumname avatar Jul 25 '21 21:07 Chris75forumname

It works on Greebo! http://screenshot.ru/3c72fbae852f11266e93f30ee93ee284.png => http://screenshot.ru/3c6b6079a134409e565ddf6a60f16aaa.png

Rainbow-Spike avatar Jul 25 '21 21:07 Rainbow-Spike

But we don't use the Discussion plugin, instead we use the Discord conference

Rainbow-Spike avatar Jul 25 '21 21:07 Rainbow-Spike

Oh, I forgot this feature. I added a note into the code, because the built-in internal_note function did not work as expected. This is easy to fix, just comment out the highlighted two of the following lines, so all of these lines are commented out in the function showDraft() in banner.php:

echo '<br/>';

// printf(' ' . $this->getLang('approvals'), $approvalCount, $this->getConf('number_of_approved')); // ++++++ Diese Zeile wird nicht angezeigt! ++++++

echo $this->getLang('approve_note'); // ++++++ Hinzugefügt weil showInternalNote() nicht funktioniert! ++++++

Chris75forumname avatar Jul 25 '21 22:07 Chris75forumname

If you want your number_of_approved shown as in your old banner, you can uncomment all lines in the function showDraft() in banner.php again, except the line of my tweak: // echo $this->getLang('approve_note');

Chris75forumname avatar Jul 25 '21 22:07 Chris75forumname

http://screenshot.ru/16d1096d83a35224bb0a5a00ba99feac.png nice

Rainbow-Spike avatar Jul 25 '21 22:07 Rainbow-Spike

BTW, all comments like: "++++ comment ++++" were added by me. Comments without "++++" are original comments. In the showDraft() function and in the showApproved() function is where I added the last Editor, that's where you also find fractions of the language string, such as: "letzte Änderung:" "von" for your language replacement (besides the lang.php) ... Also, you will see, I moved the Approve Action Link to the lower right corner within the banner box, all of this can be styled in style.css. Yours, Christian

Chris75forumname avatar Jul 25 '21 22:07 Chris75forumname

Guys, please stay on topic here.

@Chris75forumname it would be helpful if you could send a proper pull request.

splitbrain avatar Jul 26 '21 07:07 splitbrain

Guys, please stay on topic here.

Sorry, here is no other way to keep contact on GitHub, even PMs is absent. Even the Discord server "Dokuwiki Community" is not even open yet ;)

Rainbow-Spike avatar Jul 26 '21 09:07 Rainbow-Spike

Hi Andi, you are right! I wish I could, but I am afraid, sending a proper pull request is beyond my current abilities! But, after the summer break, I will ask a friend to help me to do this. It will be something to learn! But, before that, I should do some more proper testing!

Hi Spike, Today, my colleges started testing my tweak by creating pages like wild! Which sent me on a bug hunt myself, making me work overtime today. The problem was, when a page is freshly created, the contributor array is NOT generated right away. Only after the next edit. Since my colleges were using the nice little manual I wrote, all went good and next edits were not necessary. So most of the new pages were shown with NO last editor/creator in the banner. Which does not look appealing! So I added an if-else construct to inquire if the contributor array does exist and if so, show the last editor, and if not, fall back to the creator of the page, each provided as full user names. So this is the new version of my tweak: banner.php.zip And it seems to work, a full user name is shown all the time, now. But, I did not have time to fully validate it and test it. And I won't have time to do so in the next 4 weeks from now. Also, you would have to do all the changes again, which we discussed above, for your preferences. So, please use with caution! I would be grateful for tester's feedback!

Thanks to you all! Christian

Chris75forumname avatar Jul 26 '21 18:07 Chris75forumname

Since this is already shown at the bottom of the page (page footer), it should be not so hard to transfer it into the banner.

BTW: Where is actually the code that generates the pagefooter? I couldn't find it anywhere.

Chris75forumname avatar Jul 26 '21 19:07 Chris75forumname