I am looking for suggestions how to modify the Textimage Autoinsert module so I can limit it to work on only one or two themes.
I am looking for suggestions how to modify the Textimage Autoinsert module so I can limit it to work on only one or two themes.
Comments
Comment #1
danielb commentedI think you would have to change this function
and add an 'if test' like so:
If you figure out what condition to test for, let me know. I assume the theme name is available in $theme_registry, but if not you'll have to access some globals. You can find out what variables are available globally with get_defined_vars() I think it would be in $theme_path or $theme_info, etc...
It's a good idea for a feature to be able to choose this somewhere, I'll consider adding that one day, so lets leave this open as a feature request
Comment #2
TomMynd commentedHi,
this would be a nice feature. You can get the "theme_key" as a global variable and test for that:
the_theme_name would be the key/name of the theme.
The configuration could be inside the autoinserts preset. Choose for which themes this preset will be used. A link how to get all available themes for the select field: http://drupal.org/node/46961
When I got some time I will test it with my installation and will post the results here.
Comment #3
danielb commentedThis will be supported in the Dev version of this module. That also means you will need the Dev version of Textimage, because the current recommended release of Textimage is a year old and no longer compatible.
Comment #4
dltampa commentedThanks for your help on this guys. I am going to try this later this week. I will let you know how it goes.
Comment #5
TomMynd commentedHi,
I had the time to test it and it worked for me.
Best regards, Tom
Comment #6
dltampa commentedI was able to test it and it works. It's just what I needed. Thanks for the quick work. David