Add new attachment

Only authorized users are allowed to upload new attachments.

This page (revision-8) was last changed on 06-Feb-2011 20:51 by Gerard Perreault  

This page was created on 10-Jan-2006 23:38 by Dirk Frederickx

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Difference between version and

At line 4 changed 2 lines
Everytime you press "SAVE", JSPWiki saves a new version of a page.
Since recently, JSPWiki only saves a new version if changes where done to the page. (good;-)
Every time you press "SAVE", JSPWiki saves a new version of a page.
Since recently, JSPWiki only saves a new version if changes were made to the page (good ;-).
At line 11 changed one line
This page descibes a hack of the current JSPWiki in order to limit the number of new page versions.
This page describes a hack of the current JSPWiki in order to limit the number of new page versions.
At line 19 changed one line
When following conditions apply, the default behaviour of JSPWiki will be to overwrite the last version
When the following conditions apply, the default behaviour of JSPWiki will be to overwrite the last version
At line 23 changed 2 lines
Anonymous or asserted user can not overwrite versions, i.e.
each change will be registered with new page versions. (security)
Anonymous or asserted users can not overwrite versions, i.e.,
each change will be registered with new page versions (security).
At line 32 changed one line
However, a checkbox will be added to the edit screen, such that the user can still decide NOT to overwrite, but save the changes to a new version.
However, a checkbox will be added to the edit screen so that the user can still decide NOT to overwrite, but save the changes to a new version.
At line 35 changed one line
and on saving the page. (press save)
and on saving the page (press save).
At line 39 changed one line
You need to make changes to 2 files
You need to make changes to two files:
At line 45 changed 2 lines
This jsp generates the normal edit screen with the Save/Preview/Cancel buttons.
The added stuff inserts the "Overwrite version" checkbox, if needed.
This jsp generates the standard edit screen with the Save/Preview/Cancel buttons.
The added stuff inserts the "Overwrite version" checkbox if needed.
At line 48 changed one line
Add following stuff just after these 3 buttons:
Add following stuff just after these three buttons:
At line 77 changed one line
First you need to capture the status of the OVERWRITE checkbox. Following lines can be added in the beginning of the file:
First you need to capture the status of the OVERWRITE checkbox. The following lines can be added in the beginning of the file:
At line 92 changed one line
and change it to
and change them to
At line 122 changed 2 lines
Also notice how I implemented the actual overwrite: first the currenct version is deleted; then the new text is save.
WARNING: I only tested this with the {{VersioningFileProvider}}.
Also notice how I implemented the actual overwrite: first the current version is deleted; then the new text is saved.
At line 125 changed 2 lines
WARNING: I tested this only with the {{VersioningFileProvider}}.
Version Date Modified Size Author Changes ... Change note
8 06-Feb-2011 20:51 7.443 kB Gerard Perreault to previous
7 06-Feb-2011 19:54 7.321 kB Gerard Perreault to previous | to last
6 17-Jul-2008 23:42 4.745 kB Mardi Rollow to previous | to last
5 14-Jan-2006 00:03 4.73 kB DirkFrederickx to previous | to last
4 10-Jan-2006 23:52 4.687 kB Dirk Frederickx to previous | to last
3 10-Jan-2006 23:42 4.627 kB Dirk Frederickx to previous | to last
2 10-Jan-2006 23:41 4.579 kB Dirk Frederickx to previous | to last
1 10-Jan-2006 23:38 4.555 kB Dirk Frederickx to last
« This page (revision-8) was last changed on 06-Feb-2011 20:51 by Gerard Perreault