если достаточно настроек от zen, то и велосипед изобретать не надо.
если надо добавить свои, то их очень просто добавить (см. $form['MYTHEME_example']).
...
base theme = zen
; Set the default settings to be used in theme-settings.php
settings[zen_block_editing] = 1
settings[zen_breadcrumb] = yes
settings[zen_breadcrumb_separator] = ' › '
settings[zen_breadcrumb_home] = 1
settings[zen_breadcrumb_trailing] = 1
settings[zen_breadcrumb_title] = 0
settings[zen_rebuild_registry] = 1
settings[zen_wireframes] = 0
...
theme-settings.php
<?php
// $Id: theme-settings.php,v 1.7 2008/09/11 09:36:50 johnalbin Exp $
// Include the definition of zen_settings() and zen_theme_get_default_settings().
include_once './' . drupal_get_path('theme', 'zen') . '/theme-settings.php';
/**
* Implementation of THEMEHOOK_settings() function.
*
* @param $saved_settings
* An array of saved settings for this theme.
* @return
* A form array.
*/
function MYTHEME_settings($saved_settings) {
// Get the default values from the .info file.
$defaults = zen_theme_get_default_settings('MYTHEME');
// Merge the saved variables and their default values.
$settings = array_merge($defaults, $saved_settings);
/*
* Create the form using Forms API: http://api.drupal.org/api/6
*/
$form = array();
/* -- Delete this line if you want to use this setting
$form['MYTHEME_example'] = array(
'#type' => 'checkbox',
'#title' => t('Use this sample setting'),
'#default_value' => $settings['MYTHEME_example'],
'#description' => t("This option doesn't do anything; it's just an example."),
);
// */
// Add the base theme's settings.
$form += zen_settings($saved_settings, $defaults);
// Remove some of the base theme's settings.
unset($form['themedev']['zen_layout']); // We don't need to select the base stylesheet.
// Return the form
return $form;
}
в результате имеете дополнительные настройки темы от zen
Спасибо, я уже был на вашем «февральском кэмпе».
Даже билеты имеются Владивосток-Москва-Владивосток.
Я лучше на Киевский съезжу. Как-то Ма-асквой меньше отдает.
у нас нотариусы упорно навязывают свои услуга по перепечатке доверенности в нужную форму с их подписями/росписями.
оно конечно все равно, но ценник за набор одной страницы плюс заверение — 1200р.
жлобы =)
'page arguments' => array('sendscreen_mainform');и элемент в hook_menu переписать так
$items['sendscreen'] = array( 'title' => t('Send screenshot'), 'page callback' => 'drupal_get_form', 'page arguments' => 'sendscreen_mainform' 'access arguments' => array('access content'), 'description' => t('Форма отправки скриншота'), 'type' => MENU_CALLBACK, );а в целом, не плохо, но надо проверить ;)
Как поставите, сразу все встанет на свои места ;)
почему невзлюбил-то? :)
нам с тобой достаются отличные нарезки ;)
все, что внутри, с легкостью перешивается на любой вкус.
Удачи ;)
…
я ставил цель сделать гибкую свою автономную тему
Как-то не вяжется ;)
если надо добавить свои, то их очень просто добавить (см. $form['MYTHEME_example']).
MYTHEME.info
theme-settings.php
<?php // $Id: theme-settings.php,v 1.7 2008/09/11 09:36:50 johnalbin Exp $ // Include the definition of zen_settings() and zen_theme_get_default_settings(). include_once './' . drupal_get_path('theme', 'zen') . '/theme-settings.php'; /** * Implementation of THEMEHOOK_settings() function. * * @param $saved_settings * An array of saved settings for this theme. * @return * A form array. */ function MYTHEME_settings($saved_settings) { // Get the default values from the .info file. $defaults = zen_theme_get_default_settings('MYTHEME'); // Merge the saved variables and their default values. $settings = array_merge($defaults, $saved_settings); /* * Create the form using Forms API: http://api.drupal.org/api/6 */ $form = array(); /* -- Delete this line if you want to use this setting $form['MYTHEME_example'] = array( '#type' => 'checkbox', '#title' => t('Use this sample setting'), '#default_value' => $settings['MYTHEME_example'], '#description' => t("This option doesn't do anything; it's just an example."), ); // */ // Add the base theme's settings. $form += zen_settings($saved_settings, $defaults); // Remove some of the base theme's settings. unset($form['themedev']['zen_layout']); // We don't need to select the base stylesheet. // Return the form return $form; }в результате имеете дополнительные настройки темы от zen
и будет Вам счастье ;)
Даже билеты имеются Владивосток-Москва-Владивосток.
Я лучше на Киевский съезжу. Как-то Ма-асквой меньше отдает.
хмм…
оно конечно все равно, но ценник за набор одной страницы плюс заверение — 1200р.
жлобы =)