Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I was doing a little digging to Omega today and figured I'd help out a little with some stuff that's no missing, no longer needed, etc. Here's a patch, which I hope is helpful. Explanation coming shortly...
Comment | File | Size | Author |
---|---|---|---|
#7 | massive.patch | 165.36 KB | Jacine |
#2 | omega-tweaks.patch | 10.92 KB | Jacine |
omega-node.patch | 10.9 KB | Jacine |
Comments
Comment #1
JacineThis just needs to print whether $title does or not.
This stuff was missing. $action_links is a new thing. It prints the "Create new blog entry" link on /blog, for example.
This file wasn't being used. I did a bunch of changes in here, but mostly it comes down to using the $vars['classes_array'] instead of totally bypassing it. This is important to keep so that modules can hook in and add classes.
I added this because I'm not sure how married you are to using classes like .promoted vs. .node-promoted. It's probably best to use what core is providing now, since it's not so bad anymore, but obviously this is up to you :)
I removed the render_attributes() function and this here basically prepares the variables to use drupal_attributes() which is much better these days. Also, this code wasn't working because Drupal core now uses $vars['attributes'] for RDFa stuff and it was being overwritten. The process of flattening these classes actually happens in template_process().
I added this here, because I wasn't sure if it should be in process/process-node.inc or here.
Removed this because it's no longer necessary. Drupal's got two new functions drupal_html_id() and drupal_html_css() that take care of this fun stuff.
I wasn't sure if you left this out on purpose or not, but I added it back in case it was by accident. Looking at this code again, I just realized I forgot to actually return $output. Whoops.
I left this because I'm not sure if it's needed or not. I see you are calling this in the starter-kit version, and I'm really not sure what's going on with all that voodoo magic inheritance stuff.
Powered by Dreditor.
Anyways, I hope this is helpful (and not annoying). Sorry for the monster patch, just got started and kept going :P
I really like what you've done with this theme. I'm hoping to include it in the chapter I'm currently writing on D7...
Comment #2
Jacine...and here's the patch with breadcrumbs that actually print :P
Comment #3
himerus CreditAttribution: himerus commentedYou seriously rock!!! I will take a look at this on my sandbox, and get it committed today!
A lot of these things are some of those underlying items that I haven't had the time to investigate proper usage in Drupal 7 that were carry over from the D6 version and some of the great themes code was borrowed from.
Assuming everything works, I'm good with it all! And glad for the help!! (not annoying)
By chance will you be at D4D?? My new omega presentation is pretty awesome all on this D7 version, showing some of the amazing features that have been added for D7.
Comment #4
himerus CreditAttribution: himerus commentedThe changes have been committed and tagged in the 7.x-1.0-beta3 release.
Thanks for the patch, Jacine!!
Comment #5
JacineYay! I'm glad it was helpful ;)
I wont be at D4D, but I'll be here impatiently awaiting the video of your session :P
Comment #7
JacineHey there! Me again :)
I've been pounding away at Omega all day, doing some more clean up stuff. I hesitate to even post this patch because it's huge, and will most definitely be a pain in the ass to review, but it's honestly like 95% coding style clean up, with some other fixes sprinkled in between, and some documentation stuff, which is good.
Hopefully this explanation will help.
(function ($) {
to the beginning and})(jQuery);
to the end of each file, which is suggested to that the code doesn't conflict with other libraries other than jQuery. I also got rid of tabs and did some code style stuff in here, but changed nothing code wise.<?php if (!empty($admin)) print $admin; ?>
That's not needed anymore $page_top in html.tpl.php handles that stuff. Other than that, I just did coding style stuff (indenting, control structures, etc)Anyway, one step closer to perfection :D
PS - Patch is on DRUPAL-7--1
Comment #8
JacineOh, btw... From what I'm seeing, it doesn't look like the theme-settings.php or the hook_theme() is required in subthemes for things to work. I removed both from my subtheme and things are working just fine. You may already know this, but I figured I'd mention it just in case.
Comment #9
JacineChanging title.
Comment #10
himerus CreditAttribution: himerus commentedJacine,
You rock!!!
I'll test this out today, and make sure everything is still working as "expected".
I'm currently working on a very sexy subtheme of Omega for D7 that will really help adoption, and it'll be great for testing out the patch.
Thanks for looking/working on this!! There so much I still need to understand/figure out related to the D7 changes, and you've been a HUGE help in this!!
I'm sure everything is good here, and unless there's anything crazy going on, I'd expect this all in a new release very soon!
Comment #11
JacineYou're welcome :)
Thank YOU for being so far along with the D7 version already!
Comment #12
himerus CreditAttribution: himerus commentedOkay, this patch has been committed (with a few other minor updates) in the BETA5 release for D7.
There are still some minor things found by coder that are present, and I've just been putting off a lot of them in the past until I reached a more "stable" release. Zend studio seems to always do wonky things with spacing and tabs no matter what the settings. God forbid you want to indent a whole segment of code, it ignores the "spaces for tabs" setting(s).
This was working well in my own tests, and in sub-sub-sub themes everything seems to be good.
I think I've removed the hook_theme calls in most places. (I may have missed one somewhere as I was testing on many different themes)
I'm not sure on if I'd like to remove the theme-settings.php by default or not. Even though the default subthemes don't need it to function anymore and pull the appropriate theme settings from all parent themes, I do kind of like having it there for someone to quickly get going....
I'm kinda torn there, but see the benefit of removing it, AND leaving it in place with just the form alter structure pre defined for the subthemes created.
Comment #13
JacineAwesome! Damn you are fast... :D
As far as the theme-settings.php file is concerned, I would suggest leaving it and commenting out the contents like you do in the template.
Comment #14
himerus CreditAttribution: himerus commentedSounds like a good idea on the theme-settings.php.
Then the drush script (drush omega-subtheme "Subtheme Name") will still appropriately modify that file, and it will be there.
There is definitely a need (and on my list after everything is really "done" and the gamma subtheme is stable in the package) to really go through everything line by line, and reorganize, clean up, add/remove functions where needed, etc.
Thanks for your help on this!!
Hope your Theming chapter is coming along nicely!!!