WebsiteBaker Community Forum

WebsiteBaker Support (2.13.x) => Modules => Topic started by: Matthias on February 08, 2022, 04:07:18 PM

Title: PDF Dateien zum Download bereitstellen - mit welchem Modul?
Post by: Matthias on February 08, 2022, 04:07:18 PM
Hallo Zusammen,

ich bin neu hier. Kurz zu mir bzw. meiner Tätigkeit: Ich betreue die Webseiten von unserer Kirchengemeinde und von unserem Kindergarten.
Hier habe ich jeweils die Updates von Version 2.8.3 auf die aktuelle Version 2.13.0 r63 gemacht.
Dadurch funktioniert ein bisher genutztes Modul, die Download Gallery, nicht mehr.
Mit welchem Modul könnte ich eine ähnliche Funktionalität für die anderen Benutzer bereitstellen? Also relativ einfach z.B. mehrere PDF Dateien auf einer Seite zu veröffentlichen (wie es vorher mit der Download Gallery sehr gut ging).
Ich habe die Foldergallery v3.4.0-dev4 installiert. Für Bilder funktioniert das Klasse. Ich konnte es aber nicht für PDF Dateien nutzen.
Vielen Dank für Eure Ideen oder Vorschläge.

Matthias
Title: Re: PDF Dateien zum Download bereitstellen - mit welchem Modul?
Post by: hgs on February 08, 2022, 05:00:28 PM
Hallo Matthias
Schön dass das update so gut funktioniert hat.
Versuch mal ein update mit der DG 3.0.6 im Anhang
Die läuft bei mir ohne Probleme
Title: Re: PDF Dateien zum Download bereitstellen - mit welchem Modul?
Post by: Matthias on February 08, 2022, 10:51:51 PM
Hallo Harald,
vielen Dank für das aktuelle Modul. Ich habe es installiert.
Ich kann es auch als Abschnitt auf einer Seite hinzufügen und eine PDF Datei auswählen bzw. hochladen.
ABER: Leider wird der Abschnitt bzw. die Datei dann auf der Webseite nicht angezeigt. Ich habe dies mit verschiedenen Seiten und auch testweise mit einer neu erzeugten Seite ausprobiert.
Hast Du vielleicht eine Idee, was ich falsch mache bzw. welche Konfig ich unter Optionen noch setzen oder ändern muss?
Ich habe nur installiert und ansonsten alles unverändert gelassen.
Die Frage geht natürlich auch an alle andern ;-). Ich freue mich über jede Hilfe.
Danke und schönen Abend noch!

Matthias
Title: Re: PDF Dateien zum Download bereitstellen - mit welchem Modul?
Post by: crnogorac081 on February 09, 2022, 06:57:20 AM
Hello,

Which problem do you have ?
1. You can't upload pdf files ?
2. You can upload, but you can't display pdf file on page ?

In case 2, I can send you the CKEditor plugin that I created, to display PDF file on page.



Title: Re: PDF Dateien zum Download bereitstellen - mit welchem Modul?
Post by: dbs on February 09, 2022, 07:03:43 AM
Hallo Matthias, versuch mal vorher eine Gruppe anzulegen und dieser das PDF zuordnen.
Title: Re: PDF Dateien zum Download bereitstellen - mit welchem Modul?
Post by: hgs on February 09, 2022, 08:11:44 AM
Hallo Matthias, versuch mal vorher eine Gruppe anzulegen und dieser das PDF zuordnen.


Das ist das Problem. Ich habe es gerade mal einen einer frischen Installation getestet.

Erst wenn eine Gruppe angelegt ist und die Datei dieser zugeordnet ist, wird es im FE (FrontEnd) auch angezeigt.
Title: Re: PDF Dateien zum Download bereitstellen - mit welchem Modul?
Post by: hgs on February 09, 2022, 08:17:25 AM
Hello,

2. You can upload, but you can't display pdf file on page ?

In case 2, I can send you the CKEditor plugin that I created, to display PDF file on page.



You are welcome to post the plugin.
Is the PDF output readable in the FE with it?
Title: Re: PDF Dateien zum Download bereitstellen - mit welchem Modul?
Post by: crnogorac081 on February 09, 2022, 12:56:39 PM
Hello,

here is plugin. It uses Iframe and https://drive.google.com/viewerng/viewer for displaying files. Inside plugin you can change this for any other viewer.
There is no documentation about Google doc viewer API available for commercial use, if someone finds any, please provide info.

The plugin uses publicly available url, so it cannot be tested on local machine !

To make it work, here is procedure:

1. Unpack and paste folder in Plugins folder (root/modules/ckeditor/ckeditor/plugins)
2. Open file root/modules/ckeditor/wb_config/wb_config.js and inside toolbar that you are using ADD Button "pdfOglas"

Example:
Code: [Select]
    config.toolbar_WB_Full =
    [
        { name: 'document',    items : ['Source','-','Save','Print','-','DocProps','Preview','NewPage','-','Templates']},
        { name: 'clipboard',   items : ['Cut','Copy','-','Undo','Redo']},
        { name: 'editing',     items : ['Find','-','SelectAll','-','SpellChecker', 'Scayt']},
        { name: 'colors',      items : ['TextColor','BGColor']},
        '/',
        { name: 'basicstyles', items : ['Bold','Italic','Underline','Strike','Subscript','Superscript','Shy','-','RemoveFormat']},
        { name: 'paragraph',   items : ['NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl']},
         { name: 'forms',      items : ['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton','HiddenField']},
        '/',
        { name: 'styles',      items : ['Styles','Format','Font','FontSize' ]},
        { name: 'links',       items : ['Link','Unlink','Anchor','Wbdroplets','Wblink']},
        { name: 'insert',      items : ['Image','Table','HorizontalRule','Smiley','emoji','SpecialChar','PageBreak','Iframe']},
        { name: 'media',       items : ['wboembed']},
        { name: 'tools',       items : ['Maximize', 'ShowBlocks','Syntaxhighlight','CreatePlaceholder']},
        { name: 'info',        items : ['About']},
        '/',
        { name: 'custom1',        items : ['pdfOglas']}
    ];
Note last line - 'custom1' toolbar group, and its Button there pdfOglas.

3. Open file root/modules/ckeditor/include.php  and around line 211

Code: [Select]
    if (!$bWbConfigSetting ) {
        $ckeditor->config['extraPlugins'] =
                            'codemirror'
                          . ',filebrowser'
                          . ',syntaxhighlight'
                          . ',wblink'
                          . ',wbdroplets'
                          . ',wbabout'
                          . ',wboembed'
                          . ',wbrelation'
 
// ADD PLUGIN  
              . ',pdfoglas'


Thats it, there will be red PDF button inside CKEditor. The styling you can adapt to your own needs. To access dialog, there are different varions: 1. click on placeholder than Button, double click on placeholder, or right click on placeholder.

Have fun.
I.

Title: Re: PDF Dateien zum Download bereitstellen - mit welchem Modul?
Post by: hgs on February 09, 2022, 02:27:36 PM
Ok, vielen Dank für´s teilen.
Da aber mit dem Urteil zu Google-Fonts dass ganze von den FE-Usern zugestimmt werden müsste, sehe ich da ein Problem bei den "abmahnfreudigen Menschen" in Deutschland
Link zum Bericht (https://www.golem.de/news/landgericht-muenchen-einbindung-von-google-fonts-ist-rechtswidrig-2202-162826.html)

DeepL
Ok, thanks for sharing.
But since with the Google Fonts ruling the whole thing would have to be approved by the FE users, I see a problem there with the "warning happy people" in Germany
Link to the report in German (https://www.golem.de/news/landgericht-muenchen-einbindung-von-google-fonts-ist-rechtswidrig-2202-162826.html)
Title: Re: PDF Dateien zum Download bereitstellen - mit welchem Modul?
Post by: crnogorac081 on February 09, 2022, 02:55:07 PM
I understand. Of course I did not impose this, but only presented as an option how I solved this problem, because as you know on the desktop PDF file is displayed, but on mobile devices it is not displayed, but only as a download link.  If you like you can use another provider to display pdf and  if there is better one, which has no problem with use, I would like you to let me know.
Title: Re: PDF Dateien zum Download bereitstellen - mit welchem Modul?
Post by: hgs on February 09, 2022, 03:15:46 PM
Das Problem ist die "ungefragte" Nutzung einers externen Servers (bei google auch noch in den USA).
Meine Schriften habe ich deshalb mitlerweile alle lokal in die jeweiligen Templates eingebaut. Das ist dann für die DGSVO i.O.

DeepL
The problem is the "unsolicited" use of an external server (at google also in the USA).
My fonts I have therefore meanwhile all locally installed in the respective templates. This is then for the DGSVO i.O.
Title: Re: PDF Dateien zum Download bereitstellen - mit welchem Modul?
Post by: crnogorac081 on February 09, 2022, 03:24:31 PM
As I said, if there is another provider that is accepted by DGSVO  and GDRP I am more than happy to find out, and replace it inside plugin.js file.

Right now, you use it at your own "risk"  :-D
Title: Re: PDF Dateien zum Download bereitstellen - mit welchem Modul?
Post by: Matthias on February 09, 2022, 06:49:08 PM
Hallo Harald und dbs,

Hallo Matthias, versuch mal vorher eine Gruppe anzulegen und dieser das PDF zuordnen.


Das ist das Problem. Ich habe es gerade mal einen einer frischen Installation getestet.

Erst wenn eine Gruppe angelegt ist und die Datei dieser zugeordnet ist, wird es im FE (FrontEnd) auch angezeigt.

Habe ich gerade getestet. Geht :-). Danke für den Hinweis!
Viele Grüße

Matthias