| 1 |
<?php
|
| 2 |
// $ Id: $
|
| 3 |
|
| 4 |
if (theme_get_setting('default_logo')) {
|
| 5 |
$logo = 'img/front.jpg';
|
| 6 |
}
|
| 7 |
else {
|
| 8 |
$logo = $base_path . '/' . theme_get_setting('logo_path');
|
| 9 |
}
|
| 10 |
|
| 11 |
drupal_add_css(path_to_theme() . '/style.php?headimg=' . $logo, 'theme');
|
| 12 |
|
| 13 |
/**
|
| 14 |
* Initialize theme settings
|
| 15 |
*/
|
| 16 |
if (is_null(theme_get_setting('andreas00_primary_links_display_loc'))) {
|
| 17 |
global $theme_key;
|
| 18 |
|
| 19 |
/**
|
| 20 |
* The default values for the theme variables. Make sure $defaults exactly
|
| 21 |
* matches the $defaults in the theme-settings.php file.
|
| 22 |
*/
|
| 23 |
$defaults = array(
|
| 24 |
'andreas00_primary_links_display_loc' => 'sidebar',
|
| 25 |
);
|
| 26 |
|
| 27 |
// Save theme settings with the defaults
|
| 28 |
variable_set(
|
| 29 |
str_replace('/', '_', 'theme_'. $theme_key .'_settings'),
|
| 30 |
array_merge($defaults, theme_get_settings($theme_key))
|
| 31 |
);
|
| 32 |
// Force refresh of Drupal internals
|
| 33 |
theme_get_setting('', TRUE);
|
| 34 |
}
|
| 35 |
/**
|
| 36 |
* Return a themed marker, useful for marking new or updated
|
| 37 |
* content.
|
| 38 |
*
|
| 39 |
* @param $type
|
| 40 |
* Number representing the marker type to display
|
| 41 |
* @see MARK_NEW, MARK_UPDATED, MARK_READ
|
| 42 |
* @return
|
| 43 |
* A string containing the marker.
|
| 44 |
*/
|
| 45 |
function andreas00_mark($type = MARK_NEW) {
|
| 46 |
global $user;
|
| 47 |
if ($user->uid) {
|
| 48 |
if ($type == MARK_NEW) {
|
| 49 |
return ' <span class="marker">*'. t('new') .'*</span>';
|
| 50 |
}
|
| 51 |
else if ($type == MARK_UPDATED) {
|
| 52 |
return ' <span class="marker">*'. t('updated') .'*</span>';
|
| 53 |
}
|
| 54 |
}
|
| 55 |
}
|
| 56 |
|
| 57 |
function andreas00_menu_local_tasks() {
|
| 58 |
$output = '';
|
| 59 |
|
| 60 |
if ($primary = menu_primary_local_tasks()) {
|
| 61 |
$output .= '<h2>' . t('Actions') . '</h2>';
|
| 62 |
$output .= "<ul class=\"links primary-links avmenu\">\n". $primary ."</ul>\n";
|
| 63 |
}
|
| 64 |
// Don't handle secondary links
|
| 65 |
// if ($secondary = menu_secondary_local_tasks()) {
|
| 66 |
// $output .= "<ul class=\"tabs secondary\">\n". $secondary ."</ul>\n";
|
| 67 |
// }
|
| 68 |
|
| 69 |
return $output;
|
| 70 |
}
|