Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
in Plugins by

I am trying the edit history plugin v0.1 of Scott.


1. Page "revisions" cannot be found, see: http://www.gute-mathe-fragen.de/revisions

// though the page is showing up in >admin >pages, but the URL does not work

Some Suggestion for installation process:

1. in Readme step 2: "Go to Admin > Plugins and click the 'Set up edit history' button." -> there is no button -> instead a link is displayed on top "edit history plugin needs database initialization" (a bit confusing, esp. because the URL pointing to is domain.com/qa/install)

2. after ticking "Edit History active" and saving, I do not know what to do and where to find the revisions -> maybe add this info to the readme as "4. check domain.com/qa/revisions/ now"

I hope the plugin will work, I love the idea!

alright now I see that you have to add the postid behind the /revisions/ like so: http://www.gute-mathe-fragen.de/revisions/1768

I thought there would be a list of the last x edits which would give a nice overview!

+ Request: The edit history should only be visible for admin-users. Could you add this check to your code?

1 Answer

0 votes
selected by
Best answer

Yeah... it's 0.1 for a reason ;)

I hadn't actually planned having anything on the /revisions URL, but that's a good idea to show a list of recent edits! (It shows up in Admin>Pages because it's a page plugin, I don't think there is a way to disable it.)

Suggestion 1: I changed the plugin to use Q2A's built-in plugin initialisation instead of my custom thing, so the readme is out of date. There should be a message on the Edit History section on the plugins page but that is missing for some reason.

Suggestion 2: The revisions for each post are linked from the posts themselves. Where you see for example "edited 1 minute ago", the "edited" text links to the post history.

There is a problem with that though - it only works when the text is "edited". If someone retagged a question or selected a best answer, those don't link to the post history. And it also links the "edited" text when no edits have been stored (i.e. posts edited before EH was installed). I will try and figure out a better way to do all that.

Suggestion 3: Sure, I will add an option for who can see the edits. Personally I'm happy for regular users to see it.

Thanks for your feedback, Scott.

I added a page to the plugin that shows the revision list, requested by "/qa/revisions". Working example: http://www.gute-mathe-fragen.de/revisions/

git it at: https://github.com/echteinfachtv/q2a-edit-history
edited by
I just edited an answer and can see now that "title" and "tags" are NULL. As I do not get the "title" I cannot display a link to the edited answer. For now, I am setting a dummy link "Answer was edited".
edited by
Regarding the problem of linking the "edit" string below each question (qa-edh-layer.php): I tried to change "edited" to my translation "bearbeitet" but it does not work (link is not set).

Here I do not know what is supposed to be inside $post['what_2']