Difference between revisions of "New Themes in JReviews 2.3"
Line 9: | Line 9: | ||
* Performance improvements | * Performance improvements | ||
* Design and layout improvements | * Design and layout improvements | ||
+ | * Simplification of GeoMaps integration and setup | ||
Like in the earlier versions if JReviews, '''Default Theme''' is the main theme which contains all required files, while '''Compact Theme''' and '''Dark Theme''' contain only modified files which override original files in the Default Theme. | Like in the earlier versions if JReviews, '''Default Theme''' is the main theme which contains all required files, while '''Compact Theme''' and '''Dark Theme''' contain only modified files which override original files in the Default Theme. | ||
− | |||
− | |||
− | |||
== Creating Custom Themes == | == Creating Custom Themes == | ||
Line 62: | Line 60: | ||
In fact, we included the <span style="color: blue">detail_tabs.thtml</span> (which contains some predefined tabs) into default theme, and the only thing you need to do to have the tabs is to enter "_tabs" theme suffix in the [[Theme Manager]] for categories where you want this file to be used. | In fact, we included the <span style="color: blue">detail_tabs.thtml</span> (which contains some predefined tabs) into default theme, and the only thing you need to do to have the tabs is to enter "_tabs" theme suffix in the [[Theme Manager]] for categories where you want this file to be used. | ||
+ | === Simplified GeoMaps integration === | ||
+ | It is not necessary to switch to the geomaps theme which is no longer available as an option. Instead you enable or disable maps in the Listing Types Manager for each listing type. If you are upgrading an existing JReviews installation, make sure you edit each listing type and save it again for the new settings to take effect. | ||
+ | |||
=== New layouts for Listings Module === | === New layouts for Listings Module === | ||
Revision as of 14:29, 6 May 2011
JReviews 2.3 comes with 3 new themes which replaced the old ones:
- Default Theme
- Compact Theme
- Dark Theme
Some of the main theme improvements:
- Easier to customize
- Performance improvements
- Design and layout improvements
- Simplification of GeoMaps integration and setup
Like in the earlier versions if JReviews, Default Theme is the main theme which contains all required files, while Compact Theme and Dark Theme contain only modified files which override original files in the Default Theme.
Contents
Creating Custom Themes
It is very important (for easier future upgrades) that you don't make modifications to the default themes, instead create your own theme folder and put your customized files there.
You should use JReviews Code Overrides and create the custom theme folder there.
A good example on how to create your own theme are the Compact and Dark themes. Both themes have a lot of changes, but they contain only several files.
It is no longer necessary to customize core css files, you can put all your css modifications into the new custom_styles.css file. The styles you add there will override the core styles. A great benefit of this solution is that you will not need to worry about changes in core css files when you upgrade JReviews.
To add your custom styles for JReviews pages, use custom_styles.css, and for custom styles for modules and community plugins use custom_styles_modules.css. These are the only css files you should have in your custom theme!
Examples
If you want the modify certain css style that exists in core theme.css, first copy that style into custom_styles.css and then make the modifications.
If you want to change the rating stars, you only need to define a different background image in your custom_styles.css. There are several sprite images for rating stars available:
By default, rating_stars.png is used. If you want to use different stars, just add this into your custom_styles.css:
.rating_star_user, .rating_star_editor , .rating_star_user div, .rating_star_editor div { background-image: url(images/rating_stars2.png); } /* rating form */ .ui-stars-star a { background-image: url(images/rating_stars2.png); }
Since you only override background image, you don't need to have other rating css attributes in your custom_styles.css. Background position and dimensions will be read from the default css file.
Other important changes in the new default theme
The theme file of the listing detail page (detail.thtml) contains much less code than before and it's easier to add tabs and other modifications.
In fact, we included the detail_tabs.thtml (which contains some predefined tabs) into default theme, and the only thing you need to do to have the tabs is to enter "_tabs" theme suffix in the Theme Manager for categories where you want this file to be used.
Simplified GeoMaps integration
It is not necessary to switch to the geomaps theme which is no longer available as an option. Instead you enable or disable maps in the Listing Types Manager for each listing type. If you are upgrading an existing JReviews installation, make sure you edit each listing type and save it again for the new settings to take effect.
New layouts for Listings Module
- Vertical list layout (useful for sidebar lists of listings):
To use this layout, enter "_vertical" as the Theme Suffix in the Listings Module parameters
- Slideshow layout:
To use this layout, enter "_slideshow" as the Theme Suffix in the Listings Module parameters.
Layouts in Compact Theme
If you select Compact Theme in JReviews configuration, the layouts for Listing Detail Page, Blogview and Tableview will be different than default:
- Listing detail page:
- Blogview list page:
- Tableview list page: