Updating extensions for Symphony 2.2
This is an open discussion with 10 replies, filed under General.
Search
Nice tips. Right on time …
Quick CSS tip: if you want to target Symphony versions pre- or post- 2.2, here is a solution.
The following means “pre-2.2”:
body > form <everything else>
The following means “post-2.2”
body > #wrapper <everything else>
I hope this is useful ;)
body > #wrapper
Can be even simpler (and more efficient) as:
#wrapper <everything else>
No need for greater specificity once you use an ID selector :-)
Doh, that’s the problem when you don’t double-check your own comments! Thanks ;)
No need for greater specificity once you use an ID selector :-)
Unless there’s a possibility for the existence of a #wrapper element in pre-2.2 just not as a direct descendant of the body element. I don’t know?
Unless there’s a possibility for the existence of a #wrapper element in pre-2.2 just not as a direct descendant of the body element. I don’t know?
Luckily not :) That’s why Nick is right.
One might consider a more “unique” name if using IDs. On my websites I would call this body-wrapper
. This reduces the risk that the same element will occur twice — in the case of the Symphony backend another wrapper
ID might for example be introduced by extensions.
in the case of the Symphony backend another wrapper ID might for example be introduced by extensions.
In my opinion, extensions should namespace their additions. Then it’s not a problem.
Yep I agree with Nils.
I agree: They should. :-)
Create an account or sign in to comment.
Symphony 2.2 is just around the corner, so now is the time for extension developers to update their code and test. If you’re an extension developer then you should:
Here are some common things to look out for when updating extensions for Symphony 2.2. These were the obvious ones that I had to perform multiple times with my set of code.
$this->_Parent->Database
replace withSymphony::Database()
$this->_Parent->Configuration
replace withSymphony::Configuration()
$this->_Parent->saveConfig
replace withSymphony::Engine()->saveConfig
$entry->_data['id']
, replace with$entry_>get('id')
foreach
on arrays (be sure to checkis_array(...)
first!)<span>
elements having the default grey background and passing, they’ll now need a class offrame
[extension_name].[section_of_backend].js
for exampleorder_entries.publish.css
Symphony.Context
JavaScript objectWhen you make your changes and release a new version, remember to:
extension.driver.php
You should also make sure you’ve read the following, which explains in full:
If you’re having problems, then ask away in this thread, or suggest a time and timezone and we can try and collaborate on IRC.
Let the commit wars commence :-)