Search Results

Search found 1740 results on 70 pages for 'drupal theming'.

Page 3/70 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Drupal views pane content not visible

    - by jwandborg
    I have a pane on my front page with one content pane and two views panes. I can't see the content of the third view ($pane->pid = "new-3" / comment: # Senaste bilder). Here's my panel <?php $page = new stdClass; $page->disabled = FALSE; /* Edit this to true to make a default page disabled initially */ $page->api_version = 1; $page->name = 'frontpage'; $page->task = 'page'; $page->admin_title = 'Startsida'; $page->admin_description = ''; $page->path = 'hem'; $page->access = array(); $page->menu = array(); $page->arguments = array(); $page->conf = array(); $page->default_handlers = array(); $handler = new stdClass; $handler->disabled = FALSE; /* Edit this to true to make a default handler disabled initially */ $handler->api_version = 1; $handler->name = 'page_frontpage_panel_context'; $handler->task = 'page'; $handler->subtask = 'frontpage'; $handler->handler = 'panel_context'; $handler->weight = 0; $handler->conf = array( 'title' => 'Panel', 'no_blocks' => FALSE, 'css_id' => '', 'css' => '', 'contexts' => array(), 'relationships' => array(), ); $display = new panels_display; $display->layout = 'onecol'; $display->layout_settings = array(); $display->panel_settings = array(); $display->cache = array(); $display->title = ''; $display->content = array(); $display->panels = array(); # Bild $pane = new stdClass; $pane->pid = 'new-1'; $pane->panel = 'middle'; $pane->type = 'custom'; $pane->subtype = 'custom'; $pane->shown = TRUE; $pane->access = array(); $pane->configuration = array( 'admin_title' => '', 'title' => '', 'body' => '<img src="/sites/all/themes/zen/ils-2010/img/graphics-start-text-v3.png" alt="Hej! Vi vet att du och dina klasskompisar har mycket att tänka på under er sista termin i gymnasiet. Därför har vi samlat några saker som vi tror kommer göra er studenttid lite roligare och lite enklare. Välkommen!" />', 'format' => '2', 'substitute' => TRUE, ); $pane->cache = array(); $pane->style = array(); $pane->css = array(); $pane->extras = array(); $pane->position = 0; $display->content['new-1'] = $pane; $display->panels['middle'][0] = 'new-1'; # Topplista $pane = new stdClass; $pane->pid = 'new-2'; $pane->panel = 'middle'; $pane->type = 'views_panes'; $pane->subtype = 'topplista_terms-panel_pane_1'; $pane->shown = TRUE; $pane->access = array(); $pane->configuration = array( 'link_to_view' => 1, 'more_link' => 0, 'use_pager' => 0, 'pager_id' => '', 'items_per_page' => '10', 'offset' => '0', 'path' => 'flaktavling/topplista/klasser', 'override_title' => 0, 'override_title_text' => '', ); $pane->cache = array(); $pane->style = array(); $pane->css = array(); $pane->extras = array(); $pane->position = 1; $display->content['new-2'] = $pane; $display->panels['middle'][1] = 'new-2'; # Senaste bilder $pane = new stdClass; $pane->pid = 'new-3'; $pane->panel = 'middle'; $pane->type = 'views_panes'; $pane->subtype = 'senaste_bilderna-panel_pane_1'; $pane->shown = TRUE; $pane->access = array(); $pane->configuration = array( 'link_to_view' => 0, 'more_link' => 0, 'use_pager' => 0, 'pager_id' => '', 'items_per_page' => '2', 'offset' => '0', 'path' => 'galleri/senaste-bilder', 'override_title' => 0, 'override_title_text' => '', ); $pane->cache = array(); $pane->style = array(); $pane->css = array( 'css_id' => 'pane-senaste-bilderna', 'css_class' => '', ); $pane->extras = array(); $pane->position = 2; $display->content['new-3'] = $pane; $display->panels['middle'][2] = 'new-3'; $display->hide_title = PANELS_TITLE_FIXED; $display->title_pane = 'new-1'; $handler->conf['display'] = $display; $page->default_handlers[$handler->name] = $handler; Here´s the view senaste_bilderna <?php $view = new view; $view->name = 'senaste_bilderna'; $view->description = ''; $view->tag = ''; $view->view_php = ''; $view->base_table = 'node'; $view->is_cacheable = FALSE; $view->api_version = 2; $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ $handler = $view->new_display('default', 'Förvalt', 'default'); $handler->override_option('fields', array( 'field_picture_fid' => array( 'id' => 'field_picture_fid', 'table' => 'node_data_field_picture', 'field' => 'field_picture_fid', ), )); $handler->override_option('sorts', array( 'created' => array( 'order' => 'DESC', 'granularity' => 'second', 'id' => 'created', 'table' => 'node', 'field' => 'created', 'relationship' => 'none', ), )); $handler->override_option('filters', array( 'type' => array( 'operator' => 'in', 'value' => array( 'ils_picture' => 'ils_picture', ), 'group' => '0', 'exposed' => FALSE, 'expose' => array( 'operator' => FALSE, 'label' => '', ), 'id' => 'type', 'table' => 'node', 'field' => 'type', 'override' => array( 'button' => 'Åsidosätt', ), 'relationship' => 'none', ), )); $handler->override_option('access', array( 'type' => 'none', )); $handler->override_option('cache', array( 'type' => 'none', )); $handler->override_option('title', 'Senaste bilderna från galleriet'); $handler->override_option('items_per_page', 2); $handler->override_option('row_options', array( 'inline' => array( 'field_picture_fid' => 'field_picture_fid', ), 'separator' => '', 'hide_empty' => 0, )); $handler = $view->new_display('panel_pane', 'Content pane', 'panel_pane_1'); $handler->override_option('pane_title', ''); $handler->override_option('pane_description', ''); $handler->override_option('pane_category', array( 'name' => 'View panes', 'weight' => 0, )); $handler->override_option('allow', array( 'use_pager' => FALSE, 'items_per_page' => FALSE, 'offset' => FALSE, 'link_to_view' => FALSE, 'more_link' => FALSE, 'path_override' => FALSE, 'title_override' => FALSE, 'exposed_form' => FALSE, )); $handler->override_option('argument_input', array()); $handler->override_option('link_to_view', 0); $handler->override_option('inherit_panels_path', 0); $handler = $view->new_display('page', 'Sida', 'page_1'); $handler->override_option('path', 'galleri/senaste-bilderna'); $handler->override_option('menu', array( 'type' => 'none', 'title' => '', 'description' => '', 'weight' => 0, 'name' => 'navigation', )); $handler->override_option('tab_options', array( 'type' => 'none', 'title' => '', 'description' => '', 'weight' => 0, )); I have edited one views template, here's the code in the file views-view-fields--senaste-bilderna.tpl.php <?php // $Id: views-view-fields.tpl.php,v 1.6 2008/09/24 22:48:21 merlinofchaos Exp $ /** * @file views-view-fields.tpl.php * Default simple view template to all the fields as a row. * * - $view: The view in use. * - $fields: an array of $field objects. Each one contains: * - $field->content: The output of the field. * - $field->raw: The raw data for the field, if it exists. This is NOT output safe. * - $field->class: The safe class id to use. * - $field->handler: The Views field handler object controlling this field. Do not use * var_export to dump this object, as it can't handle the recursion. * - $field->inline: Whether or not the field should be inline. * - $field->inline_html: either div or span based on the above flag. * - $field->separator: an optional separator that may appear before a field. * - $row: The raw result object from the query, with all data it fetched. * * @ingroup views_templates */ ?> <?php foreach ($fields as $id => $field): ?> <?php $result = db_query('SELECT * FROM {files} WHERE fid = ' . $row->node_data_field_picture_field_picture_fid ); ?> <?php $data = db_fetch_object( $result ); ?> <div id="senaste-bilderna-first"><img src="<?= imagecache_create_url('senaste_bilderna_thumbnail', $data->filepath) ?>" alt="" /></div> <?php /* if (!empty($field->separator)): <?php print $field->separator; <?php endif; <<?php print $field->inline_html; class="views-field-<?php print $field->class; "> <?php if ($field->label): <label class="views-label-<?php print $field->class; "> <?php print $field->label; : </label> <?php endif; <?php // $field->element_type is either SPAN or DIV depending upon whether or not // the field is a 'block' element type or 'inline' element type. <<?php print $field->element_type; class="field-content"><?php print $field->content; </<?php print $field->element_type; > </<?php print $field->inline_html;> <?php*/ endforeach; ?> This is the result <div class="panel-separator"> </div> <div class="panel-pane pane-views-panes pane-senaste-bilderna-panel-pane-1" id="pane-senaste-bilderna"> <h2 class="pane-title">Senaste bilderna från galleriet </h2> <div class="pane-content"> <div class="view view-senaste-bilderna view-id-senaste_bilderna view-display-id-panel_pane_1 view-dom-id-2"> <div class="view-content"> <div class="views-row views-row-1 views-row-odd views-row-first"> </div> <div class="views-row views-row-2 views-row-even views-row-last"> </div> </div> </div> </div> </div> My Drupal version is 6.16

    Read the article

  • drupal - override form action?

    - by n00b0101
    I originally started this question in another thread, but that thread was sorta, kinda answered, and now I primarily want to know how to specify another form action... I tried using the code below, but the form action, when output, remains unchanged, although looking at the print_r($form), it's correctly changed... Why isn't it picking up? function mytheme_user_profile_form($form) { global $user; $uid = $user->uid; //print '<pre>'; print_r($form); print '</pre>'; $category = $form['_category']['#value']; switch($category) { case 'account': $form['#action'] = '/user/'.$uid.'/edit?destination=user/'.$uid; break; case 'education': $form['#action'] = '/user/'.$uid.'/edit/education?destination=user/'.$uid; break; case 'experience': $form['#action'] = '/user/'.$uid.'/edit/experience?destination=user/'.$uid; break; case 'publications': $form['#action'] = '/user/'.$uid.'/edit/publications?destination=user/'.$uid; break; case 'conflicts': $form['#action'] = '/user/'.$uid.'/edit/conflicts?destination=user/'.$uid; break; } //print '<pre>'; print_r($form); print '</pre>'; //print $form['#action']; $output .= drupal_render($form); return $output;

    Read the article

  • Drupal image management

    - by vian
    Please suggest how should I approach these requirements. What ready-to-use solutions (modules) are best suited to achieve something like this: What I need is an image library that has searchable, tagged images that are already resized when we publish them. If the author searches the library and the image he needs isn’t there, he can upload one and have it added to the index. The important thing is that images in the library can be sorted into three categories: News images, top story images and feature images so that, over time, we don’t end up with hundreds of images crammed into one folder, thus making browsing a pain (and to prevent someone from something like: Searching for a keyword so they can find an image for the news, picking an image, and then seeing it’s 1600X. 1200). Also, I need something which will assemble thumbnail galleries easily. I don’t want to have to go to the image library, get a URL, go back, paste it in, etc. I should be able to pick, say, 8 images and say “create gallery”. How this objective is achieved is flexible, but I am looking for a shortcut to get around assembling screenshot galleries by hand.

    Read the article

  • Error after installing Classified Ad Module on Drupal 7

    - by Ams
    Hello, i just installed Classified Ad but after the installation i get this error: Notice: Undefined index: type in ed_classified_form_alter() (line 218 of /home3/amineamm/public_html/chrini/sites/all/modules/ed_classified/ed_classified.module). When i look up at the php code i can't figure out how to correct it. Here is my code: function ed_classified_form_alter(&$form, $form_state, $form_id) { module_load_include('inc', 'ed_classified', 'ed_classified_utils'); if ($form['type']['#value'] == EDI_CLASSIFIED_MODULE_NAME) { if ($form_id == 'ed_classified_node_form' && $form['attachments'] && _ed_classified_variable_get('alter_attachment_text', EDI_CLASSIFIED_VAR_DEF_ALTER_ATTACHMENT_TEXT) ) { // Don't allow the attachments block to be collapsed. $form['attachments']['#collapsed']=FALSE; $form['attachments']['#collapsible']=FALSE; // Enhance the help for classified ads. // NOTE: this is appropriate for the upload_image module enhancements only! $form['attachments']['#title']=t('Photo Attachments'); $form['attachments']['#description']= _ed_classified_variable_get('alter_attachment_text_description', t(EDI_CLASSIFIED_VAR_DEF_ALTER_ATTACHMENT_TEXT_DESCRIPTION)); } } } Any suggestion ?

    Read the article

  • Default values for Content Taxonomy fields in Drupal with Hierarchical Select widget

    - by lazysoundsystem
    I'm trying to set the default value for a Content Taxonomy field in a hook_form_alter, but can't pin down the necessary format. I've tried this and many variations: foreach (element_children($form) as $child) { // Set $default_value. if ($form[$child]['tids']) { // This, for Content Taxonomy fields, isn't working: $form[$child]['tids']['#default_value'] = array('value' => $default_value); dsm($form[$child]['tids']['#default_value']); } else { // This, for other fields, is working: $form[$child][0]['#default_value']['value'] = $default_value; } } Can anyone tell me what I'm missing? Edit: In response to Henrik Opel (thanks for getting involved), here is the print out of the relevant field of the form with my changes to the default fields commented out, showing the '#default_value' field I'm trying to influence. It also shows that the option widget I'm using is Hierarchical Select (could this be a factor?). In the dsm() in the code above, the changes to the default value are recognised, but they don't get processed later on. field_name_of_content_taxonomy_field (Array, 3 elements) #tree (Boolean) TRUE #weight (String, 1 characters ) 5 tids (Array, 7 elements) #title (String, 10 characters ) Vocabulary_name #type (String, 19 characters ) hierarchical_select #weight (String, 1 characters ) 5 #config (Array, 15 elements) // 15 elements here #required (String, 1 characters ) 0 #description (String, 0 characters ) #default_value (Array, 0 elements)

    Read the article

  • Drupal: Views titles

    - by stef
    I have a View that outputs a page. Under Basic Settings I set a "title". When I load the page, I see that title as the page title (at top of the browser) - all good. How can I print this value out in the "Display output" .tpl file? The $title variable doesn't seem to hold any value here. Do I need to use a preprocess function? Thanks

    Read the article

  • form layout in drupal from a module

    - by EricP
    I created my own module called "cssswitch". I'm trying to create my own html layout to display the admin form portion of the module. I understand how to use the hook_form_alter() to modify form elements, but I need to create the entire form layout to make some fields appear next to each other. It seems I need something like the way I have the frontend view of the node displayed with theme_cssswitch_display(), but for the admin part of the node. function cssswitch_form_alter(&$form, $form_state, $form_id) { switch($form_id) { case 'cssswitch_node_form': $form['hour_start']['#prefix'] = '<div class="start-box">'; $form['ampm_start']['#suffix'] = '</div>'; $form['ampm_start']['#attributes'] = array("style" => "border-width:2px;"); break; } } function cssswitch_theme() { return array( 'cssswitch_display' => array( 'arguments' => array('node'), ), ); } // to display the view of the node function theme_cssswitch_display($node) { $output = '<div class="cssswitch-cssfilename">Filename: '. check_plain($node->cssfilename). '</div>'; $output .= '<div class="cssswitch-time_start">Start: '. check_plain($node->hour_start). ':'.check_plain($node->minute_start).' '.check_plain($node->ampm_start).'</div>'; $output .= '<div class="cssswitch-time_end">End: '. check_plain($node->hour_end). ':'.check_plain($node->minute_end).' '.check_plain($node->ampm_end).'</div>'; return $output; } thanks for any help

    Read the article

  • Drupal Views api, add simple argument handler

    - by LanguaFlash
    Background: I have a complex search form that stores the query and it's hash in a cache. Once the cache is set, I redirect to something like /searchresults/e6c86fadc7e4b7a2d068932efc9cc358 where that big long string on the end is the md5 hash of my query. I need to make a new argument for views to know what the hash is good for. The reason for all this hastle is because my original search form is way to complex and has way to many arguments to consider putting them all into the path and expecting to do the filtering with the normal views arguments. Now for my question. I have been reading views 2 documentation but not figuring out how to accomplish this custom argument. It doesn't seem to me like this should be as hard as it seems to me like it must be. Leaving aside any knowledge of the veiws api, it would seem that all I need is a callback function that will take the argument from the path as it's only argument and return a list of node id's to filter to. Can anyone point me to a solution or give me some example code? Thanks for your help! You guys are great. PS. I am pretty sure that my design is the best I can come up with, lets don't get off my question and into cross checking my design logic if we can help it.

    Read the article

  • Drupal Private Publishing

    - by Kevin
    Is there a way to have a content type that is only viewable to admins AND the person who created it, including comments? I feel like I know the answer to this but its escaping me.

    Read the article

  • Drupal Studs help me with my form_alter hook ( I am almost there)

    - by user363036
    So I think I am almost there conceptually but need some missing pointers. Objective is to add a few more fields to the normal user registration form, style it a little, then submit it with storing the extra fields in a table. This is what I have so far. Can someone give me the final nudge and get me going. Please help me. Also how do I apply some minor styling like aligning the new form fields ? Thank you so much !!!!!!!!! function module_menu() { $items = array(); $items['school/registration'] = array( 'title' = 'Upgraded Registration Form', 'page callback' ='module_school_register', 'type' = MENU_CALLBACK ); return $items; }//end of the function function module_school_register(){ return drupal_get_form('form_school_register'); }//end of the function function module_school_form_alter(&$form, $form_state, $form_id) { dsm($form_id); if ($form_id == 'user_registration_form') { // modify the "#submit" form property by prepending another submit handler array $form['#submit'] = array_merge( array('_module_registration_submit' = array()), $form['#submit'] ); } } function _module_registration_submit($form_id, $form_values) { // store extra data in different table } function module_registration_validate($form, &$form_state) { $error=0; //Validation stuff here, set $error to true if something went wrong, or however u want to do this. Completely up to u in how u set errors. if ($error) { form_set_error('new_field_name', 'AHH SOMETHING WRONG!'); } }

    Read the article

  • Drupal cck and views

    - by abhishekgupta92
    I have added a new content type event. Now, i have to make a view in which it shows a set of fields if the dateOfEvent (one of the fields) is less than the present date and some other set of fields of the 'event' content if the dateOfEvent is more than the present date. how can I do that in the views.. thanks in advance for helping...

    Read the article

  • A question about Drupal Node and Views

    - by Sushi
    I have created an "Add Question" content-type node which lets users ask questions. The questions have a title, image attachment option, and the content. I am showing the questions which have image as a block by filtering it as "Content: Photofield - list True" in Views. This way, only the questions which have images attached to the question appear in this block. Photofield by the way is the content type. I want to create a new block which only shows the questions which have no attached image. I have done filtering this block view by keeping filters as "Content: Photofield - list False" but in vain. There's also some expose option and I did some messing around with it too without coming to the result I want. Can anyone help?

    Read the article

  • Drupal: can't add the taxonomy field to Views ?

    - by Patrick
    hi, I've prepared a View for my nodes and I've selected which fields to display. I just realized that there is not the taxonomy field from Content:Taxonomy There is only Taxonomy:Term category and warning: "The content might be duplicated, use appropriate filters". Should I use this item ? What kind of filters should I use ? thanks

    Read the article

  • Drupal Theming and custom variables in custom pages

    - by GaxZE
    hello, I have created a custom page which sits at site.com/user/me/soe now im trying to theme this page and have created a subsequent template file. however if i copy in any basic html into my template file, all it does is produce a white page with my text and abandons the sites structure i originally had. i was hoping somebody could help me understand preprocessing as i feel that is the way to solve this.

    Read the article

  • How do I theme Form API buttons in Drupal?

    - by larssg
    The default output from Drupal's Form API is: <input id="edit-submit" class="form-submit" type="submit" value="Save" name="op"/> How do I theme that so I get: <button id="edit-submit" class="form-submit" type="submit"> <span>Save</span> </button> I need the inner span-tag so I can use the sliding doors CSS technique. I guess I need to override theme_button($element) from form.inc but my attempts so far have been unsuccessful.

    Read the article

  • Drupal 6: getting particular fields from Node Reference types...

    - by artmania
    Hi friends, I'm a drupal newbie... <?php print $node->field_date[0]['view']; ?> I can get the custom created CCK fields' value and display in tpl.php files as above... that's fine. my question is how can I get the Node reference fields' in-fields? for example, I have an event content type, and I have defined Node Reference for Location (title, address, img, etc.). When I write the code below, it displays all location content; <?php print $node->field_location[0]['view']; ?> but I need to get only address field from this location content type. sth like below would be great :D but not working; <?php print $node->field_location[0]['field_address']['view']; ?> so how can get that? appreciate helps so much! thanks a lot!

    Read the article

  • How to embed a node on homepage in Drupal 6?

    - by Sushi
    How can I embed a node on the front page in Drupal 6. The node basically has the image upload field along with title and description. I want it to some how appear on the homepage alongwith a "views" which shows the uploaded images at the bottom. It's basically just an attempt at creating something like imageshack as an experiment. I am pretty n00b when it comes to drupal so please be more descriptive.

    Read the article

  • Theming the default search results page in Drupal

    - by David Pratt
    I'm trying to customise the mark-up of the default search results page in Drupal 6. Specifically I'd like to remove the search box and the title from the page - I know I can hide it with CSS, but I'd rather it wasn't rendered in the first place. Ideally, in the same why that you theme a particular content type node by copying the node.tpl.php and renaming it to something like node-blog.tpl.php and then amending the mark-up accordingly - is there an equivalent way to do this for the search results page?

    Read the article

  • How do you use a view with arguments as the site front page in Drupal?

    - by Justin
    I have a Drupal site and I have setup a view to power the front page. My goal is to be able to pass 0-2 arguments to the home page, that get passed into the view. However, I still need the normal Drupal pages to work. The list of arguments is known. For example: mysite.com/berlin/birds would pass in "berlin" as the first argument and "birds" as the second argument to the view that powers the front page. mysite.com/berlin would just pass in one argument, "berlin" mysite.com/admin would load the normal admin pages in Drupal I'm not clear on how to achieve this. Is there a hook I can use? I can't find one or think of one. Is there a way to specify this in the argument for the view itself? Perhaps I can write a hook that interjects when the URL is being loaded, and rewrite in the background? The solution I currently have is to add these paths (since my arguments are known) to the menu system. This works, except that when I the pages they aren't the front page, so the pages don't use the node themes I want (they use the node details theme).

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >