Recherche avancée

Médias (0)

Mot : - Tags -/logo

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (68)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

Sur d’autres sites (9027)

  • Evolution #4471 : singulier_ou_pluriel pour l’arabe

    24 août 2020, par George Kandalaft

    Hello

    Ça ne change pas, c’est la partie entière qui compte. Je suis en
    déplacement, je vérifierai à mon retour la semaine prochaine.

    Merci Bruno

    George

    Quoting  :

    La demande #4471 a été mise à jour par b b.

    george j'ai commencé à intégrer ça, mais j'ai une question à propos  <br />des valeurs non entières. En effet, depuis ta proposition, j'ai  <br />amélioré @singulier_ou_pluriel pour prendre en compte les valeurs
    non entières comme 0.5 cf
    https://git.spip.net/spip/spip/commit/380c4f95fff44b617745fc7e5a5515009b082ebf ; ça se passe comment en arabe pour ce type de valeur
     ?

    ----------------------------------------
    Evolution #4471 : singulier_ou_pluriel pour l’arabe
    https://core.spip.net/issues/4471#change-16006

    • Auteur : George Kandalaft
    • Statut : En cours
    • Priorité : Normal
    • Assigné à :
    • Catégorie : filtres et balises
    • Version cible : 3.3
    • Resolution :
      ----------------------------------------
      Voici le filtre singulier_ou_pluriel adapté à l’arabe (qui a
      plusieurs formes de pluriels suivant le nombre d’objets) :
    1. <span class="CodeRay">> <span class="comment">/**
    2. >  * Afficher un message "un truc"/("deux trucs" pour l'arabe)/"N trucs"
    3. >  * Les items sont à indiquer comme pour la fonction _T() sous la forme :
    4. >  * "module:chaine"
    5. >  *
    6. >  * @param int $nb : le nombre
    7. >  * @param string $chaine_un : l'item de langue si $nb vaut un (ou  
    8. > $nb > 10 pour l'arabe)
    9. >  * @param string $chaine_plusieurs : l'item de lanque si $nb > 1  
    10. > ($nb est compris entre 3 et 10 pour l'arabe)
    11. >  * @param string $var : La variable à remplacer par $nb dans l'item  
    12. > de langue (facultatif, défaut "nb")
    13. >  * @param array $vars : Les autres variables nécessaires aux chaines  
    14. > de langues (facultatif)
    15. >  * @return string : la chaine de langue finale en utilisant la fonction _T()
    16. >  */</span>
    17. > <span class="keyword">function</span> <span class="function">ar_singulier_ou_pluriel</span>(<span class="local-variable">$nb</span>, <span class="local-variable">$chaine_un</span>, <span class="local-variable">$chaine_plusieurs</span>,  
    18. > <span class="local-variable">$var</span> = <span class="string"><span class="delimiter">'</span><span class="content">nb</span><span class="delimiter">'</span></span>, <span class="local-variable">$vars</span> = <span class="predefined">array</span>()) {
    19. >     <span class="keyword">if</span> (!<span class="local-variable">$nb</span> = <span class="predefined">intval</span>(<span class="local-variable">$nb</span>)) {
    20. >         <span class="keyword">return</span> <span class="string"><span class="delimiter">'</span><span class="delimiter">'</span></span>;
    21. >     }
    22. >     <span class="keyword">if</span> (!<span class="predefined">is_array</span>(<span class="local-variable">$vars</span>)) {
    23. >         <span class="keyword">return</span> <span class="string"><span class="delimiter">'</span><span class="delimiter">'</span></span>;
    24. >     }
    25. >     <span class="local-variable">$vars</span>[<span class="local-variable">$var</span>] = <span class="local-variable">$nb</span>;
    26. >
    27. >     <span class="keyword">if</span> (<span class="predefined">$GLOBALS</span>[<span class="string"><span class="delimiter">'</span><span class="content">spip_lang</span><span class="delimiter">'</span></span>] == <span class="string"><span class="delimiter">'</span><span class="content">ar</span><span class="delimiter">'</span></span>) {
    28. >         <span class="local-variable">$fem</span> = <span class="predefined">substr</span>(<span class="local-variable">$chaine_un</span>, -<span class="integer">2</span>);
    29. >         <span class="keyword">switch</span> (<span class="predefined-constant">true</span>) {
    30. >             <span class="keyword">case</span> (<span class="local-variable">$nb</span> == <span class="integer">1</span>):
    31. >                 <span class="keyword">if</span> (<span class="local-variable">$fem</span> == <span class="string"><span class="delimiter">'</span><span class="content">ة</span><span class="delimiter">'</span></span>) {
    32. >                     <span class="local-variable">$chaine_un</span> = <span class="local-variable">$chaine_un</span> . <span class="string"><span class="delimiter">'</span><span class="content"> واحدة</span><span class="delimiter">'</span></span>;
    33. >                 } <span class="keyword">else</span> {
    34. >                     <span class="local-variable">$chaine_un</span> = <span class="local-variable">$chaine_un</span> . <span class="string"><span class="delimiter">'</span><span class="content"> واحد</span><span class="delimiter">'</span></span>;
    35. >                 }
    36. >                 <span class="keyword">return</span> _T(<span class="local-variable">$chaine_un</span>, <span class="local-variable">$vars</span>);
    37. >                 <span class="keyword">break</span>;
    38. >             <span class="keyword">case</span> (<span class="local-variable">$nb</span> == <span class="integer">2</span>):
    39. >                 <span class="keyword">if</span> (<span class="local-variable">$fem</span> == <span class="string"><span class="delimiter">'</span><span class="content">ة</span><span class="delimiter">'</span></span>) {
    40. >                     <span class="local-variable">$chaine_deux</span> = <span class="predefined">rtrim</span>(<span class="local-variable">$chaine_un</span>, <span class="local-variable">$fem</span>) . <span class="string"><span class="delimiter">'</span><span class="content">تان</span><span class="delimiter">'</span></span>;
    41. >                 } <span class="keyword">else</span> {
    42. >                     <span class="local-variable">$chaine_deux</span> = <span class="local-variable">$chaine_un</span> . <span class="string"><span class="delimiter">'</span><span class="content">ان</span><span class="delimiter">'</span></span>;
    43. >                 }
    44. >                 <span class="keyword">return</span> _T(<span class="local-variable">$chaine_deux</span>, <span class="local-variable">$vars</span>);
    45. >                 <span class="keyword">break</span>;
    46. >             <span class="keyword">case</span> (<span class="local-variable">$nb</span> ><span class="integer">2</span> &#38;&#38; <span class="local-variable">$nb</span> &lt; <span class="integer">11</span>):
    47. >                 <span class="keyword">return</span> _T(<span class="local-variable">$chaine_plusieurs</span>, <span class="local-variable">$vars</span>);
    48. >                 <span class="keyword">break</span>;
    49. >             <span class="keyword">default</span>:
    50. >                 <span class="local-variable">$chaine_un</span> = <span class="local-variable">$nb</span> . <span class="string"><span class="delimiter">'</span><span class="content"> </span><span class="delimiter">'</span></span> . <span class="local-variable">$chaine_un</span>;
    51. >                 <span class="keyword">return</span> _T(<span class="local-variable">$chaine_un</span>, <span class="local-variable">$vars</span>);
    52. >         }
    53. >     } <span class="keyword">else</span> {
    54. >         <span class="keyword">if</span> (<span class="local-variable">$nb</span> > <span class="integer">1</span>) {
    55. >             <span class="keyword">return</span> _T(<span class="local-variable">$chaine_plusieurs</span>, <span class="local-variable">$vars</span>);
    56. >         } <span class="keyword">else</span> {
    57. >             <span class="keyword">return</span> _T(<span class="local-variable">$chaine_un</span>, <span class="local-variable">$vars</span>);
    58. >         }
    59. >     }
    60. > }
    61. > </span>

    Télécharger


    Vous recevez ce mail car vous êtes impliqués sur ce projet.
    Pour changer les préférences d’envoi de mail, allez sur
    http://core.spip.net/my/account

  • Matomo analytics for wordpress

    15 octobre 2019, par Matomo Core Team — Community

    Self-hosting web analytics got a whole lot easier ! Introducing Matomo for WordPress

    Be the first to try it out ! Your feedback is much needed and appreciated

    Get a fully functioning Matomo (which is comparable to Google Analytics) in seconds ! How ? With the new Matomo Analytics for WordPress plugin. 

    Web analytics in WordPress has never been easier to get, or more powerful. Matomo Analytics for WordPress is the one-stop problem solver. It’ll save you time, money and give you the insights to help your website or business succeed. 

    Best of all, we get to further the goal of decentralising the internet. Our hope is for Matomo Analytics for WordPress to spread far and wide. We’re so excited that more and more people can now get their hands on this powerful, free, open-source analytics platform, in a few clicks !

    Download now and check it out !

    What do you get ?

    • No more signing up to third party analytics service (like Google)
    • No more sending away your valuable data to a third party service (like Google)
    • Easy setup – install with a few clicks, no tracking code installation or developer knowledge needed
    • 100% accurate data – no data sampling and no data limits 
    • Full data ownership – all data is stored on your servers and no one else can see your data
    • Privacy protection / GDPR compliance
    • Ecommerce tracking out-of-the-box (Woocommerce, Easy Digital Downloads, and MemberPress) and we’re keen to add many more over time
    • Powerful features – segmenting, comparing reports, different visualisations, real-time reports, visit logs and visitor profiles, Matomo Tag Manager, dashboards, data export, APIs, and many more
    • Compared to other WordPress solutions we don’t charge you extra for basic features that should work out-of-the-box
    • Just like Matomo On-Premise, Matomo Analytics for WordPress is free

    We need your feedback !

    We all know and love the versatility of WordPress – with over 55,000 plugins and all the different ways of hosting it. However, with this great versatility comes the potential for things to be missed, so we’re keen to hear your feedback.

    Thank you ! We really appreciate your help on this ❤️

    How do you get Matomo Analytics for WordPress ?

    Log in to your WordPress and go to “Plugins => Add New”, search for “Matomo Analytics – Ethical Stats. Powerful Insights”, click on “Install” and then “Activate”.

    All you need is at least WordPress 4.8 and PHP 7.0 or later. MySQL 5.1+ is recommended. 

    The source code is available at : https://github.com/matomo-org/wp-matomo/

    In perfect harmony : Matomo and WordPress

    Matomo Analytics for WordPress

    The idea for this started two years ago when we realised the similarities between the Matomo and WordPress project. 

    Not only from a technological point of view – where both are based on PHP and MySQL and can be extended using plugins – but also from a philosophical, license and values point of view. We both believe in privacy, security, data ownership, openness, transparency, having things working out-of-the-box, simplicity etc. 

    WordPress is currently used on approximately 30% of all websites. Many of them use the self-hosted open-source WordPress version. Giving everyone in this market the opportunity to easily get a powerful web analytics platform for free, means a lot to us. We believe WordPress users get a real choice besides the standard solution of Google Analytics, and it furthers our effort and goal of decentralising the internet. 

    We’re hoping more people will be empowered to protect user privacy, have access to a great free and open-source tool, and keep control of data in their own hands.

    We hope you feel the same. Help us spread the word to your friends and get them in on this awesome new project !

    Share on facebook
    Share on twitter
    Share on linkedin

    FAQs

    Isn’t there already a WP-Matomo plugin for WordPress available ?

    Yes, the existing WP-Matomo (WP-Piwik) plugin is an awesome plugin to connect your existing Matomo On-Premise or Matomo Cloud account with WordPress. The difference is that this new plugin installs Matomo Analytics fully in your WordPress. So you get the convenience of having a powerful analytics platform within your WordPress.

    We highly recommend you install this new plugin if you use WordPress and are not running Matomo yet. 

    If you are already using Matomo on our Cloud or On-Premise, we’d still highly recommend you use WP-Matomo (WP-Piwik). So that you get an easier way of inserting the tracking code into your WordPress site and get insights faster.

    I have a high traffic website, will it be an issue ?

    If you have a lot of traffic, we’d advise you to install Matomo On-Premise separately. There’s no specific traffic threshold we can give you on when it’s better to use Matomo On-Premise. It really depends on your server. 

    We reckon if you have more than 500,000 page views a month, you may want to think about using Matomo On-Premise with WP-Matomo instead, but this is just an estimate. In general, if the load on your server is already quite high, then it might be better to install Matomo on a separate server. See also recommended server sizing for running Matomo.

    How do I report a bug or request a new feature in Matomo for WordPress ?

    Please create an issue, on our repository whenever you find a bug or if you have any suggestion or ideas of improvement. We want to build an outstanding analytics experience for WordPress !

    Have another question you’re dying to ask ? The Matomo for WordPress FAQ page might have the answer you need. 

    Matomo Analytics for WordPress newsletter

    Get ahead of the crowd – signup to our exclusive Matomo for WordPress newsletter to get the latest updates on this exciting new project.

    &lt;script type=&quot;text/javascript&quot;&gt;<br />
    (function(global) {<br />
     function serialize(form){if(!form||form.nodeName!==&quot;FORM&quot;){return }var i,j,q=[];for(i=form.elements.length-1;i&gt;=0;i=i-1){if(form.elements[i].name===&quot;&quot;){continue}switch(form.elements[i].nodeName){case&quot;INPUT&quot;:switch(form.elements[i].type){case&quot;text&quot;:case&quot;hidden&quot;:case&quot;password&quot;:case&quot;button&quot;:case&quot;reset&quot;:case&quot;submit&quot;:q.push(form.elements[i].name+&quot;=&quot;+encodeURIComponent(form.elements[i].value));break;case&quot;checkbox&quot;:case&quot;radio&quot;:if(form.elements[i].checked){q.push(form.elements[i].name+&quot;=&quot;+encodeURIComponent(form.elements[i].value))}break;case&quot;file&quot;:break}break;case&quot;TEXTAREA&quot;:q.push(form.elements[i].name+&quot;=&quot;+encodeURIComponent(form.elements[i].value));break;case&quot;SELECT&quot;:switch(form.elements[i].type){case&quot;select-one&quot;:q.push(form.elements[i].name+&quot;=&quot;+encodeURIComponent(form.elements[i].value));break;case&quot;select-multiple&quot;:for(j=form.elements[i].options.length-1;j&gt;=0;j=j-1){if(form.elements[i].options[j].selected){q.push(form.elements[i].name+&quot;=&quot;+encodeURIComponent(form.elements[i].options[j].value))}}break}break;case&quot;BUTTON&quot;:switch(form.elements[i].type){case&quot;reset&quot;:case&quot;submit&quot;:case&quot;button&quot;:q.push(form.elements[i].name+&quot;=&quot;+encodeURIComponent(form.elements[i].value));break}break}}return q.join(&quot;&amp;&quot;)};<br />
    <br />
    <br />
     function extend(destination, source) {<br />
       for (var prop in source) {<br />
         destination[prop] = source[prop];<br />
       }<br />
     }<br />
    <br />
     if (!Mimi) var Mimi = {};<br />
     if (!Mimi.Signups) Mimi.Signups = {};<br />
    <br />
     Mimi.Signups.EmbedValidation = function() {<br />
       this.initialize();<br />
    <br />
       var _this = this;<br />
       if (document.addEventListener) {<br />
         this.form.addEventListener('submit', function(e){<br />
           _this.onFormSubmit(e);<br />
         });<br />
       } else {<br />
         this.form.attachEvent('onsubmit', function(e){<br />
           _this.onFormSubmit(e);<br />
         });<br />
       }<br />
     };<br />
    <br />
     extend(Mimi.Signups.EmbedValidation.prototype, {<br />
       initialize: function() {<br />
         this.form         = document.getElementById('ema_signup_form');<br />
         this.submit       = document.getElementById('webform_submit_button');<br />
         this.callbackName = 'jsonp_callback_' + Math.round(100000 * Math.random());<br />
         this.validEmail   = /.+@.+\..+/<br />
       },<br />
    <br />
       onFormSubmit: function(e) {<br />
         e.preventDefault();<br />
    <br />
         this.validate();<br />
         if (this.isValid) {<br />
           this.submitForm();<br />
         } else {<br />
           this.revalidateOnChange();<br />
         }<br />
       },<br />
    <br />
       validate: function() {<br />
         this.isValid = true;<br />
         this.emailValidation();<br />
         this.fieldAndListValidation();<br />
         this.updateFormAfterValidation();<br />
       },<br />
    <br />
       emailValidation: function() {<br />
         var email = document.getElementById('signup_email');<br />
    <br />
         if (this.validEmail.test(email.value)) {<br />
           this.removeTextFieldError(email);<br />
         } else {<br />
           this.textFieldError(email);<br />
           this.isValid = false;<br />
         }<br />
       },<br />
    <br />
       fieldAndListValidation: function() {<br />
         var fields = this.form.querySelectorAll('.mimi_field.required');<br />
    <br />
         for (var i = 0; i &lt; fields.length; ++i) {<br />
           var field = fields[i],<br />
               type  = this.fieldType(field);<br />
           if (type === 'checkboxes' || type === 'radio_buttons' || type === 'age_check') {<br />
             this.checkboxAndRadioValidation(field);<br />
           } else {<br />
             this.textAndDropdownValidation(field, type);<br />
           }<br />
         }<br />
       },<br />
    <br />
       fieldType: function(field) {<br />
         var type = field.querySelectorAll('.field_type');<br />
    <br />
         if (type.length) {<br />
           return type[0].getAttribute('data-field-type');<br />
         } else if (field.className.indexOf('checkgroup') &gt;= 0) {<br />
           return 'checkboxes';<br />
         } else {<br />
           return 'text_field';<br />
         }<br />
       },<br />
    <br />
       checkboxAndRadioValidation: function(field) {<br />
         var inputs   = field.getElementsByTagName('input'),<br />
             selected = false;<br />
    <br />
         for (var i = 0; i &lt; inputs.length; ++i) {<br />
           var input = inputs[i];<br />
           if((input.type === 'checkbox' || input.type === 'radio') &amp;&amp; input.checked) {<br />
             selected = true;<br />
           }<br />
         }<br />
    <br />
         if (selected) {<br />
           field.className = field.className.replace(/ invalid/g, '');<br />
         } else {<br />
           if (field.className.indexOf('invalid') === -1) {<br />
             field.className += ' invalid';<br />
           }<br />
    <br />
           this.isValid = false;<br />
         }<br />
       },<br />
    <br />
       textAndDropdownValidation: function(field, type) {<br />
         var inputs = field.getElementsByTagName('input');<br />
    <br />
         for (var i = 0; i &lt; inputs.length; ++i) {<br />
           var input = inputs[i];<br />
           if (input.name.indexOf('signup') &gt;= 0) {<br />
             if (type === 'text_field') {<br />
               this.textValidation(input);<br />
             } else {<br />
               this.dropdownValidation(field, input);<br />
             }<br />
           }<br />
         }<br />
         this.htmlEmbedDropdownValidation(field);<br />
       },<br />
    <br />
       textValidation: function(input) {<br />
         if (input.id === 'signup_email') return;<br />
    <br />
         if (input.value) {<br />
           this.removeTextFieldError(input);<br />
         } else {<br />
           this.textFieldError(input);<br />
           this.isValid = false;<br />
         }<br />
       },<br />
    <br />
       dropdownValidation: function(field, input) {<br />
         if (input.value) {<br />
           field.className = field.className.replace(/ invalid/g, '');<br />
         } else {<br />
           if (field.className.indexOf('invalid') === -1) field.className += ' invalid';<br />
           this.onSelectCallback(input);<br />
           this.isValid = false;<br />
         }<br />
       },<br />
    <br />
       htmlEmbedDropdownValidation: function(field) {<br />
         var dropdowns = field.querySelectorAll('.mimi_html_dropdown');<br />
         var _this = this;<br />
    <br />
         for (var i = 0; i &lt; dropdowns.length; ++i) {<br />
           var dropdown = dropdowns[i];<br />
    <br />
           if (dropdown.value) {<br />
             field.className = field.className.replace(/ invalid/g, '');<br />
           } else {<br />
             if (field.className.indexOf('invalid') === -1) field.className += ' invalid';<br />
             this.isValid = false;<br />
             dropdown.onchange = (function(){ _this.validate(); });<br />
           }<br />
         }<br />
       },<br />
    <br />
       textFieldError: function(input) {<br />
         input.className   = 'required invalid';<br />
         input.placeholder = input.getAttribute('data-required-field');<br />
       },<br />
    <br />
       removeTextFieldError: function(input) {<br />
         input.className   = 'required';<br />
         input.placeholder = '';<br />
       },<br />
    <br />
       onSelectCallback: function(input) {<br />
         if (typeof Widget === 'undefined' || !Widget.BasicDropdown) return;<br />
    <br />
         var dropdownEl = input.parentNode,<br />
             instances  = Widget.BasicDropdown.instances,<br />
             _this = this;<br />
    <br />
         for (var i = 0; i &lt; instances.length; ++i) {<br />
           var instance = instances[i];<br />
           if (instance.wrapperEl === dropdownEl) {<br />
             instance.onSelect = function(){ _this.validate() };<br />
           }<br />
         }<br />
       },<br />
    <br />
       updateFormAfterValidation: function() {<br />
         this.form.className   = this.setFormClassName();<br />
         this.submit.value     = this.submitButtonText();<br />
         this.submit.disabled  = !this.isValid;<br />
         this.submit.className = this.isValid ? 'submit' : 'disabled';<br />
       },<br />
    <br />
       setFormClassName: function() {<br />
         var name = this.form.className;<br />
    <br />
         if (this.isValid) {<br />
           return name.replace(/\s?mimi_invalid/, '');<br />
         } else {<br />
           if (name.indexOf('mimi_invalid') === -1) {<br />
             return name += ' mimi_invalid';<br />
           } else {<br />
             return name;<br />
           }<br />
         }<br />
       },<br />
    <br />
       submitButtonText: function() {<br />
         var invalidFields = document.querySelectorAll('.invalid'),<br />
             text;<br />
    <br />
         if (this.isValid || !invalidFields) {<br />
           text = this.submit.getAttribute('data-default-text');<br />
         } else {<br />
           if (invalidFields.length || invalidFields[0].className.indexOf('checkgroup') === -1) {<br />
             text = this.submit.getAttribute('data-invalid-text');<br />
           } else {<br />
             text = this.submit.getAttribute('data-choose-list');<br />
           }<br />
         }<br />
         return text;<br />
       },<br />
    <br />
       submitForm: function() {<br />
         this.formSubmitting();<br />
    <br />
         var _this = this;<br />
         window[this.callbackName] = function(response) {<br />
           delete window[this.callbackName];<br />
           document.body.removeChild(script);<br />
           _this.onSubmitCallback(response);<br />
         };<br />
    <br />
         var script = document.createElement('script');<br />
         script.src = this.formUrl('json');<br />
         document.body.appendChild(script);<br />
       },<br />
    <br />
       formUrl: function(format) {<br />
         var action  = this.form.action;<br />
         if (format === 'json') action += '.json';<br />
         return action + '?callback=' + this.callbackName + '&amp;' + serialize(this.form);<br />
       },<br />
    <br />
       formSubmitting: function() {<br />
         this.form.className  += ' mimi_submitting';<br />
         this.submit.value     = this.submit.getAttribute('data-submitting-text');<br />
         this.submit.disabled  = true;<br />
         this.submit.className = 'disabled';<br />
       },<br />
    <br />
       onSubmitCallback: function(response) {<br />
         if (response.success) {<br />
           this.onSubmitSuccess(response.result);<br />
         } else {<br />
           top.location.href = this.formUrl('html');<br />
         }<br />
       },<br />
    <br />
       onSubmitSuccess: function(result) {<br />
         if (result.has_redirect) {<br />
           top.location.href = result.redirect;<br />
         } else if(result.single_opt_in || !result.confirmation_html) {<br />
           this.disableForm();<br />
           this.updateSubmitButtonText(this.submit.getAttribute('data-thanks'));<br />
         } else {<br />
           this.showConfirmationText(result.confirmation_html);<br />
         }<br />
       },<br />
    <br />
       showConfirmationText: function(html) {<br />
         var fields = this.form.querySelectorAll('.mimi_field');<br />
    <br />
         for (var i = 0; i &lt; fields.length; ++i) {<br />
           fields[i].style['display'] = 'none';<br />
         }<br />
    <br />
         (this.form.querySelectorAll('fieldset')[0] || this.form).innerHTML = html;<br />
       },<br />
    <br />
       disableForm: function() {<br />
         var elements = this.form.elements;<br />
         for (var i = 0; i &lt; elements.length; ++i) {<br />
           elements[i].disabled = true;<br />
         }<br />
       },<br />
    <br />
       updateSubmitButtonText: function(text) {<br />
         this.submit.value = text;<br />
       },<br />
    <br />
       revalidateOnChange: function() {<br />
         var fields = this.form.querySelectorAll(&quot;.mimi_field.required&quot;),<br />
             _this = this;<br />
    <br />
         var onTextFieldChange = function() {<br />
           if (this.getAttribute('name') === 'signup[email]') {<br />
             if (_this.validEmail.test(this.value)) _this.validate();<br />
           } else {<br />
             if (this.value.length === 1) _this.validate();<br />
           }<br />
         }<br />
    <br />
         for (var i = 0; i &lt; fields.length; ++i) {<br />
           var inputs = fields[i].getElementsByTagName('input');<br />
           for (var j = 0; j &lt; inputs.length; ++j) {<br />
             if (this.fieldType(fields[i]) === 'text_field') {<br />
               inputs[j].onkeyup = onTextFieldChange;<br />
               inputs[j].onchange = onTextFieldChange; <br />
             } else {<br />
               inputs[j].onchange = function(){ _this.validate() };<br />
             }<br />
           }<br />
         }<br />
       }<br />
     });<br />
    <br />
     if (document.addEventListener) {<br />
       document.addEventListener(&quot;DOMContentLoaded&quot;, function() {<br />
         new Mimi.Signups.EmbedValidation();<br />
       });<br />
     }<br />
     else {<br />
       window.attachEvent('onload', function() {<br />
         new Mimi.Signups.EmbedValidation();<br />
       });<br />
     }<br />
    })(this);<br />
    &lt;/script&gt;
  • Anomalie #3935 (Fermé) : SPIP 3 / php 7 : problème de connexion mysql (?)

    24 avril 2017, par tcharlss (*´_ゝ`)

    En SPIP 3, ubuntu + php7, SPIP ne semble pas parvenir à se connecter à mysql.
    En installant un SPIP neuf, lors du choix du type de base de donnée, il n’y a pas mysql.
    Avec un site déjà installé (qui fonctionne bien en php 5), message d’erreur : Attention : un problème technique (serveur SQL) empêche l’accès à cette partie du site.

    Avec SPIP 3.1, aucun souci.

    J’ai bien le paquet php-mysql d’installé, voilà la liste complète des paquets installés :

    libapache2-mod-php7.0 - langage de script inclus dans du HTML et exécuté côté serveur - module Apache 2
    php7.0 - langage de script côté serveur, inclus dans du HTML (méta-paquet)
    php7.0-cgi - Langage de script intégré à HTML et exécuté côté serveur (binaire CGI)
    php7.0-cli - command-line interpreter for the PHP scripting language
    php7.0-common - documentation, examples and common module for PHP
    php7.0-curl - CURL module for PHP
    php7.0-dev - Files for PHP7.0 module development
    php7.0-gd - GD module for PHP
    php7.0-gmp - GMP module for PHP
    php7.0-json - JSON module for PHP
    php7.0-ldap - LDAP module for PHP
    php7.0-mysql - MySQL module for PHP
    php7.0-odbc - ODBC module for PHP
    php7.0-opcache - Zend OpCache module for PHP
    php7.0-pgsql - PostgreSQL module for PHP
    php7.0-pspell - pspell module for PHP
    php7.0-readline - readline module for PHP
    php7.0-recode - recode module for PHP
    php7.0-snmp - SNMP module for PHP
    php7.0-sqlite3 - SQLite3 module for PHP
    php7.0-tidy - tidy module for PHP
    php7.0-xml - DOM, SimpleXML, WDDX, XML, and XSL module for PHP
    php7.0-xmlrpc - XMLRPC-EPI module for PHP
    php-all-dev - package depending on all supported PHP development packages
    libphp7.0-embed - HTML-embedded scripting language (Embedded SAPI library)
    php-geoip - GeoIP module for PHP
    php-xdebug - Xdebug Module for PHP
    php7.0-bcmath - Bcmath module for PHP
    php7.0-bz2 - bzip2 module for PHP
    php7.0-dba - DBA module for PHP
    php7.0-enchant - Enchant module for PHP
    php7.0-fpm - server-side, HTML-embedded scripting language (FPM-CGI binary)
    php7.0-imap - IMAP module for PHP
    php7.0-interbase - Interbase module for PHP
    php7.0-intl - Internationalisation module for PHP
    php7.0-mbstring - MBSTRING module for PHP
    php7.0-mcrypt - libmcrypt module for PHP
    php7.0-phpdbg - server-side, HTML-embedded scripting language (PHPDBG binary)
    php7.0-soap - SOAP module for PHP
    php7.0-sybase - Sybase module for PHP
    php7.0-zip - Zip module for PHP
    php-amqp - AMQP extension for PHP
    php-apcu - APC User Cache for PHP
    php-gearman - PHP wrapper to libgearman
    php-gmagick - Provides a wrapper to the GraphicsMagick library
    php-gnupg - PHP wrapper around the gpgme library
    php-http - PECL HTTP module for PHP Extended HTTP Support
    php-igbinary - igbinary PHP serializer
    php-imagick - Provides a wrapper to the ImageMagick library
    php-libsodium - PHP wrapper for the Sodium cryptographic library
    php-mailparse - Email message manipulation for PHP
    php-memcache - memcache extension module for PHP
    php-memcached - memcached extension module for PHP, uses libmemcached
    php-mongodb - MongoDB driver for PHP
    php-msgpack - PHP extension for interfacing with MessagePack
    php-oauth - OAuth 1.0 consumer and provider extension
    php-pinba - Pinba module for PHP
    php-propro - propro module for PHP
    php-ps - ps module for PHP
    php-radius - radius client library for PHP
    php-raphf - raphf module for PHP
    php-redis - PHP extension for interfacing with Redis
    php-remctl - PECL module for Kerberos-authenticated command execution
    php-rrd - PHP bindings to rrd tool system
    php-smbclient - PHP wrapper for libsmbclient
    php-solr - PHP extension for communicating with Apache Solr server
    php-ssh2 - Bindings for the libssh2 library
    php-stomp - Streaming Text Oriented Messaging Protocol (STOMP) client module for PHP
    php-symfony-polyfill-php70 - Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions
    php-tideways - Tideways PHP Profiler Extension
    php-uploadprogress - file upload progress tracking extension for PHP
    php-uuid - PHP UUID extension
    php-yac - YAC (Yet Another Cache) for PHP
    php-yaml - YAML-1.1 parser and emitter for PHP