Recherche avancée

Médias (91)

Autres articles (48)

  • Librairies et logiciels spécifiques aux médias

    10 décembre 2010, par

    Pour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
    Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

Sur d’autres sites (7458)

  • How to create a command – Introducing the Piwik Platform

    2 octobre 2014, par Thomas Steur — Development

    This is the next post of our blog series where we introduce the capabilities of the Piwik platform (our previous post was How to publish your plugin or theme on the Piwik Marketplace). This time you’ll learn how to create a new command. For this tutorial you will need to have basic knowledge of PHP.

    What is a command ?

    A command can execute any task on the command line. Piwik provides currently about 50 commands via the Piwik Console. These commands let you start the archiver, change the number of available custom variables, enable the developer mode, clear caches, run tests and more. You could write your own command to sync users or websites with another system for instance.

    Getting started

    In this series of posts, we assume that you have already set up your development environment. If not, visit the Piwik Developer Zone where you’ll find the tutorial Setting up Piwik.

    To summarize the things you have to do to get setup :

    • Install Piwik (for instance via git).
    • Activate the developer mode : ./console development:enable --full.
    • Generate a plugin : ./console generate:plugin --name="MyCommandPlugin". There should now be a folder plugins/MyCommandPlugin.
    • And activate the created plugin under Settings => Plugins.

    Let’s start creating a command

    We start by using the Piwik Console to create a new command. As you can see there is even a command that lets you easily create a new command :

    ./console generate:command

    The command will ask you to enter the name of the plugin the created command should belong to. I will simply use the above chosen plugin name “MyCommandPlugin”. It will ask you for a command name as well. I will use “SyncUsers” in this example. There should now be a file plugins/MyCommandPlugin/Commands/Syncusers.php which contains already an example to get you started easily :

    1. class Syncusers extends ConsoleCommand
    2. {
    3.     protected function configure()
    4.     {
    5.         $this->setName('mycommandplugin:syncusers');
    6.         $this->setDescription('MyCommandPlugin');
    7.         $this->addOption('name', null, InputOption::VALUE_REQUIRED, 'Your name:');
    8.     }
    9.  
    10.     /**
    11.      * Execute command like: ./console mycommandplugin:syncusers --name="The Piwik Team"
    12.      */
    13.     protected function execute(InputInterface $input, OutputInterface $output)
    14.     {
    15.         $name    = $input->getOption('name');
    16.  
    17.         $message = sprintf('Syncusers: %s', $name);
    18.  
    19.         $output->writeln($message);
    20.     }
    21. }

    Télécharger

    Any command that is placed in the “Commands” folder of your plugin will be available on the command line automatically. Therefore, the newly created command can now be executed via ./console mycommandplugin:syncusers --name="The Piwik Team".

    The code template explained

    1. protected function configure()
    2. {
    3.     $this->setName('mycommandplugin:checkdatabase');
    4.     $this->setDescription('MyCommandPlugin');
    5.     $this->addOption('name', null, InputOption::VALUE_REQUIRED, 'Your name:');
    6. }

    Télécharger

    As the name says the method configure lets you configure your command. You can define the name and description of your command as well as all the options and arguments you expect when executing it.

    1. protected function execute(InputInterface $input, OutputInterface $output)
    2. {
    3.     $name    = $input->getOption('name');
    4.     $message = sprintf('Syncusers: %s', $name);
    5.     $output->writeln($message);
    6. }

    Télécharger

    The actual task is defined in the execute method. There you can access any option or argument that was defined on the command line via $input and write anything to the console via $output argument.

    In case anything went wrong during the execution you should throw an exception to make sure the user will get a useful error message. Throwing an exception when an error occurs will make sure the command does exit with a status code different than 0 which can sometimes be important.

    Advanced features

    The Piwik Console is based on the powerful Symfony Console component. For instance you can ask a user for any interactive input, you can use different output color schemes and much more. If you are interested in learning more all those features have a look at the Symfony console website.

    How to test a command

    After you have created a command you are surely wondering how to test it. Ideally, the actual command is quite short as it acts like a controller. It should only receive the input values, execute the task by calling a method of another class and output any useful information. This allows you to easily create a unit or integration test for the classes behind the command. We will cover this topic in one of our future blog posts. Just one hint : You can use another command ./console generate:test to create a test. If you want to know how to test a command have a look at the Testing Commands documentation.

    Publishing your Plugin on the Marketplace

    In case you want to share your commands with other Piwik users you can do this by pushing your plugin to a public GitHub repository and creating a tag. Easy as that. Read more about how to distribute a plugin and best practices when publishing a plugin.

    Isn’t it easy to create a command ? We never even created a file ! If you have any feedback regarding our APIs or our guides in the Developer Zone feel free to send it to us.

  • Generating test data – Introducing the Piwik Platform

    9 octobre 2014, par Thomas Steur — Development

    This is the next post of our blog series where we introduce the capabilities of the Piwik platform (our previous post was How to create a command). This time you’ll learn how to generate test data.

    Developers are developing on their local Piwik instance which usually does not contain useful data compared to a real Piwik installation in production (only a few test visits and a few tests users and websites). The ‘VisitorGenerator’ plugin lets you generate any number of visits, websites, users, goals and more. The generator makes sure there will be data for each report so you can easily test anything.

    Getting started

    In this series of posts, we assume that you have already installed Piwik. If not, visit the Piwik Developer Zone where you’ll find the Installation guide for developers.

    Installing the VisitorGenerator plugin

    The easiest way to install the plugin is by using the Marketplace in Piwik itself. It is accessible via Settings => Marketplace => Get new functionality. There you’ll find the plugin “VisitorGenerator” which you can install and activate in one click.

    If your Piwik instance is not connected to the internet you can download the plugin from the VisitorGenerator page on the Marketplace. Afterwards you can install the plugin by going to Settings => Marketplace => Uploading a plugin and uploading the previously downloaded ZIP file.

    If you have already installed the plugin make sure it is activated by going to Settings => Plugins.

    Generating websites

    After you have installed the plugin you can add as many websites as you need. This is useful for instance when you want to test something that affects many websites such as the ‘All Websites’ dashboard or the Websites manager. To generate any number of websites use the following command :

    ./console visitorgenerator:generate-website --limit=10

    This will generate 10 websites. If you need more websites simply specify a higher limit. In case you are wondering the names and URLs of the websites are randomly generated by the Faker PHP library.

    Generating goals

    In case you want to test anything related to Goals you should execute the following command :

    ./console visitorgenerator:generate-goals --idsite=1

    This will generate a few goals for the specified site. The generated goals are defined in a way to make sure there will be conversions when generating the visits in the next step.

    Generating visits

    To generate visits there are two possibilities. Either via the Piwik UI by going to Settings => Visitor Generator or by using the command line. The UI is a bit limited in generating visits so we recommend to use the command line. There you can generate visits as follows :

    ./console visitorgenerator:generate-visits --idsite=1

    This will generate many different visits for the current day. Don’t worry if it takes a while, it will insert quite a few visits by default.

    In case you want to generate visits for multiple days in the past as well you can specify the --days option.

    ./console visitorgenerator:generate-visits --idsite=1 --days=5

    Providing your own logs

    Half of the generated visits are randomly generated and half of the visits are based on real logs to make sure there is data for each report. If you want to generate visits based on your own logs for a more realistic testing just place your log files in the plugins/VisitorGenerator/data folder and make sure the file name ends with .log. You can find a few examples in the VisitorGenerator data folder.

    To generate visits based only on real log files then use the --no-fake option.

    ./console visitorgenerator:generate-visits --idsite=1 --no-fake

    All generated visits will come from the logs and no random visits nor random fake data will be used.

    Advanced features

    We are regularly adding new commands, tools and runtime checks to make your life as a developer easier. For instance you can also generate users and annotations. In the future we want to extend the plugin to create visits in the background to make sure there will be constantly new actions in the real time report.

    Are you missing any kind of generator or any other feature to make your life as a developer easier ? Let us know by email, we are listening !

    Would you like to know more about the Piwik platform ? Go to our Piwik Developer Zone where you’ll find guides and references on how to develop plugin and themes.

  • 4 Ways to Embed User Privacy & Data Security in Your Business

    15 juillet 2022, par Erin — Privacy

    Customer analytics undeniably plays a vital role for businesses. Product improvements, interface personalisation, content improvements, and creative advertising thrive on data. 

    Yet, there’s a fine line between being a customer-centred company and a privacy-violating one. 

    Due to ubiquitous online tracking, 62% of Americans now believe that it’s impossible to go about their daily lives without companies collecting data about them. Still, despite the importance of privacy in business for consumers, companies are reluctant to act. Privacy initiatives often stay on the back burner due to perceived complexity. That’s true to some extent.

    Privacy in business does assume complex technical changes to your data management. But to be a privacy-centred organisation, you also need to re-think your processes, practices, and culture. 

    Here are four ways to start your journey to better user privacy and data security. 

    1. Revise Your Data Collection Process to Gain Consumer Trust 

    The public is wary of sharing data with businesses because they are suspicious of its subsequent usage. 

    However, not all data collection is bad or wrong. In many cases, you need specific data for service delivery, compliance, or good-natured personalisation. 

    That’s exactly what consumers expect. Almost half of US consumers say they’d trust a company that limits the amount of personal information requested and only asks for data relevant to its products/services. 

    By limiting data collection and offering transparent data usage terms, you can : 

    • Reassure reluctant users to try your product or service — hence, boost conversions and sales. 
    • Retain existing audiences by gaining their trust, which leads to loyalty and higher customer lifetime value (CLV). 

    To gain consumers’ trust, implement proper consent and opt-out mechanisms. Then create educational materials about how you are collecting and using their data.

    2. Perform Data Mapping to Determine Where Sensitive Data Rests 

    Businesses are already pressed with an expanded cyber-security radar, courtesy of remote work, digital payment processing, IoT device adoption, etc. Yet, 41% of the executives don’t think their security initiatives have kept up with the digital transformations.

    Loopholes in security eventually result in a data breach. The average cost of a data breach looms at $4.24 million globally. The sum includes regulatory fines and containment costs, plus indirect losses in the form of reduced brand equity and market share. 

    Lax data protection in business also undermines consumer trust : 87% of consumers wouldn’t transact with a company if they had qualms with its security practices. 

    To improve your security posture, analyse where you are storing sensitive consumer data, who has access to it (internally and externally), and how you are protecting it. Then work with cybersecurity specialists on implementing stronger consumer security mechanisms (e.g. auto-log offs, secure password policy, etc) and extra internal security policies (if needed). 

    At the same time, start practising data minimisation. Ensure that all collected data is : 

    • Adequate – sufficient to meet your stated objectives 
    • Relevant – is rationally linked to the objectives 
    • Limited – no unnecessary data is collected or stored
    • Timely – data is periodically reviewed and removed when unnecessary 
    Data Minimisation Principles

    These principles prevent data hoarding. Also, they help improve your security posture and regulatory compliance by reducing the volume of information you need to safeguard.

    3. Do an Inventory of Your Business Tools

    Data leaks and consumer privacy breaches often occur through third parties. Because Google Analytics was deemed in breach of European GDPR in France, Austria and Italy, businesses using it are vulnerable to lawsuits (which are already happening). 

    Investigate your corporate toolkit to determine “weak links” – tools with controversial privacy policies, murky data collection practices, and poor security. 

    Treat it as a journey and pick your battles. By relying on Big Tech products for years, you might have overlooked better alternatives. 

    For example :

    • Matomo is a privacy-centred Google Analytics alternative. Our web analytics is compliant with GDPR, CCPA, and other global privacy laws. Unlike Google Analytics, we don’t exploit any data you collect and provide full transparency into how and where it’s stored. Or if you want a simple analytics solution, Fathom is another great privacy-friendly option.
    Matomo Dashboard
    • For online data storage, you can choose Proton Drive or Nextcloud (open-source). Or host your corporate data with a local cloud hosting provider to avoid cross-border data transfers.
    Proton Drive

    4. Cultivate a Privacy-Centred Corporate Culture 

    To make privacy a competitive advantage, you need every team member (at every level) to respect its importance. 

    This is a continuous process of inspiring and educating your people. Find “privacy ambassadors” who are willing to lead the conversations, educate others, and provide resources for leading the change. 

    On an operational level, incorporate privacy principles around data minimisation, bounded collection, and usage into your Code of Conduct, standard operating procedures (SOPs), and other policies. 

    Creating a privacy-centric culture takes effort, but it pays off well. Cisco estimates that for each dollar spent on privacy, an average organisation gets $2.70 in associated benefits. Almost half (47%) of organisations gain 2X returns on their privacy initiatives.

    Moving Forward with a Data Privacy Programme 

    Privacy has become a strong differentiator for brands. Consumers crave transparency and ethical data usage. Regulators mandate limited data collection and proper security mechanisms.

    But sweeping changes are hard to implement. So start small and go one step at a time. Understand which first-party data your company collects and how it is stored.

    Then look into the tools and technologies you are using for data collection. Do these provide sufficient privacy controls ? How are they using data collected on your behalf ? Finally, move to wider transformations, pertaining to data management, cybersecurity, and cultural practices. 

    Be consistent with your effort — and eventually, all the pieces will fall into place.