News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

[2.1] Theme approval guidelines and recommendations

Started by Diego Andrés, December 15, 2013, 05:37:40 PM

Previous topic - Next topic

Diego Andrés

All themes submitted to the theme site will first go through a review process before they receive an approved status and are shown in searches. If a problem is found during the review, you will be asked to fix it before proceeding.
Below you'll find useful information to help you proceed.

Theme guidelines
Take some time to get acquainted with the guidelines outlined here. Your theme will have to comply with them.

Required folders
  • images: Images folder containing all images used by your theme. It should contain at least the same amount of files as the default SMF theme.
  • languages: This should contain at least a Settings.english.php file, which is where you can edit the description for your theme.
    You can include other language files for your theme here, but english should always be available.
  • css|scripts: These folders are required as the users could enable the option to Minimize CSS and JavaScript files, which expects the folders to be available, even if they are empty.

Required files
  • theme_info.xml: This file contains data about your theme. You can download a template below. (More about theme_info.xml)
  • license(.txt) or LICENSE: This file should contain license information for your theme, and/or any other licensed work you have used in your theme (e.g.: images). For help with choosing a license, see the wiki page on Customization Licenses and this topic. You can use any valid license you want to, or write your own license.
  • images/thumbnail.png: A preview thumbnail of your theme. Preferably, you should use the same size as the default thumbnail.
  • index.php: A copy of the default file.

Optional files
  • index.template.php: This is the backbone of your theme, it controls the main look & feel of the theme and it's containers.
  • languages/ThemeStrings.english.php: If you are using any custom strings and want them to be loaded on every page, these can be added here. This file will be automatically loaded for you once you set $settings['require_theme_strings'] = true; inside of the index.template.php file.



Packaging
And finally, once you have made your theme, time to package it! For the theme to install correctly, you should package only the root files and folders. Compress it into a .zip or .tar.gz file and it's ready to go. If you package is inside a main folder, your theme will not work.

To submit your theme, simply go to the theme site and post a new theme.

Others can help you too! Post here if you need support or help with your theme.
If you have any questions about the approval process or about the guidelines, you can also send a PM to the customization team.



Important links and information.

SMF Tricks - Free & Premium Responsive Themes for SMF.

Antechinus

Got a question about theme packaging. Normally you don't include extraneous files in a theme zip. However, it would be best to serve the CSS minified, for obvious reasons. The drawback with doing this in a custom theme is that obviously minified files are a PITA to work on, if you wish to make any changes.

The amount of commenting required to make the thing really easy to navigate for anyone unfamiliar with the file, or with CSS files in general, is quite substantial. That means I'm seriously considering packing up my next theme with minified CSS linked up by default, but with a subsidiary folder (../css/expanded) that contains fully formatted and commented files for anyone who wants to work on them.

If anyone just wants to download the theme and use it, it can run straight off the minified CSS and the expanded files would be surplus to requirements. OTOH, it doesn't seem sensible to make people download a separate package of expanded files. The amount of storage space they'll take on the server is negligible, so throwing them into a folder of their own inside the theme zip seems like the obvious option to me. They can include commented links to a few good online minification tools, so that even teh dreaded n00bz can hopefully minify their stuff once they have finished playing with it.

So question is: would the Customise Team be cool with this plan? :)

margarett

Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Antechinus

Yeah I thought so, but technically it is against current guidelines so I figured time to thrash it out.

I'm also playing with minifying the js. I already have hoverIntent and Superfish and minified into one file (keeping the file headers from each for licence requirements) and that works fine. I ran theme.js through a scruncher too and that is still fine, so it seems reasonable to bung that in with the other two. Hardly anyone ever edits theme.js, and it has to load at the top of index.template.php anyway.

I did try minifying script.js and that broke stuff, so I'll probably leave that one alone due to the complexity of testing it thoroughly.

Colin

"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

Antechinus

Ok, here's another one for you Purple Peeps. We're supposed to write custom theme markup that validates as XHTML Transitional. I can do that easily enough, but in some instances I specifically want to break validation.

The reason is that I want to include some of the WAI-ARIA stuff for better a11y. This stuff does not validate with an XHTML Transitional doctype. It will validate with an HTML 5 doctype, but frankly rewriting all of 2.0.x to validate as HTML 5 is too much work for one custom theme (even for me).

Even though the WAI-ARIA stuff doesn't validate as XHTML Transitional, it doesn't cause any problems with rendering or functionality, and is supported back to IE8 as well as in real browsers. Apart from the WAI-ARIA stuff, all other markup would validate (already does, of course).

Now obviously I could get fancy with javascript and insert the a11y stuff via js, so it was hidden from markup validation and it would all get a nice green stamp. That seems a bit bonkers to me though. I reckon it makes more sense to just throw it straight in the markup.

Wotcha reckon? :D

Kindred

I reckon that some exceptions to the standard rules can be accepted on a case by case basis. :D
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Gary

Heh, yeah.

I know the guidelines say to validate to XHTML Transitional, but as long as it validates to the doctype it's been given (HTML5 in this case) then that's fine.
Gary M. Gadsdon
Do NOT PM me unless I say so
War of the Simpsons
Bongo Comics Fan Forum
Youtube Let's Plays

^ YT is changing monetisation policy, help reach 1000 sub threshold.

gonencemlak.com.tr

I cheked for transitional as you are. It is looking validaded.  hxxp:gonencemlak.com.tr [nonactive] hasn't any problem. But for html5 trehe are some hxxp:problem.how [nonactive] we'll do?

Gary

You only need to validate to the Doctype you've given it, and for us, it only matters if you're submitting for the theme site, if your theme is exclusive to your site, we don't really care.
Gary M. Gadsdon
Do NOT PM me unless I say so
War of the Simpsons
Bongo Comics Fan Forum
Youtube Let's Plays

^ YT is changing monetisation policy, help reach 1000 sub threshold.

Dhayzon


Deaks

{dhayzon} just copy ThemeStrings.english.php and change the english to your language, then when opened you make the changes as required ... use other language files to get idea on how to lay it out.  Many themes have non english language files so see how they do it.  But please remember your themes default language must be english for it to be on Theme Site
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

Dhayzon


UFT

#13
Is all of this information still current?  I notice it hasn't been updated since 2014 - 4 years ago.


— long quote removed from reply
Vision without action is a daydream.  Action without vision is a nightmare.

Deaks

~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

UFT

Vision without action is a daydream.  Action without vision is a nightmare.

Advertisement: