Recent changes transclusion and Setup:Installation Guide/Webservices/PDF-Export: Difference between pages

(Difference between pages)
(Changed categories.)
 
No edit summary
 
Line 1: Line 1:
It is possible to include the results of the "Recent changes" special page in a wiki page.
{{DISPLAYTITLE:Webservice: PDF-Export}}
__TOC__
Make sure that the [[Setup:Installation Guide/System Preparation/Windows/Apache Tomcat|Apache Tomcat server]] is completely installed and configured on the BlueSpice server before setting up PDF-Export.


== Adding the changelist to a page ==
==Moving the BShtml2PDF Application==
To show the Recent changes list on any page in the wiki, you can simply transclude it by adding the following to your page source:<syntaxhighlight lang="text">
Download the file "BShtml2PDF.war" from https://sourceforge.net/projects/bluespice/files/webservices/BShtml2PDF.war/download and copy it to <code>&lt;tomcat-webapps&gt;</code>
{{Special:RecentChanges}}
</syntaxhighlight>This will simply output the same content as is shown on the page ''Special:RecentChanges''.
[[File:Include Recent changes.png|alt=Recent changes included in a wiki page|center|thumb|650x650px|Recent changes included in a wiki page]]


== Limiting the displayed information ==
The default paths are as follows:
Sometimes, you might want to limit the information that is shown for recent changes.
[[File:recent changes filtered include.png|link=https://en.wiki.bluespice.com/wiki/File:recent%20changes%20filtered%20include.png|alt=Recent changes filtered view|center|thumb|500x500px|Recent changes filtered view]]


*C:\Program Files\Apache Software Foundation\Tomcat 10.0\webapps '''(Apache Tomcat on Windows)'''
*/var/lib/jetty9/webapps '''(Jetty on Debian)'''


To do this, you need to make two changes:
Or run the command <code>sudo mv /var/www/bluespice/w/extensions/BlueSpiceUEModulePDF/webservices/BShtml2PDF.war /var/lib/jetty9/webapps</code> in the terminal. '''(Linux)'''


# '''Add a wrapper and filter paramters:''' Apply a wrapper around your transclusion  for formatting purposes and add some filter parameters to limit the results in the list.
The application usually starts automatically without the need for rebooting the application server.
# '''Format the output:''' Remove the unnecessary information through some style adjustment in the page MediaWiki:Common.css (admin rights required)


=== Add a wrapper and filter parameters ===
==Checking the functionality==
You can set some parameters in the tag to filter some information. The following example shows up to the latest 100 changes in the last 7 days in the main namespace (Pages):<syntaxhighlight lang="text">
The correct functionality of the BShtml2PDF service can be checked as follows:
<div class="rcinclude">{{Special:RecentChanges|limit=100|days=7|namespace=0}}</div>
</syntaxhighlight>To show changes in additional namespaces, add them to the namepace parameter, separated by a semi-colon:<syntaxhighlight lang="text">
<div class="rcinclude">{{Special:RecentChanges|limit=100|days=7|namespace=0;3010}}</div>
</syntaxhighlight>


=== Format the output ===
On Windows, open Internet Explorer using the URL <nowiki>http://localhost:8080/BShtml2PDF</nowiki>. With correct functionality, you should see the following website:
After adding the <nowiki><div class="rinclude">...</div></nowiki> wrapper around your transclusion content, you can now use this rinclude class to style the output and to hide some unnecessary information. This class is important, because it ensures that  other pages in the wiki, such as the actual "Recent changes" special page or  the version history pages in your wiki are not affected by these changes.
[[File:Setup:Tomcat_Check_03.png|center|400px|Tomcat Check 03]]


To filter out additional detail information — such as change in file size, markers, or direct links to the version comparison —, add the following to the page ''MediaWiki:Common.css'' (admin rights required):<syntaxhighlight lang="text">
==Enable PDF Export in BlueSpice==
/** custom formatting for recent changes that are included on a wiki page with a div-wrapper of css-class .rcinclude **/
Go to the directory <code>&lt;installpath-bluespice&gt;/settings.d</code>. Open the file '''020-BlueSpiceUEModulePDF.php''' in a text editor.


/* first style declaration hides all unnecessary info such as bytes, direct links to differences, links related to user, and markers */
Or open the 020-BlueSpiceUEModulePDF.php in the terminal using the command <code>sudo nano /var/www/bluespice/w/settings.d/020-BlueSpiceUEModulePDF.php</code>. '''(Linux)'''
.rcinclude .mw-changeslist-line-inner-userTalkLink,
.rcinclude .mw-diff-bytes,
.rcinclude .mw-tag-markers,
.rcinclude .mw-changeslist-legend,
.rcinclude .mw-changeslist-line-inner-rollback,
.rcinclude .mw-changeslist-links,
.rcinclude .mw-changeslist-separator,
.rcinclude.mw-rollback-link,
.rcinclude .mw-rollback-link {display:none}


/* remove the "New" indicator from the time in front of each entry - they can only be removed together */
In the second line is the code to activate the extension:
.rcinclude td.mw-enhanced-rc {display:none}


/* increase spacing between entries */
return; // Disabled. Needs Tomcat
.rcinclude .mw-changeslist-line {margin-bottom:0.6em}


/* separate page title and user name */
You can either add a comment character (#) to the beginning of this line or delete the line completely, save the file and exit it.
.rcinclude .mw-title::after {content:" -"}


/* make the day heading more compact */
{{Messagebox|boxtype=note|Note text=Give the user "Everyone" full access to the Temp folder under C:\Widows.}}
.rcinclude .mw-changeslist h4 {font-size:0.95em; margin:1em 0 0.5em 0}


/* remove unnecessary space in the expanded version rows */
==Installing BlueSpice 3 with installer==
.rcinclude tr.mw-rcfilters-ui-highlights-enhanced-nested td:nth-child(3){display:none} 


/** end recent changes formatting  **/
#Open <code>localhost/w</code> in your Browser and follow the [[:en:Setup:Installation_Guide/With_Installer|instructions]].
</syntaxhighlight>After saving these changes in MediaWiki:Common.css, you should now see the modified output of the transcluded content as shown in the previous screenshot.
#For BlueSpice WikiFarm, move the .htaccess and web.config files to C:\bluespice\var


If you still see the original formatting, you will need to clear the network cache:
Open a command line and change into the folder <code>&lt;installpath-bluespice></code>. Execute the following command:
 
php maintenance/update.php ''(Linux)''
php maintenance\update.php ''(Windows))''
{{Messagebox|boxtype=note|Note text=In Windows, make sure that the environment variables are set correctly to access the "php" command.}}
{{Messagebox|boxtype=note|Note text=Note that you must update the [[Setup:Installation Guide/Security Settings/File System Permissions#Assignment_of_Permissions_with_Linux|file system permissions]] after running update.php.}}
 
When the script is finished with the "Done" message, you have successfully isntalled the web service .
 
[[File:Setup:Setup_bluespice_maintenance_update.jpg|center|400x556px]]
 
==Troubleshooting==
If there is a problem with the PDF export in BlueSpice, first check the [[Setup:Installation Guide/Security Settings/File System Permissions|file system permissions]].
==Download Web services==
If the required war-file is missing in your installation package, you can download it here: [https://buildservice.bluespice.com/webservices3.tar.gz Webservices].


# '''Right-click''' on the wiki page that contains the "Recent changes" transclusion.
# '''Click''' ''Inspect''.
# Activate Disable cache
# '''Press''' ''F5'' on your keyboard to refresh the page.


[[File:disable caching.png|alt=disable network cache|center|thumb|650x650px|disable network cache]]
[[en:{{FULLPAGENAME}}]]
[[en:{{FULLPAGENAME}}]]
[[de:Letzte Änderungen Transklusion]]
[[de:Setup:Installationsanleitung/Webservices/PDF-Export]]
[[Category:Organiz]]
[[Category:Organization]]
[[Category:Portal]]

Revision as of 13:57, 12 May 2022

Make sure that the Apache Tomcat server is completely installed and configured on the BlueSpice server before setting up PDF-Export.

Moving the BShtml2PDF Application

Download the file "BShtml2PDF.war" from https://sourceforge.net/projects/bluespice/files/webservices/BShtml2PDF.war/download and copy it to <tomcat-webapps>

The default paths are as follows:

  • C:\Program Files\Apache Software Foundation\Tomcat 10.0\webapps (Apache Tomcat on Windows)
  • /var/lib/jetty9/webapps (Jetty on Debian)

Or run the command sudo mv /var/www/bluespice/w/extensions/BlueSpiceUEModulePDF/webservices/BShtml2PDF.war /var/lib/jetty9/webapps in the terminal. (Linux)

The application usually starts automatically without the need for rebooting the application server.

Checking the functionality

The correct functionality of the BShtml2PDF service can be checked as follows:

On Windows, open Internet Explorer using the URL http://localhost:8080/BShtml2PDF. With correct functionality, you should see the following website:

Tomcat Check 03

Enable PDF Export in BlueSpice

Go to the directory <installpath-bluespice>/settings.d. Open the file 020-BlueSpiceUEModulePDF.php in a text editor.

Or open the 020-BlueSpiceUEModulePDF.php in the terminal using the command sudo nano /var/www/bluespice/w/settings.d/020-BlueSpiceUEModulePDF.php. (Linux)

In the second line is the code to activate the extension:

return; // Disabled. Needs Tomcat

You can either add a comment character (#) to the beginning of this line or delete the line completely, save the file and exit it.

Note:Give the user "Everyone" full access to the Temp folder under C:\Widows.


Installing BlueSpice 3 with installer

  1. Open localhost/w in your Browser and follow the instructions.
  2. For BlueSpice WikiFarm, move the .htaccess and web.config files to C:\bluespice\var

Open a command line and change into the folder <installpath-bluespice>. Execute the following command:

php maintenance/update.php (Linux)
php maintenance\update.php (Windows))
Note:In Windows, make sure that the environment variables are set correctly to access the "php" command.
Note:Note that you must update the file system permissions after running update.php.


When the script is finished with the "Done" message, you have successfully isntalled the web service .

Setup:Setup bluespice maintenance update.jpg

Troubleshooting

If there is a problem with the PDF export in BlueSpice, first check the file system permissions.

Download Web services

If the required war-file is missing in your installation package, you can download it here: Webservices.



To submit feedback about this documentation, visit our community forum.

No categories assignedEdit

Discussions