Hello @ the maintainer!

Any chance of this module getting a port to D7?

Let me know! I'm not in a position to assist for the next couple months, but I thought I'd throw it out there on the floor for anyone to discuss.

Cheers!

Comments

imp7’s picture

This module is a gem for serious themers.

subscribe

mraichelson’s picture

subscribing

7wonders’s picture

Title: Drupal 7 Port » Style Stripper Drupal 7 Port

yes please

bgilhome’s picture

Status: Active » Needs review
StatusFileSize
new16.21 KB

Snap.

Here's a patch to port 6.x-1.0 to 7.x - necessary changes for db_query fetching, form API (though may be a little funky), and used hook_css_alter instead of preprocess_page. I also added a couple of changes: spelling typo ('administer stylestrippper' permission) and changed the (to me) misleading variable name 'stylestripper_enable_mode' to 'stylestripper_disable_mode' (set to 1 when "Checked CSS files are disabled" is checked).

Please review and post feedback.

EDIT: updated patch below.

bgilhome’s picture

Version: 6.x-1.x-dev » 6.x-1.0
StatusFileSize
new16.87 KB

Here's the updated patch - fix for hook_submit $theme argument:

andregriffin’s picture

any chance we could get a d7 dev branch pushed out?

andregriffin’s picture

When trying to edit the settings on the theme-level, I'm getting
"Fatal error: func_get_args(): Can't be used as a function parameter"

Edit: I believe it's because of #1411592: func_get_args() can't be used as a function parameter before PHP 5.3

Adjusted my LAMP stack to PHP5.3 and now I am getting this:
"Strict warning: Only variables should be passed by reference in stylestripper_admin_theme_settings()"

andregriffin’s picture

This is now fixed in 7.12. Any chance we could get a 7.x branch rolled out at least with a 7.12+ requirement?

aldenjacobs’s picture

Thanks Andre! Great work.

It seems to me that the maintainer may no longer be up to continuing administration. Shame there's no dev branch yet.

Ideas?

ergophobe’s picture

StatusFileSize
new9.88 KB

Despite what the 7.12 release notes say, I still get this error with 7.12.

It's simple to fix - func_get_args() has existed since PHP4, it just can't be passed as a function parameter. So all you need to do is add one line to assign the return values from func_get_args() to a variable and then pass that.

function stylestripper_admin_theme_settings() {
  $arg_list = func_get_args();
  return drupal_render(drupal_get_form('stylestripper_admin_theme_settings_form', $arg_list));
}

Current state of my git repository makes it a bit strange to issue another patch, but here's a version that works for PHP 5.2.13 and Drupal 7.12 as a tar.gz file (Drupal changes the name, so you may need to rename the file).

This is just the previous patch, applied, and then the one change mentioned above rolled in.

And thanks a bunch andregriffin for doing this - essential for simplifying things to solve a theming issue I'm having with Internet Explorer. Much appreciate your work.

andregriffin’s picture

Don't thank me, thank bgilhome and maintainer! And thank you!

Cauliflower’s picture

Damn, I've searched for a module that disables css files, but haven't found any, until know... But in the meantime during Frontent United 2012, I've made an alternative, the disable css files module. I think that the interface of this module is also easier (select modules and/or files per theme). Maybe we should join forces.

beltofte’s picture

Assigned: Unassigned » beltofte
Status: Needs review » Fixed

Have finally committed the initial version for Drupal 7. It's based on patches posted in this issue + some fixes and rewrite I did my self. Have tested everything and it seems stable :-) Will create a D7 release if nothing pops up the next week or so.

Thanks for the help everyone :-)

beltofte’s picture

Status: Fixed » Closed (fixed)

Decided to create the Drupal 7 release today anyway. So closing this issue :-)