Tableselect-ben select - lehetséges?

f.sor képe

Nagy fába vágtam fejszémet...
Tableselect-be szeretnék select-t elhelyezni. Ezt sikerült is az alábbi módon megtennem - megjelenik, választható...Csak:
nem kapom vissza a kiválasztott értéket. Próbáltam #process-el elkapni az értéket, akkor a következőt kapom:
"Cannot use a scalar value as an array form_builder() függvényben (/var/www/d72/includes/form.inc 1803 sor)." és 1807 sorra ugyanezt.
ami ezt tartalmazza: $element['#processed'] = TRUE; és $element['#sorted'] = TRUE;

Drupal verzió: 
balazsgabi képe

zolinak:
elmásoltam, de csak az alsminket a zen-t nem. mikor a zen is likvidálva lett, akor "megláttam" ruha nélkül, de csak a következő kattintásig, aztán megint fatal error

itt vannak a kódok:

info:

; $Id: STARTERKIT.info.txt,v 1.1.2.3 2009/05/08 15:05:04 johnalbin Exp $
 
 
  ; The name and description of the theme used on the admin/build/themes page.
name        = LisztFerencAMI
description = Ezt a sminket <a href="http://balazsgabi.hu">balazsgabi</a> hozta létre egy ZEN 6.1 alapsminkből.
 
  ; The screenshot used on the admin/build/themes page.
screenshot = screenshot.png
 
  ; "core" specifies the version of Drupal that this theme is compatible with.
  ; "base theme" specifies that this is a theme that uses the "zen" theme as its
  ; base theme. Its unlikely you will ever need to change these, but they are
  ; required fields for a Zen sub-theme. The "engine" field is not used in a
  ; sub-theme since the engine is inherited from its base theme.
core       = 6.x
base theme = lisztferenc
 
  ; This section adds CSS files to your theme. The media type is specified in
  ; the brackets. Typical CSS media types include "all", "screen", "print", and
  ; "handheld". See http://www.w3.org/TR/CSS21/media.html#media-types for a full
  ; list of stylesheet media types in CSS 2.1.
  ;
  ; You can also override any of Zen's stylesheets or any module's stylesheets,
  ; an /extremely/ useful feature. See the excellent Drupal 6 Theme Guide at
  ; http://drupal.org/node/171209 for more details.
stylesheets[all][]   = layout.css
stylesheets[all][]   = html-elements.css
; stylesheets[all][] = tabs.css
; stylesheets[all][] = messages.css
; stylesheets[all][] = block-editing.css
; stylesheets[all][] = wireframes.css
stylesheets[all][]   = lisztferenc.css
stylesheets[print][] = print.css
  ; To prevent stylesheets of a base theme or of a module from being included in
  ; our sub-theme, we specify it in our .info file (and we don't need to have a
  ; stylesheet in our sub-theme with that name.) For example, we prevent the
  ; zen.css file in the base theme from being included by specifying it here.
stylesheets[all][]   = lisztferenc.css
 
  ; Set the conditional stylesheets that are processed by IE.
conditional-stylesheets[if IE][all][] = ie.css
 
  ; Optionally add some jquery scripts to your theme.
; scripts[] = script.js
 
  ; The regions defined in Zen's default page.tpl.php file.  The name in
  ; brackets is the name of the variable in the page.tpl.php file, (e.g.
  ; "[content_top]" in the .info file means there should be a $content_top
  ; variable in the page.tpl.php file.) The text after the equals sign is a
  ; descriptive text used on the admin/build/blocks page.
  ;
  ; To add a new region, copy Zen's page.tpl.php to your sub-theme's directory,
  ; add a line line to this file, and then add the new variable to your
  ; page.tpl.php template.
regions[left]           = left sidebar
regions[right]          = right sidebar
regions[navbar]         = navigation bar
regions[content_top]    = content top
regions[content_bottom] = content bottom
regions[header]         = header
regions[footer]         = footer
regions[closure_region] = closure
 
  ; Various page elements output by the theme can be toggled on and off. The
  ; "features" control which of these check boxes display on the
  ; admin/build/themes config page. This is useful for suppressing check boxes
  ; for elements not used by your sub-theme. To suppress a check box, omit the
  ; entry for it below. See the Drupal 6 Theme Guide for more info:
  ; http://drupal.org/node/171205#features
features[] = logo
features[] = name
features[] = slogan
features[] = mission
features[] = node_user_picture
features[] = comment_user_picture
features[] = search
features[] = favicon
features[] = primary_links
features[] = secondary_links
 
  ; 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

a template idevágó része (a többi kommentezve van, gondolom az nem kell):

function lisztferenc_theme(&$existing, $type, $theme, $path) {
  $hooks = zen_theme($existing, $type, $theme, $path);
  // Add your theme hooks like this:
  /*
  $hooks['hook_name_here'] = array( // Details go here );
  */
  // @TODO: Needs detailed comments. Patches welcome!
  return $hooks;
}

a theme-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 lisztferenc_settings($saved_settings) {
 
  // Get the default values from the .info file.
  $defaults = zen_theme_get_default_settings('lisztferenc');
 
  // 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['lisztferenc_example'] = array(
    '#type'          => 'checkbox',
    '#title'         => t('Use this sample setting'),
    '#default_value' => $settings['lisztferenc_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;
}

ezenkívül a db-ben hogyan lehet visszakapcsolni?
1est látok a Garlandnál, a lisztferenc-nél (ez lenne az alsminkem) és egy másik alsminknél, ami gondolom azért mert ezek voltak elérhetőek. A lisztferenc értékét 0-ra állítottam, de ugyanaz a szitu.

Mielőtt a másik alsminkre gyanakodnátok azzal az a helyzet, hogy hibátlanul fut vele élesben. Az úgy készült, hogy az info fájl lett módosítva, majd bemásolva egy "gyári" sminkbe. De mondom az megy az éles szerveren hiba nélkül.

A Zen-es alsmink azért kell, mert a jelenlegi színvilágával nincsenek kibékülve és gondoltam akkor kezdjük előröl a design kérdést.

0
0
Sk8erPeter képe

Meg is van, miért működik ez így, belenéztem a color.module fájlba (még soha nem követtem el ilyen gaztettet :D):

Itt van, hogy miért is kerül automatikusan felhasználásra a Color modul, miután átmásoltam a teljes color könyvtárat a Bartik theme-ből (ez a rész a fontos!). Egyik fontos rész magának a theme beállításainak az oldala, amit a modul megváltoztat:

  1. /**
  2.  * Implements hook_form_FORM_ID_alter().
  3.  */
  4. function color_form_system_theme_settings_alter(&$form, &$form_state) {
  5. if (isset($form_state['build_info']['args'][0]) && ($theme = $form_state['build_info']['args'][0]) && color_get_info($theme) && function_exists('gd_info')) {
  6. $form['color'] = array(
  7. '#type' => 'fieldset',
  8. '#title' => t('Color scheme'),
  9. '#weight' => -1,
  10. '#attributes' => array('id' => 'color_scheme_form'),
  11. '#theme' => 'color_scheme_form',
  12. );
  13. $form['color'] += color_scheme_form($form, $form_state, $theme);
  14. $form['#validate'][] = 'color_scheme_form_validate';
  15. $form['#submit'][] = 'color_scheme_form_submit';
  16. }
  17. }

A color_get_info($theme) függvényhívás különösen fontos. Az pedig így néz ki:

  1. /**
  2.  * Retrieves the Color module information for a particular theme.
  3.  */
  4. function color_get_info($theme) {
  5. static $theme_info = array();
  6.  
  7. if (isset($theme_info[$theme])) {
  8. return $theme_info[$theme];
  9. }
  10.  
  11. $path = drupal_get_path('theme', $theme);
  12. $file = DRUPAL_ROOT . '/' . $path . '/color/color.inc';
  13. if ($path && file_exists($file)) {
  14. include $file;
  15. $theme_info[$theme] = $info;
  16. return $info;
  17. }
  18. }

Magyarul azt csekkolja, hogy létezik-e mondjuk a sites/all/themes/én_bartik_alsminkem_neve/color/color.inc fájl, ha igen, akkor include-olja is; ebben pedig az aktuális theme-hez tartozó fontos régióinformációk is benne vannak. FONTOS tehát, hogy az itt szereplő régiónevek megegyezzenek az én_bartik_alsminkem_neve.info fájlban szereplőkkel! Így fog megfelelően működni.
Ezért volt jó tehát, hogy átmásoltam egy az egyben a .info fájlban szereplő régiókat, és a color könyvtárat is úgy, ahogy van.
Ha megváltoztattam volna bármilyen régiót a .info fájlban, akkor a theme-hez tartozó color.inc fájlban lévő régiókat is meg kellett volna változtatnom ennek megfelelően.

2
0
tiburi képe

Hú, köszi.
Érdekes amúgy, mert nálam a tag-ek elemek között vannak (nyilván mindebn tagre ugyanazzal a class-el), így nem műxik a dolog. A views-ban pedig a "Customize field HTML" HTML element-jeiben , ,

, adható meg. Gondolom itt kéne a

  • felsoroló opció, ami nem szerepel lehetőségként.

    Talán a Views FORMAT-ban kéne megadnom hogy HTML elements (list), ami nem jöhet szóba, mert egy spéci fluid grid nézet van belőve és a stílus-megjelenítések arra vannak konfigurálva.

    A stackexchange.com oldalon láttam ugyanezt a kérdést és ott a context modult ajánlják, amit nem szívesen lőnék most be, mert ha tudom, akkor az egész szájtot context modullal konfigurálom már az elején.

    Itt van még egy leírás, ebben az esetben a template.php-ba javasolt az alábbi kód beillesztése:

    1. function mytheme_preprocess_html(&$variables) {
    2. if(arg(0)=='node' && is_numeric(arg(1))) {
    3. $node = node_load(arg(1));
    4. $results = _mytheme_taxonomy_node_get_terms($node);
    5. if(is_array($results)) {
    6. foreach ($results as $item) {
    7. $variables['classes_array'][] = "taxonomy-".strtolower(drupal_clean_css_identifier($item->name));
    8. }
    9. }
    10. }
    11. }
    12.  
    13. function _mytheme_taxonomy_node_get_terms($node, $key = 'tid') {
    14. static $terms;
    15. if (!isset($terms[$node->vid][$key])) {
    16. $query = db_select('taxonomy_index', 'r');
    17. $t_alias = $query->join('taxonomy_term_data', 't', 'r.tid = t.tid');
    18. $v_alias = $query->join('taxonomy_vocabulary', 'v', 't.vid = v.vid');
    19. $query->fields( $t_alias );
    20. $query->condition("r.nid", $node->nid);
    21. $result = $query->execute();
    22. $terms[$node->vid][$key] = array();
    23. foreach ($result as $term) {
    24. $terms[$node->vid][$key][$term->$key] = $term;
    25. }
    26. }
    27. return $terms[$node->vid][$key];
    28. }

    Ez pedig a CSS beállítás hozzá példának:

    1. .taxonomy-term-1 .main-container h2, .taxonomy-term-1 .navbar .nav li.expanded.active-trail a,
    2. .taxonomy-term-2 .main-container h2, .taxonomy-term-2 .navbar .nav li.expanded.active-trail a,
    3. .taxonomy-term-3 .main-container h2, .taxonomy-term-3 .navbar .nav li.expanded.active-trail a{
    4. color: #FFFFFF;
    5. }

    Itt csak az nem tiszta, hogy pontosan hova is kell tenni a kódot? A template.php-be téve elszáll (mytheme rész átírása mellett) az oldal.
    Próbáltam a preprocess_functions.inc fájllal is, de ugyanúgy elszáll..

  • 0
    0

    Milyen beállítással van gond?

    Anonymous képe

    Nem egészen értem ezt a hibaüzenetet: a www.xxx.hu (csak példacím) alatt van egy informaciospont.xxx.hu oldal, külön-külön drupal felmásolva, külön táblákkal (infopont prefix).
    A www.xxx.hu alatt nincs ilyen gond, az informaciospont.xxx.hu alatt a beállításoknál ezzel jön vissza:

        * warning: fopen() [function.fopen]: SAFE MODE Restriction in effect. The script whose uid is 10087 is not allowed to access 
    .../xxx.hu/subdomains/informaciospont/httpdocs/files owned by uid 30 in /xxx.hu/subdomains/informaciospont/httpdocs/includes/file.inc on line 116.
        * warning: fopen(files/.htaccess) [function.fopen]: failed to open stream: Success in /xxx.hu/subdomains/informaciospont/httpdocs/includes/file.inc on line 116.

    Modulok kicserélése utáni krach?

    kispi92 képe

    Na már megint én! folyamatosan egymást követik nálam a problémák.... :(

    Most éppen bedöglött a gondosan kialakított drupal 6.9-esem. Ez akkor következett be, amikor megpróbáltam néhány előzőleg föltett modult (dev-es verziókat) korábbi másikokra lecserélni, és most kaptam egy teljes összeomlást ajándékba.

    Ez az üzenet fogad most a localon... Na ezzel most mégis mit lehetne tenni??? Ha ugyan van még rá gyógymód!? :o

    views_pre_render

    zsuffad képe

    Sziasztok,

    Következőben kérnék egy kis segítséget, iránymutatást:

    Adott egy nézetben egy block display ami egy honap listát general, mint az archivum nevű nézetben.

    2010 januar
    2010 februar
    ..stb

    A gondom, hogy a linkek a listában a főoldalra mutatnak ["/"], ezt szeretnem módosítani.

    Eddig jutottam:

    Drupal verzió: 
    Melyik modulhoz, modulokhoz kapcsolódik a téma?: 

    checkbox csak olvashatóvá (d6)

    aruna képe

    Sziasztok!

    Már nézegetem egy ideje a neten, de nincs több időm próbálgatni, hátha tudja valaki kapásból.

    Ezen cikk alapján indultam el:

    http://www.silviogutierrez.com/blog/making-cck-fields-read-only-drupal-6/

    Drupal verzió: