Programatically enabling a theme in Drupal 6

Unfortunately, there is no API way to programatically enable a theme in Drupal 6, therefore you have to use a direct query:

  db_query("UPDATE {system} SET status = 1 WHERE type = 'theme' and name = '%s'", $theme);
Jakub Suchý

Jakub is owner and founder of Dynamite Heads. Jakub is a member of Drupal Security Team and supports Czech Drupal community at Drupal.cz

Poslat nový komentář

  • Webové a e-mailové adresy jsou automaticky převedeny na odkazy.
  • Povolené HTML značky: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <h2> <h3> <h4> <tt>
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Řádky a odstavce se zalomí automaticky.

Více informací o možnostech formátování

CAPTCHA
Jsi robot?
Image CAPTCHA
Enter the characters shown in the image.