RIICT Intranet

Description

RIICT Intranet turns a WordPress site into a private intranet. Employees publish documents and news, share files by department, fill in forms and work on drawings – all in the frontend, without access to the WordPress dashboard. Administrators manage everything from a frontend admin panel.

The plugin is translation-ready. English is the base language; a complete German translation (de_DE, de_CH, de_AT) is included.

Content and publishing

  • Documents and news – two content types with categories, types and an attached file or featured image.
  • Frontend editor – create and edit posts in the frontend with a drag-and-drop block editor (headings, text, lists, tables, images, columns, quotes, code). The classic editor is available as an alternative.
  • Four visibility levels – public, all employees, one department only, private.
  • Dashboard – card view with filters for type, type of post and department.

Departments and access

  • Departments as roles – each department is an additional user role; users can belong to several departments.
  • Department pages – created automatically, with the department’s articles, forms and file store.
  • User pages – one page per user with profile, own posts and a personal file store.
  • Site protection – visitors who are not logged in are redirected to a custom login page. Selected pages can be made public.

File store

  • Virtual file system – shared folder, one folder per department and a personal folder per user, with unlimited subfolders.
  • Protected downloads – files are stored in a folder that is locked with .htaccess and are only delivered after a permission check.
  • Drag and drop – drop files or whole folders (including subfolders) onto the browser. Large uploads are split automatically.
  • Privacy of personal folders – not even administrators can open personal folders. An emergency takeover is possible; it is time-limited, requires a reason, is logged and the user is notified by e-mail.

Previous versions and recycle bin

  • Daily snapshots – every night the state of the file store is saved. Unchanged files use hard links and take no extra space.
  • Recycle bin – deleted files and folders can be restored.
  • Retention is configurable from 1 to 14 days. Users restore files themselves; nothing is ever overwritten.

File preview

Click a file to view it instead of downloading it:

  • Images (JPG, PNG, GIF, WebP, BMP) with arrow-key navigation, PDF, text
  • Word (DOCX), Excel and spreadsheets (XLSX, XLS, ODS, CSV), PowerPoint (PPTX), OpenDocument text (ODT)
  • DOC, PPT, ODP and RTF through LibreOffice on the server, if installed (detected automatically). With LibreOffice, all office documents are converted to PDF for the best possible preview.

Drawings

  • draw.io editor – create new drawings in any folder and edit existing .drawio files. They are saved directly in the file store.
  • DWG and DXF – preview CAD drawings and convert them to draw.io (layers stay layers, blocks become groups).

Forms

  • Form builder with text, number, e-mail, date, dropdown, single and multiple choice fields.
  • Forms belong to a department. Results with a CSV export.

Synchronisation between two sites

Two intranet installations on different servers can keep their content in sync in both directions: documents, news, form answers, types and the complete file store. Each site only pulls content from the other; all requests are signed with a shared key (HMAC-SHA256). The partner site cannot perform administrative actions: user accounts, roles, departments and department memberships are never transferred and are managed on each site itself. Authors are matched by e-mail address.

Shortcodes

  • [intranet_dokumente] – dashboard. Attributes: typ, art, abt, kategorie
  • [riict_form] – create or edit a document; [riict_form type="riict_news"] for news
  • [riict_login], [riict_lost_password] – custom login pages
  • [riict_admin] – frontend admin panel (administrators only)
  • [riict_folders] – file store. Attributes: root, show_shared, show_user
  • [riict_abteilung_page abt="slug"] – department page
  • [riict_abteilung_submenu], [riict_dept_nav] – department navigation (only departments the user may access)
  • [riict_user_page], [riict_user_page_link], [riict_benutzer_liste] – user pages
  • [riict_survey_list], [riict_survey_builder], [riict_survey_results] – forms
  • [riict_user_info], [riict_filters], [riict_admin_link] – sidebar elements

Two widgets are included as well: “Intranet filter” and “Intranet user”.

External services

This plugin connects to the following external services. All JavaScript libraries for the file preview are included in the plugin; files are always read from your own server.

draw.io (diagrams.net)

Used for creating and editing drawings. When a user opens or creates a drawing, the draw.io editor is loaded from embed.diagrams.net in an iframe. The diagram is passed to the editor in the browser via postMessage and saved back to your server. The URL can be replaced by a self-hosted draw.io instance in the settings.
Terms of use: https://www.drawio.com/trust/terms-of-use/
Privacy policy: https://www.drawio.com/trust/

Partner site (optional synchronisation)

Only if synchronisation is enabled by an administrator: the site regularly requests changes from the partner site that the administrator entered (posts, form answers, types, files – no users, roles or settings). Requests are signed with a shared key. No other third party is involved.

Bundled libraries

The file preview and the DWG import use these open-source libraries. They are included in assets/vendor/ as unminified ES modules, built with esbuild from the original packages:

  • docx-preview 0.4.1 – Apache License 2.0 – https://github.com/VolodymyrBaydalka/docxjs
  • JSZip 3.10.1 – MIT or GPLv3 – https://github.com/Stuk/jszip
  • libredwg-web 0.7.17 (WebAssembly build of GNU LibreDWG) – GPLv3 – https://github.com/mlightcad/libredwg-web – the .wasm file and its loader are generated by Emscripten; the C and TypeScript sources are in the linked repository.

Spreadsheets (XLSX, XLS, ODS, CSV) and presentations (PPTX) are displayed by the plugin’s own reader in assets/js/office-lite.js.

Installation

  1. Upload the riict-intranet folder to /wp-content/plugins/, or install the ZIP file under Plugins Add New Upload Plugin.
  2. Activate the plugin.
  3. Go to Settings Permalinks and click “Save Changes” once.
  4. Create pages for the shortcodes you need – at least a dashboard ([intranet_dokumente]), a form page ([riict_form]) and a login page ([riict_login]). A frontend admin page ([riict_admin]) is recommended.
  5. Under RIICT Intranet Settings & documentation, assign these pages.
  6. Under RIICT Intranet Public pages, mark the login page as public.
  7. Create departments and assign users to them.
  8. Recommended: set up a server cron job that calls wp-cron.php every 15 minutes, so that nightly snapshots and synchronisation run reliably.

On nginx the .htaccess protection of the file store does not apply. Add this rule to the server configuration:

location ~* /wp-content/uploads/riict/ { deny all; }

FAQ

Who can see what?

Every post has one of four visibility levels: public (everyone, also without login), all employees (logged-in users), one department, or private (author only). Department folders are only visible to members of that department. Administrators only see all departments if the option “Administrators see the file store of all departments” is enabled.

Can administrators open personal folders?

No. In an emergency (an employee leaves, long absence, audit) an administrator can take over access in the frontend admin panel under “Folders”. The takeover is time-limited, requires a reason, is logged, and the user is informed by e-mail.

How do I restore a deleted file?

In the file browser, open “Recycle bin” or choose a previous state under “Previous state” and click “Restore”. If a file with the same name exists, the restored file is saved under a new name – nothing is overwritten.

Which files can be previewed without LibreOffice?

Images, PDF, text, DOCX, XLSX, XLS, ODS, CSV, PPTX and ODT. DOC, PPT, ODP and RTF need LibreOffice on the server. On Debian/Ubuntu: apt install libreoffice-core libreoffice-writer libreoffice-calc libreoffice-impress. The PHP function exec must be enabled.

Are my drawings sent to draw.io?

The editor is loaded from embed.diagrams.net. The drawing is passed to the editor inside the browser and saved back to your own server; it is not stored by draw.io. If you do not want to use the hosted editor, run your own draw.io instance (for example the Docker image jgraph/drawio) and enter its URL in the settings.

What happens when the same file is changed on both synchronised sites?

The newer version keeps the file name. The other version is kept as name-konflikt-{site}-{date}.ext. A change always wins over a deletion, and files deleted on the partner site go to the recycle bin.

Can I upload a whole folder?

Yes – drag it onto the file browser or use “Choose folder”. The folder structure is kept. Uploads are split automatically to respect max_file_uploads and post_max_size.

Does it work with my theme?

Yes. All CSS classes use the prefix riict- and can be overridden in the theme.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“RIICT Intranet” is open source software. The following people have contributed to this plugin.

Contributors

Translate “RIICT Intranet” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

4.3

  • All JavaScript and CSS is now loaded with wp_enqueue_script() / wp_enqueue_style() from assets/; texts are passed with wp_add_inline_script().
  • Synchronisation is limited to content: departments, roles and department memberships are no longer synchronised.
  • The drag-and-drop editor is integrated as riict_fpb_* (no separate copy of the Frontend Page Builder plugin any more).
  • Escaping: JSON in attributes, output of the editor content.
  • Requires WordPress 6.3.

4.2

  • Fix: with classic themes the scripts are printed in place again (as up to 4.0). Since 4.1 they were only printed in the footer – with themes that do not call wp_footer() the editor, the draw.io editor, drag & drop and the file preview did not work, so posts could not be edited.
  • Form fields renamed so WordPress no longer reads them as query variables (“post_type” in the post form, “name” in the draw.io save request and the department/type forms). Such requests were answered as 404 and could be lost with redirect or caching plugins.
  • draw.io opens in the language of the site.

4.1

  • Passes the WordPress Plugin Check: escaping, nonces, sanitizing, WP_Filesystem, prepared SQL.
  • All preview libraries are bundled – no more JavaScript from CDNs. New built-in reader for XLSX, XLS, ODS, CSV and PPTX.
  • Uploads use wp_handle_upload(); downloads, previews and snapshots use the WordPress file system API.
  • The login form uses a nonce.
  • Inline scripts are printed through WordPress (fixes broken scripts with block themes).
  • Fix: departments set in the WordPress user profile were reset when saving.

4.0

  • The plugin is now translatable. English is the base language; a German translation (de_DE, de_CH, de_AT and their formal/informal variants) is included in languages/, together with a .pot template for further languages.
  • German sites keep their German interface automatically.

3.9

  • Backend menu unified: “News & reports” is now part of the “RIICT Intranet” menu.
  • New: drawings with draw.io – create, open and save .drawio files in the file store.
  • New: DWG/DXF preview with conversion to draw.io.

3.8

  • New: file preview for images, PDF, text, DOCX, XLSX/XLS/ODS/CSV, PPTX and ODT; DOC, PPT, ODP and RTF through LibreOffice.

3.7

  • New: two-way synchronisation between two intranet sites on different servers.

3.6

  • Plugin renamed to “RIICT Intranet” (folder riict-intranet). All data is kept.

3.5

  • New: nightly snapshots of the file store and a recycle bin, retention 1–14 days.

3.4

  • New: drag-and-drop block editor for documents and news in the frontend.

3.3

  • Fix: files could be uploaded to departments the user does not belong to.
  • Fix: users could assign departments to themselves in their profile.
  • New: drag-and-drop upload of files and folders.
  • New: sidebar shows only departments the user may access.

The complete changelog is in changelog.txt.