• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

conf/04-Mar-2025-178

lang/04-Mar-2025-9060

README.mdD03-Mar-20253.4 KiB8770

action.phpD03-Mar-20251.8 KiB5127

admin.phpD03-Mar-20254.5 KiB12180

helper.phpD03-Mar-20256.9 KiB219125

plugin.info.txtD03-Mar-2025250 88

syntax.phpD03-Mar-20251.8 KiB5633

README.md

1# PageStats Plugin for DokuWiki
2
3This plugin counts the number of pages and media files in your DokuWiki and calculates their total size.
4
5## Features
6- Display the total number of pages.
7- Display the total size of all pages in megabytes (MB).
8- Display the total number of media files.
9- Display the total size of all media files in megabytes (MB).
10- Performance optimization through caching
11- Admin interface for cache management
12- Configuration options for excluding namespaces
13- Multilingual support
14
15## Installation
161. Download the ZIP file from the latest release.
172. Go to your DokuWiki Admin -> Plugins -> Install Plugin.
183. Upload the ZIP file and activate the plugin.
19
20## Configuration
21You can configure the plugin in the Admin -> Configuration Settings area:
22
23- **cacheTime**: Cache lifetime in seconds (0 to disable caching)
24- **excludeNamespaces**: Comma-separated list of namespaces to exclude from statistics
25- **showUnit**: Whether to show "MB" unit after size values
26
27## Usage
28You can use the following syntax in any page to display the statistics:
29
30- `~~PAGESTATSPAGE~~`: Displays the total number of pages.
31- `~~PAGESTATSMB~~`: Displays the total size of all pages in MB.
32- `~~MEDIASTATSPAGE~~`: Displays the total number of media files.
33- `~~MEDIASTATSMB~~`: Displays the total size of all media files in MB.
34
35### Important Note:
36To avoid incorrect or outdated statistics due to page caching, add the `~~NOCACHE~~` directive at the beginning of the page where you use these commands.
37
38## Admin Interface
39The plugin adds an admin page under "Admin -> Page Stats" where you can:
40- View current statistics
41- Clear the statistics cache
42- See usage instructions
43
44## Performance
45The plugin caches results to improve performance. The cache is automatically cleared when:
46- Pages are created, edited, or deleted
47- Media files are uploaded or deleted
48- The cache expires (configurable)
49- The cache is manually cleared via the admin interface
50
51## Notes
52- Make sure that the `data/pages` and `data/media` directories are accessible.
53- Statistics are calculated dynamically and reflect the current state of your DokuWiki files.
54- For large wikis, consider increasing the cache time to reduce server load.
55
56## Changelog
57
58### 2.1.0 (2025-03-03)
59- Added multilingual admin interface (English/German)
60- Improved configuration management with UI controls
61- Added automatic cache invalidation when settings change
62- Enhanced cache management with visual feedback
63- Better integration with DokuWiki's language system
64
65### 2.0.0 (2025-03-03)
66- Added caching mechanism for better performance
67- New admin interface for viewing stats and managing cache
68- Added configuration options for excluding namespaces
69- Added multilingual support
70- Code refactoring to eliminate duplication
71- Better error handling
72- Automatic cache clearing when content changes
73
74### 1.2.0 (2024-11-24)
75- Added media file statistics with new tags (~~MEDIASTATSPAGE~~ and ~~MEDIASTATSMB~~)
76- Improved code structure
77- Enhanced documentation
78
79### 1.1.0 (2024-11-22)
80- Added separate syntax tags for individual statistics (~~PAGESTATSPAGE~~ and ~~PAGESTATSMB~~)
81- Improved flexibility in how statistics can be displayed
82- Added basic internationalization support
83- Better documentation
84
85### 1.0.0 (2024-11-22)
86- Initial release with basic page counting functionality
87- Single ~~PAGESTATS~~ syntax for displaying all statistics at once