Mission missing

icekin - April 29, 2006 - 06:58
Project:Interlaced
Version:5.x-1.x-dev
Component:Miscellaneous
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review
Description

The mission does not show up. I think its missing within the .theme file. Since mission is a standard feature in Drupal, it should be implemented. I tried this on Drupal 4.7 RC 3.

#1

micah - May 20, 2006 - 03:00

I made the following changes in 4.7.0, and it seemed to work:

--- interlaced.theme.orig       2006-03-05 04:13:56.000000000 -0500
+++ interlaced.theme    2006-05-19 22:51:57.000000000 -0400
@@ -2,7 +2,7 @@
// $Id: interlaced.theme,v 1.23 2006/03/05 09:13:56 tdobes Exp $

function interlaced_features() {
-  return array('toggle_name', 'toggle_favicon');
+  return array('toggle_name', 'toggle_favicon', 'toggle_mission');
}

function interlaced_regions() {
@@ -92,6 +92,13 @@
     $output .= $tabs;
   }

+   if (drupal_is_front_page() && theme_get_setting('toggle_mission')) {
+    $mission = variable_get("site_mission","");
+    if ($mission != "") {
+      $output .= "\n<div id=\"mission\">" . $mission . "</div>\n";
+    }
+  }
+
   $output .= theme('help');

   $output .= theme('status_messages');

I then added a #mission section to the css file. I noticed that this theme favors class tags over id tags, so maybe this needs some work. Also, it appears that drupal_is_front_page() is new to 4.7, so earlier versions may need to use drupal_get_path_alias($_GET['q']) == variable_get('site_frontpage', 'node') instead. (Both versions of this were borrowed from phptemplate.)

#2

TDobes - May 20, 2006 - 03:08

If you could share some styling for the missing for each of the four styles, I'll be happy to add this feature.

#3

TDobes - May 20, 2006 - 03:09

err... styling for the MISSION (not missing)

The PHP is the easy part... for me, anyway.

#4

hunmonk - March 1, 2007 - 18:44

patches still welcome for this feature

#5

micah - January 11, 2008 - 17:50
Version:HEAD» 5.x-1.x-dev
Status:active» needs review

Revisiting this issue while (finally!) upgrading an old 4.7.x site that uses the interlaced theme to 5.x. Here's a patch against 5.x-1.x-dev that includes both the changes to interlaced.theme that I originally proposed, and to styles1.css that provides some simple theming to the mission statement.

Also, I changed the mission div from id to class to make it consistent with the rest of the theme.

AttachmentSize
interlaced-5.x-mission.patch 1.25 KB
 
 

Drupal is a registered trademark of Dries Buytaert.