Recherche avancée

Médias (91)

Autres articles (112)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

Sur d’autres sites (13623)

  • How to create a custom theme in Piwik – Introducing the Piwik Platform

    23 août 2014, par Thomas Steur — Development

    This is the start of a new blog series where we introduce the capabilities of the Piwik platform. You’ll learn how to write custom plugins & themes, how to use our HTTP APIs and more.

    We have been greatly simplifying our APIs over the last year focusing primarily on one design principle :

    The complexity of our API should never exceed the complexity of your use case.

    In other words, if you have a simple use for our API, we want it to be simple for you to accomplish it. If you have a complex, big, hairy, change-the-world idea, then maybe we can’t make it simple for you to accomplish it, but we want it to be possible.

    Over the next weeks and months you will learn what exactly we mean by this and how we accomplished it.

    FYI, don’t worry if you’re currently using our APIs, we keep them backwards compatible and we announce breaking changes in our platform changelog.

    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.
    • And if you want, generate some test data : ./console visitorgenerator:generate-visits --idsite=1 --limit-fake-visits=600. This can take a while and requires the VisitorGenerator plugin from the Marketplace.

    Let’s start creating our own theme

    We start by using the Piwik Console to create a blank theme :

    ./console generate:theme

    The command will ask you to enter a name, description and version number for your theme. I will simply use “CustomTheme” as the name of the theme. There should now be a folder plugins/CustomTheme which contains some files to get you started easily.

    Before we modify our theme, we have to activate it by visiting the Settings => Themes admin page in our Piwik installation, or alternatively by running the command ./console core:plugin activate YourCustomTheme. If the theme is not activated, we won’t see any changes.

    Theme Contents

    The most important files in our theme are plugins/CustomTheme/stylesheets/theme.less, plugins/CustomTheme/stylesheets/_colors.less and plugins/CustomTheme/stylesheets/_variables.less :

    • theme.less is the file that will be included when your theme is activated. In this file you would include other stylesheet files and overwrite CSS styles.
    • _colors.less contains many less variables allowing you to easily change the colors Piwik uses.
    • _variables.less contains currently only one variable to change the font family. More variables will be added in the future. Note : This is a new feature and the file will be only there in case you have installed Piwik using Git or at least Piwik 2.6.0.

    Changing the font family

    To change the font family simply overwrite the variable @theme-fontFamily-base: Verdana, sans-serif; in _variables.less. That’s it.

    Changing colors

    To change a color, uncomment the less variables of the colors you want to change in _colors.less. I will shortly explain some of them. Usually changing only these colors will be enough to adjust Piwik’s look to your corporate design or to create a look that pleases you :

    @theme-color-brand:                    #d4291f; // The Piwik red which is for instance used in the menu, it also defines the color of buttons, the little arrows and more
    @theme-color-brand-contrast:           #ffffff; // Contrast color to the Piwik red. Usually you need to change it only in case you define a light brand color. For instance to change the text color of buttons
    @theme-color-link:                     #1e93d1; // The link color which is usually a light blue

    @theme-color-widget-title-text:        #0d0d0d; // The text and background color of the header of a widget (Dashboard)
    @theme-color-widget-title-background:  #f2f2f2;

    @theme-color-menu-contrast-text:       #666666; // The text color of a menu item in the reporting sub menu and the admin menu
    @theme-color-menu-contrast-textActive: #0d0d0d; // The text color of an active menu item
    @theme-color-menu-contrast-background: #f2f2f2; // The background color of a menu item

    @graph-colors-data-series[1-8]:        #000000; // The different colors used in graphs

    Making the change visible

    To make a color or font change actually visible when you reload a page in Piwik you will have to delete the compiled CSS file after each change like this :

    rm tmp/assets/asset_manager_global_css.css

    Publishing your Theme on the Marketplace

    In case you want to share your theme with other Piwik users you can do this by pushing your theme to GitHub and creating a tag. Easy as that. Read more about how to distribute a theme.

    Advanced features

    Isn’t it easy to create a custom theme ? All we had to do is to change some less variables. We never even created a file ! Of course, based on our API design principle, you can accomplish more if you want. For instance, you can change icons, CSS stylesheets, templates and more.

    For further customising your Piwik, you can even change the logo and favicon in the Settings => General settings page.

    Would you like to know more about theming ? Go to our Theme guide in the Piwik Developer Zone.

    If you have any feedback regarding our APIs or our guides in the Developer Zone feel free to send it to us.

    PS : see also this related FAQ : How do I White Label Piwik ?

  • Anomalie #4562 : Suite #4468 : Unification des CSS pour les boutons et les icônes

    6 octobre 2020

    Mais pour l’ajout là c’est bizarre on voit pas le fond, c’est un peu nul, en tout cas pour cette couleur.

    Oui : https://core.spip.net/issues/4562#note-25 et https://core.spip.net/issues/4562#note-5

    Peut-être l’inverse aussi, le retrait est plus gros que l’ajout : ça ne va pas.

    Oui c’est pas voulu, la capture a été faite à l’arrache dans l’inspecteur, devait rester un font-size planqué quelque part (il y en a pleins d’imbriqués en vrac de partout). Les 2 étaient censés être à la même taille.

    Mais bref, pour mettre le bouton d’ajout à la taille normale il y a pas trop la place pour l’instant : les .toggle_box_link sont positionnés en absolute, ça ferait déborder. Et s’il faut faire rentrer tout ça je sens que ça va amener modifier pleins de choses en cascade. On tire sur un fil et on finit par dérouler toute la pelote de laine :p

    On peut y aller par étapes aussi : laisser tout en .mini.link dans un 1er temps ça me semble acceptable, histoire de garder un truc proche de ce qu’il y avait avant, mais déjà un peu plus harmonisé. Et pis après on amélioera.

  • Evolution #3528 (Nouveau) : Apporter un Compagnon-Avertissement optionnel pour le premier article ...

    13 août 2015, par YannX DYX

    Très souvent, sur les sites de la communauté, on découvre un vieil article resté en attente de rédaction depuis...
    A la lecture, il est facile de comprendre que ce n’est pas une proposition de nouvel article, mais plutot le premier endroit où un nouvel inscrit a cru pouvoir poster sa demande de renseignements...

    Plutot que de devoir, dans dans tous les sites de la galaxie (et tous les autres sites collaboratifs sur inscription en privé), préparer dans les squelettes du privé et/ou du public, l’apparition d’avertissements diversement compris (et pas reçus au bon moment), j’imagine d’utiliser le mécanisme de Compagnon pour avertir UNE fois l’apprenti-rédacteur (au premier essai de création d’un premier article) que ce n’est pas l’endroit adapté pour une demande de rensiegnements ( et le brancher vers le Forum internes, d’autres liens, etc...)

    Cerise sur le gateau /sous la langue/ du Webmestre, proposer l’affichage d’un article ’_technique_’ (restant seulement au statut "*en redac*") qui bénéficierait des liens de traduction, géré par le seul webmestre.

    Faut-il garder cette option débrayable pas défaut, ou sous forme d’un mini-plugin optionnel ?
    Après tout le Compagnon fait bien partie intégrante de SPIP..
    et comme le texte affiché serait modifiable par tout webmestre,
    il pourrait meme remplacer "*Manuel du Site*"

    YannX