x

Capitoli principali

  1. LimeSurvey Cloud vs LimeSurvey CE
  2. LimeSurvey Cloud - Guida rapida
  3. LimeSurvey CE - Installazione
  4. Come progettare un buon sondaggio (Guida)
  5. Iniziare
  6. Configurazione di LimeSurvey
  7. Introduzione - Sondaggi
  8. Visualizza le impostazioni del sondaggio
  9. Visualizza il menu del sondaggio
  10. Visualizza la struttura del sondaggio
  11. Introduzione - Domande
  12. Introduzione - Gruppi di domande
  13. Introduzione - Indagini - Gestione
  14. Opzioni della barra degli strumenti del sondaggio
  15. Sondaggio multilinguale
  16. Guida rapida - ExpressionScript
  17. Funzionalità avanzate
  18. Domande frequenti generali
  19. Risoluzione dei problemi
  20. Soluzioni alternative
  21. Licenza
  22. Registro delle modifiche alla versione
  23. Plugin - Avanzati
 Actions

Rendi il tuo plugin compatibile con LS4

From LimeSurvey Manual

Revision as of 14:19, 3 August 2023 by Maren.fritz (talk | contribs) (Created page with "Questo file XML è obbligatorio in LimeSurvey 4. Dovrebbe trovarsi nella directory principale del plugin. Per maggiori informazioni controlla lo sviluppo del plugin Plugins_...")


Modifiche tecniche

Il nuovo file di configurazione XML

A partire da LimeSurvey 4.0, i plugin necessitano di un file di configurazione XML per essere eseguiti nell'applicazione.

La ragione di ciò è la possibilità di memorizzare informazioni sui metadati come l'autore del plug-in, l'e-mail di supporto o le informazioni sugli aggiornamenti.

Questo file XML è obbligatorio in LimeSurvey 4. Dovrebbe trovarsi nella directory principale del plugin. Per maggiori informazioni controlla lo sviluppo del plugin plugins

Example:

The new plugin directory

The plugin directory is changed in LimeSurvey 4. For security reasons, the plugin directory is now located in the upload directory (/upload/plugins) due to the new plugin manager (Plugin uploader). For manual uploads, we recommend to upload your files to the new directory to avoid software malfunctioning.

Make sure to change or add the new directory if it is hard-coded in your plugin.

Example:



The new plugin events

Some plugin events from LS3 were deprecated. Use the new plugin events introduced in LS4 to replace the old plugin events. For more information check our development manual on plugin events.

Deprecated functions and methods

Since the code base or structure of LimeSurvey 4 changed, there are a lot of methods or functions that are not used anymore. To fix this problem, you need to enable the debug mode on the config.php file first and then go to the plugin page. Any method that does not exit anymore will be shown on the error page.

Some of the methods are renamed in LS4 or are not used anymore. To be sure that your plugin works for both LS3 & LS4, check the version of LS before calling the method you need.


Example:



Best Practice

Avoid SVG files

For security (XSS) reasons, the upload of SVG Files is not possible. The Plugin uploader will ignore SVG files. Replace them by PNG or JPEG files. The upload of SVG files is possible only if you have access to the installation directory via ftp or other server tools (Upload any files at your own risks).


Avoid global constants

Avoid the use of global constants that can collapse with variables of the core application or other plugins like „ROOT_PATH“. Don‘t use global constant in general for plugin development.

Use Namespaces

Use namespace for better organization by grouping classes that work together to perform a task in your plugin. In that way you avoid using classes that are being used already in the core application.


Example: