[development] From Michelle: Request to themers.

Susan Stewart HedgeMage at binaryredneck.net
Sun Dec 16 02:42:46 UTC 2007

Michelle asked me to send this on for her, as her email is acting up.

-- Susan (HedgeMage)


  If you maintain a theme on drupal.org, please read this.

  The Advanced Forum module needs to hook into  _phptemplate_variables
  to work. I've done my best to minimize what needs to be merged by
  moving the bulk of it into a function. So all the user needs to add
  is this:

  if (module_exists('advanced_forum')) { $vars =
  advanced_forum_addvars($hook, $vars); }

  But even adding those three lines is hard for people who don't know
  anything about code. The problem is that  _phptemplate_variables
  varies from theme to theme. Some themes don't have it at all and some
  have rather complex functions. My readme says to put those lines at
  the very top, which will usually work. But then there's themes like
  Garland that stick the "return $vars;" inside the "page" case and
  return just "array()" for everything else! So then I have to explain
  that $vars needs to get returned for all cases. This gets to be a big
  support pain trying to help people make this work with every possible
  theme out there.

  So what would be really, really awesome for me and for any other
  module maintainer that needs to add to _phptemplate_variables is if
  the theme maintainers would be willing to always return $vars from
  the function even if you only use a particular case in there. I'm not
  aware of any problems with just returning the $vars that is passed in
  to the function to begin with so it shouldn't affect your themes any
  and will make life easier for your users that need to add to the

  Of course, if you want to be really super helpful to me, you could
  add the advanced forum call right to the themes so the user doesn't
  have to do any merging. But I realize that's a lot to ask. :)



More information about the development mailing list