-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build "theming" feature in Piwik. #5597
Comments
Hello, 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. |
hello guys, 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. |
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: german: http://t3n.de/magazin/wenigen-schritten-individuellen-blog-design-eigene-223037/ english: http://codex.wordpress.org/Theme_Development 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: |
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. yes, i prefer the philosphie "every thing is a plugin" ;) this reduces management overhead. |
In [1642], 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. 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:
Thoughts? |
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.) |
Attachment: XGA with Piwik in TYPO3 Backend |
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 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. |
Ticket already exists #1559. |
thanks |
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 |
The new ticket for Theming is #3942 |
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 |
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:
- Themes are implemented as “plugins”
- The theme feature in Piwik is a basic concept: CSS override
- A new hook allows a plugin to add extra CSS file (or simply return $css;). This CSS file would be loaded after all other CSS. This should allow for most theme desired changes? ie. margins, padding, float, colors, fonts, positions, can be changed.
- Some work / refactoring might be required on some CSS to make them all themable friendly?
- Building this feature would mostly involve building a custom CSS file override and modify existing Piwik CSS to make it possible / easier than current.
- See comments for other interesting concepts:
– Allow modifying colors of Javascript charts?
– Allow modifying colors of Charts in Email reports/Mobile app?
– Allow override of chosen TPL files? ALlow override of CSS files? Of whole JS files? I would say that it’s best not to allow any override in V1 to keep things simple… thoughts?
– Should we use a property definition mechanism to define all colors? See #comment:23
The text was updated successfully, but these errors were encountered: