It should be possible to create themes for . piwik to customize its design without modifiying core files.
Proposal November 2011, based from all comments and feedback:
Attachment: XGA with Piwik in TYPO3 Backend
Completely new to Piwik, but am going to be working with it for a company, and our first step is most likely this - setting up our own theme, and probably customizing what is available to our customer (which widgets, links, etc.)
Has any work been done on this, or does anyone have ideas on how I might start? I may as well look at building a nice, generic set of code and donating to the project, but it's my first day and I'm still stumbling through the Smarty templates and API.
Any feedback is appreciated!
The Piwik "logo" is actually stylized text. While this is very low bandwidth, it means:
A common footer and meta tags should be added: "Powered by Piwik" with link to piwik.org (and possibly also the GPL)
Adding the footer is not desired, as it would only show on the dashboard, and the dashboard has variable height (because of widgets) which looks dodgy (I tried a long time ago).
It would indeed be nice to rebrand Piwik easily, currently it requires a change to the templates.
i'm currently working on a typo3 integration of piwik
I think it would be even impressive if piwik would use the tangoicon themes
Wordpress and CO have a different target group wordpress theming is a mess as you need header / footer and special part files.
I have some ideas on how to implement a templating feature:
The second idea has the positive side effect of reusing existing themes.
PS: Many users which evaluated piwik say "wow", but please change the menustructure.
Especially the horinzontal menu confused many of my customers, we should use vertical menus (as they are standard on many systems)
Thanks Kay. I recently looked at various CMS packages, so I'll comment while this is somewhat fresh in my mind.
if jQuery UI is already loaded piwik should use the icons of jQuery as the are easy to understand and it's very easy to theme them.
-> i think it's not the first priority to change the html templates directly, but theming with custom CSS and JS would be great and easy enough to find desingners
-> i assume, changing a view can be done in an extension by making a fork ... ;)
Oh, btw is it possible to switch piwik dashboard to 2 columns, this would be great for integration in other webapplications (as screensize is limited)
wordpress theming articles:
But i think css theming would be enough.
After taking a look into the hook list i found an easy way of theming:
I've done 2 things in this example:
modified menustructure and changed css.
Right, that would be an example of "... if themes are installed as plugins" that I mentioned in comment:9.
That said, those hooks may be deprecated by #660.
ok, so the minify group has to make a statement on hook naming and passed parameters.
(btw. i think compression should also be possible with the current hook ...)
If this is done an example plugin for templating can be released and designers can start working ;)
yes, i prefer the philosphie "every thing is a plugin" ;) this reduces management overhead.
In , the layout was moved from Dashboard/templates/index.tpl to Dashboard/Controller.php.
In a theme-able environment, it might make sense to move the layout into a separate view file (e.g., layout.tpl). This depends on whether the View factory hook idea will fly. Otherwise, we could always add a getDefaultLayout hook.
I think the normal way for theming will be to change the css and add some JS.
This will allow a maximum of compatibility.
In my opinion less then 5% of the users want to change the html structure, most of them just wanna customize the look - and adding custom css files will fit there needs.
What do you think about making a survey about this? - Just add a new message in the next piwik release which asks the user about feature whiches - and theming in special?
I agree with the general ideas proposed in the thread:
Increasing priority, one of the most requested features.
I just wanted to note that the non-html plugins like the charts or maps also are affected by theming. They're displaying labels and tooltips, and it should be able to customize those to the themes fonts and colors. Since flash widgets can't be styled via CSS in most cases, we have to think about some common properties for each theme, that can be inserted into PHP or templates.
Possible properties are:
This reminds me a bit of the theming of operating systems like windows.
To me, there are three options in dealing with these theme properties:
mhmm thats, why i asked to use extjs for the backend of piwik ....
kaystrobach, please take a look at piwik codebase. Moving to something like extjs is not something we will consider in the near future considering the large amount of code that would have to be rewritten.
greg, good points. Also one must have customization is the logo (replace Piwik logo in header + PDF reports).
I propose we add an ExampleTheme plugin, and add the following hooks:
If we then create a logo.tpl that other .tpl files can include, then a theme can substitute its own logo.tpl at runtime.
(PluginsManager.php already triggers the deletion of assets and compiled templates when plugins are activated/deactivated.)
as seen in the screenshot, putting piwik into a cms backend needs some more space. Is there any way to set the column count in the dashboard to 2?
Kay: The number of columns in the dashboard is intertwined with the default dashboard layout. Changing the logic behind it isn't something I plan to (nor do I think we should) change via theming.
In your case, the site selector/creator takes up a lot of screen real estate as a static pane. I would make it slide out when needed.
i didn't thought, that this should be done with a theme ;)
I thought that there could be an option in the config file. (I know a somehow likely option from netvibes - not a statistic tools, but a rss reader and dashboard).
I added an option to open the iframe in a new Ext.JS window with the size of the complete browser window. (Ext.JS is part of TYPO3 and so available for me ;'))
I'll create a new ticket for the dashboard enhancements.
Moving this to 1.2.
Maybe, to implement theming, we will have to reorganize assets in consistent folders: #1385
Ok, let's roll #1385 into this ticket. If we implements themes as plugins:
Updating ticket description with proposed implementation plan for the THEME feature in Piwik.
If you are a CSS designer, please post a comment here. we plan to build Themes as simple plugins that would return extra CSS to change colors and positions. Comment here if you'd like to build such a theme!
For discussion once the ball starts rolling on this feature:
My opinion is to make the theme's plugin override everything related to the View .. not only JS ans CSS .. templates also matter ... A simple graceful degradation will make a template override the core default one, otherwise the core is used ..
It looks simple and versatile
We are implementing Theming for Piwik 2.0! to achieve this, we have migrated to Twig, we are improving the CSS and templates, and making Theming the easiest possible (while allow full customization including graphs colors etc.). we also migrated to LESS #4052
Piwik 2 supports theming. Please use Piwik from GIT. Then go to Settings>Themes> and try enable PleineLune theme.
For help on how to create themes, see: https://github.com/piwik/piwik/tree/master/plugins/PleineLune#create-a-theme-for-piwik
We are looking forward to seeing your themes!
see follow up ticket (VERY exciting!!) #4127 New Default Theme for Piwik