Open Rainbow-Spike opened 4 years ago
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 dokuwiki@cosmocode.de for an offer.
Please!
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
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
Yes, I want it. I have a previous version of the engine, but I can try to adapt the amendments
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
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 ;)
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 ≺(☉‿☉)≻
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! :-)
Wow! What do you need this for? If you collaborate with others all around the world?
Yes, it's more effective than GT, and even than Yandex Translator with Tomita-parser. The convolutional neural network wins!
No, I meant your timefix plugin? :-)
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
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
And conf/local.protected.php causes the Discord RSS-bot to revolt, so I don't use it...
Oh, I got it!
Please take a look at our work https://comicslate.org/de/sci-fi/freefall/d0000
Wow! Cool! Great work!!!
You can help us if you want ≺(☉‿‿☉)≻
Thank you for your trust in me! I am afraid I am too busy with other things! Yours, Christian
But we don't use the Discussion plugin, instead we use the Discord conference
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! ++++++
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');
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
Guys, please stay on topic here.
@Chris75forumname it would be helpful if you could send a proper pull request.
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 ;)
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
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.
look at /lib/tpl/your_template/ - files named main.php or footer.html try to use https://www.dokuwiki.org/plugin:headerfooter or https://www.dokuwiki.org/plugin:footer
No, I mean the part of the dokuwiki code, which uses $lang['lastmod']
and displays the last modification of the current page in the page footer. None of these plugins do anything like that. I should figure out how to do a text search for this string across all php files in the entire dokuwiki directory. Strange! I never had this problem before! I always found whatever I was looking for in this very well structured system! Hm? Cheers!
Hi, I found a simple way to search text strings inside all php files of my /dokuwiki directory!
Open Windows terminal, change to your dokuwiki directory:
cd C:\dokuwiki
execute the following command with your "textstring" in place:
findstr /L /S textstring *.php
This way I found what I was looking for:
The pagefooter "lastmod" message is created by the function tpl_pageinfo()
in dokuwiki/inc/template.php
( Print some info about the current page ).
This uses the function editorinfo()
from dokuwiki/inc/common.php
( Return the users real name ... for use in page footer ... ). That was the part, I had missed!
After checking all this out, I still think my solution is the best. So nothing is changed! It seems to work as expected, now!
Enjoy!
Please add a column for observing authors of last edits