News:

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

Main Menu

where to find theme development guide for 2.1?

Started by Ulibka, May 08, 2020, 12:29:22 PM

Previous topic - Next topic

Ulibka

I'm need some minimal adjustments to standart theme.
So, I'm need to load css and js

I'm see that there are new functions:
>>To load other CSS and JS files you should use the functions
>>loadCSSFile() and loadJavaScriptFile() respectively.

I'm download theme for 2.1 and see:
loadCSSFile('all.css'); calling at first string at template_init()

But in
template_html_above()
author wrote:
echo '   <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>;

Which is the right way to load my css and js for 2.1?

If I simply put index.css with some corrections - is it overwrite standart index.css from default theme ?

Diego Andrés

The right way is to use the functions because it's the best and easiest way, and allows you to choose how to load the file and if you want to include it in the minified version.

SMF Tricks - Free & Premium Responsive Themes for SMF.

Antes

use template_init to load your files via loadCSSFile() - loadJavaScriptFile() functions...

https://github.com/XinYenFon/Lunarfall/blob/master/Lunarfall/index.template.php#L45

-other ways of loading things are fine but not optimal-

Ulibka

Thank you very march for answer!

May be some theme development guide for 2.1 available?

Antes

There is literally none... not even the CSS is documented at this stage, I'm sorry... but if you have questions we can guide you tru it.

Arantor

Without being funny, if you need a guide for developing against 2.1 at this stage, you're not ready for developing against 2.1 - it's not finished, it's still subject to change and I'd *strongly* encourage only developers try to develop against it without needing things necessarily well explained because there's precious few people who are fluent in it and their time is better spent finishing 2.1.

Ulibka

OK, today for production forum I can use only 2.017 , not 2.1 ?

Arantor

What you *can* do and what you *should* do are two different things.

You *can* use 2.1 in production, if you like. But 2.1 is still in development, it still has known bugs, it still has things to be fixed - and if you adopt it before it is 'done', you are somewhat (though not entirely) on your own, on the understanding that you can do any necessary maintenance or development yourself.

If this is too large a barrier, use the stable 2.0.17 release.

shawnb61

From the 2.1 board:

Quote from: shawnb61 on November 01, 2019, 03:00:54 PM
A release candidate (RC) means that the SMF team feels the product is nearly ready for production.  We should be down to the last cycles of testing before an official release.

It is also important to note that between release candidates, SMF does not release update packages.

As a result of the above, those who adopt usage of a release candidate should:
- Expect to find bugs (and help us out by reporting bugs here: https://github.com/SimpleMachines/SMF2.1/issues)
- Be aware that as updates come out, you may need to apply the updates by hand

If you are not comfortable with the above, please wait until the product is formally released!

The fact that update packages aren't published is important.  Until 2.1 is in production, you need to rerun the upgrader periodically to get current DB/setting/data changes & fixes.  (Or, monitor GitHub closely & do them by hand, which frankly, isn't really feasible.)  You will lose customizations, etc., on upgrade. 
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Ulibka


Advertisement: