Search Results

Search found 6941 results on 278 pages for 'drupal views'.

Page 9/278 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Drupal 6 Validation for Form Callback Function

    - by Wade
    I have a simple form with a select menu on the node display page. Is there an easy way to validate the form in my callback function? By validation I don't mean anything advanced, just to check that the values actually existed in the form array. For example, without ajax, if my select menu has 3 items and I add a 4th item and try to submit the form, drupal will give an error saying something similar to "an illegal choice was made, please contact the admin." With ajax this 4th item you created would get saved into the database. So do I have to write validation like if ($select_item > 0 && $select_item <= 3) { //insert into db } Or is there an easier way that will check that the item actually existed in the form array? I'm hoping there is since without ajax, drupal will not submit the form if it was manipulated. Thanks. EDIT: So I basically need this in my callback function? $form_state = array('storage' => NULL, 'submitted' => FALSE); $form_build_id = $_POST['form_build_id']; $form = form_get_cache($form_build_id, $form_state); $args = $form['#parameters']; $form_id = array_shift($args); $form_state['post'] = $form['#post'] = $_POST; $form['#programmed'] = $form['#redirect'] = FALSE; drupal_process_form($form_id, $form, $form_state); To get $_POST['form_build_id'], I sent it as a data param, is that right? Where I use form_get_cache, looks like there is no data. Kind of lost now.

    Read the article

  • Using nodereference + views to create combined view

    - by Ian Silber
    I'm trying to set up a relational View but not sure how to do it. Here's an example of what I'm going for using the node types Artist and Song. Artist Song Length Bob Dylan Like a Rolling Stone 2:00 Bruce Springsteen Atlantic City 4:00 Burce Springsteen Born to Run 5:24 Van Morrison Domino 3:22 Van Morrison Brown Eyed Girl 4:30 Assuming I have an Artist node type that has a node reference to Song (set to unlimited) and a Song data type with an additional field for length, how would I go about configuring the view to output this view? Thanks! Ian

    Read the article

  • Displaying a list of objects with Views - Drupal

    - by RadiantHex
    Hi folks, I'll briefly explain what I'm trying to do: I need to sort a set of content-types within a paginated page. Also I need to add filtering to the page, for example each content-type should have a set of tags and the filter needs to filter through these tags. This is a basic mockup of what this page consists of: I'm finding it quite hard figuring out the best way to do it, and if this can be done. Help would be very much appreciated!!

    Read the article

  • Skip first entry in Drupal Views Query?

    - by RD
    I've created a view that selects all nodes of type "shoot". But I want it to select all nodes of type "shoot", EXCEPT for the first entry. So, if the normal result is: Node 1 Node 2 Node 3 I want Node 2 Node 3 Node 4 Is that possible?

    Read the article

  • Taxonomy terms are not translated in an exposed filters block

    - by Daj pan spokój
    Hi, in my view's exposed filters block the taxonomy terms are showed only in the original language version (in English). Vocabulary is set to Localize terms. The terms are translated via Translation Table. All the other content (Views, nodes, translated strings etc.) is showed correctly (in German). I'd expect them to appear in current language, however. Here for instance, I'd expect to have German Sommer 10 instead of English Summer 10. Do You have any idea how to solve it? I use Drupal 6 and Views 2.10

    Read the article

  • Performance Gains using Indexed Views and Computed Columns

    - by NeilHambly
    Hello This is a quick follow-up blog to the Presention I gave last night @ the London UG Meeting ( 17th March 2010 ) It was a great evening and we had a big full house (over 120 Registered for this event), due to time constraints we had I was unable to spend enough time on this topic to really give it justice or any the myriad of questions that arose form the session, I will be gathering all my material and putting a comprehensive BLOG entry on this topic in the next couple of days.. In the meantime here is the slides from last night if you wanted to again review it or if you where not @ the meeting If you wish to contact me then please feel free to send me emails @ [email protected] Finally  - a quick thanks to Tony Rogerson for allowing me to be a Presenter last night (so we know who we can blame !)  and all the other presenters for thier support Watch this space Folks more to follow soon.. 

    Read the article

  • High Performance SQL Views Using WITH(NOLOCK)

    - by gt0084e1
    Every now and then you find a simple way to make everything much faster. We often find customers creating data warehouses or OLAP cubes even though they have a relatively small amount of data (a few gigs) compared to their server memory. If you have more server memory than the size of your database or working set, nearly any aggregate query should run in a second or less. In some situations there may be high traffic on from the transactional application and SQL server may wait for several other queries to run before giving you your results. The purpose of this is make sure you don’t get two versions of the truth. In an ATM system, you want to give the bank balance after the withdrawal, not before or you may get a very unhappy customer. So by default databases are rightly very conservative about this kind of thing. Unfortunately this split-second precision comes at a cost. The performance of the query may not be acceptable by today’s standards because the database has to maintain locks on the server. Fortunately, SQL Server gives you a simple way to ask for the current version of the data without the pending transactions. To better facilitate reporting, you can create a view that includes these directives. CREATE VIEW CategoriesAndProducts AS SELECT * FROM dbo.Categories WITH(NOLOCK) INNER JOIN dbo.Products WITH(NOLOCK) ON dbo.Categories.CategoryID = dbo.Products.CategoryID In some cases quires that are taking minutes end up taking seconds. Much easier than moving the data to a separate database and it’s still pretty much real time give or take a few milliseconds. You’ve been warned not to use this for bank balances though. More from Data Stream

    Read the article

  • Drupal: Sorting a view programmatically

    - by Ace
    Hey there. I'm trying to take the results of a view - using the function views_get_view_result() - and sort the array in a way I couldn't do from within the Views interface. So far so good. I've got a $rows variable with all of the stuff I need. Now... How do I put it back? :) Before I needed this sort, I used views_embed_view(), but I can't do that anymore. Grateful for any help on this, feels like I'm so close to cracking it!

    Read the article

  • Drupal 6 / Views2 Grid style: whole cells link to nodes

    - by jackocnr
    I have a Users page, which is simply a nicely styled grid (HTML table) of users. I'm displaying a few fields for each one, and both the name and the profile picture have been set to link to the user node. What is the best way to change it so that the whole cell (HTML td) links to the user node? Would you have to use javascript? I've looked into modifying the theme of the view (over-riding the Style output e.g. views-view-grid--users.tpl.php), but cant see an elegant way to get the URL of the user node. And I think you would have to use javascript anyway to turn a whole block element into a link.

    Read the article

  • Jquery Cycle in Drupal - onAfter effect not working.

    - by jdln
    Im using the views slideshow module for drupal which uses the jquery cycle plugin. Here is my first simple slideshow where everything works properly: smartpeopletalkfast.co.uk/slideshow3/one Here is my 2nd slideshow: smartpeopletalkfast.co.uk/slideshow3/two Im trying to use the onAfter function. I want the next and previous buttons to be hidden when at the end of their cycle. This is demonstrated here: jquery.malsup.com/cycle/after.html The first slideshow that's working has these controls: prev: #prev1, next: #next1 The 2nd slideshow has these: prev: #prev1, next: #next1, end: onAfterr, timeout: 0 And Ive added this to the beginning of my document head. <script type="text/javascript"> function onAfterr(curr, next, opts) { var index = opts.currSlide; $('#prev1')[index == 0 ? 'hide' : 'show'](); $('#next1')[index == opts.slideCount - 1 ? 'hide' : 'show'](); } </script> I changed onAfter to onAfterr in case of a conflict. Nothing ive tried works and ive no idea why! Thanks

    Read the article

  • Drupal: create a node with employee working hours

    - by JMarshall
    I have a bit complicated task. 1. I need to create a node with employee working hours (it's gonna be created for all users with role "employee"), which looks like this: Monday: From __ : __ To __ : __ Tuesday: From __ : __ To __ : __ Wednesday: From __ : __ To __ : __ etc. So, I'll have to create probably 14 CCK fields (monday_from, monday_to, tuesday_from...) or more to store the day of the week and workging hours (hours and minutes). 2. I need to add a view with exposed filters, where visitors can filter employees by day of the week and working hours. What kind of field should I use for working hours? How could views filtering described above be achieved? Any suggestions are greatly appreciated. Thank you!

    Read the article

  • How to split a View in several pages when a number of elements is reached?

    - by oalo
    I am using Views to display a gallery. Right now I have set up the View so it onlys shows 50 elements, but I want it to display a "Next" button that takes you to the next batch of elements. Preferably using AJAX / without reloading, but its not necessary. How can I do this? I have looked at all the options and searched for a module that does that with no success, but I am sure its a standard funcionality and you people can help me. Thank you for reading.

    Read the article

  • Add JS file on a certain page on Drupal

    - by Asaf
    I've got a JS file that I want to add to AdminAdd ContentCertain Content type After looking at template.php and checking out the function theme_preprocess_node I tried to add the JS through drupal_add_js(...) but no go. Now, I know that there's a similar question however my case is about adding a JS file to a certain page and nothing else (better seperation of JS files). Thanks. (Drupal 6)

    Read the article

  • Drupal: cannot login with Safari !?!!

    - by Patrick
    hi, I've problems to access to drupal back-end from Safari. It is very strange, I can log-in in Firefox and Chrome but not in Safari. (www.website.com/?q=user) I've reset Safari, cleaned cache, history.. everything, the user and password are accepted, but I get access denied. (even if I login as administrator..) thanks

    Read the article

  • checkbox for Drupal CCK

    - by artmania
    Hi friends, I'm new at Drupal. love it so far :) I'm creating a CCK custom content type. I need to make a amenities list in checkbox format. so I made; File Type: Text Widget Type: checkboxes/radiobuttons and Allowed values list: onsite_dining|Onsite Dining meeting_space|Meeting Space business_center|Business Center and it creates Radio Buttons which only 1 selection :( How can I make it Check Box to give ability to select more than 1? Appreciate helps!

    Read the article

  • Drupal: color doesn't change in Chrome or Safari

    - by Patrick
    hi, could you explain me why the following code doesn't work in Chrome and Safari, but only in Firefox ? if ($(this).css("color") == "Fuchsia"){ $(this).css("color","#000000"); } Website: http://www.sanstitre.ch/drupal/portfolio?tid[]=38&view_name=Portfolio&view_display_id=page_1&view_args=&view_path=portfolio&view_base_path=portfolio&view_dom_id=1&pager_element=0 Please scroll vertically to see Fuchsia colors to change thanks

    Read the article

  • Drupal module to retry failed emails

    - by JavadocMD
    I'm trying to find an existing Drupal module to fit the bill: basically, when an email fails to send, it should save the email and automatically attempt to resend the email later. I'm using the SMTP module to relay emails through an SMTP gateway (required by the hosting provider), but every once in a while the connection is refused - probably due to the gateway being too busy.

    Read the article

  • Drupal html user id

    - by msindle
    I'm using Drupal 6.16: I think I have a pretty simple question. How can I get the current user id and put it in a menu tab. What I would like to happen is when the user logs in and wants to change their their name, email etc to click a menu tab. I image it would look something like this: http://domain.com/user/{userid}/edit Thanks in advance! msindle

    Read the article

  • Drupal permissions not showing for custom content type

    - by Tim Whitlock
    I have a custom content type in Drupal which was created using CCK. The create/edit permissions for this type are not showing up in the node module permissions, although other cck types are. This content type is also bound to a module, but this module doesn't have any admin screens, all node creation is done through the standard cck interface. any ideas? I have tried rebuilding the permissions cache

    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 I use theme preprocessor functions for my own templates?

    - by Jergason
    I have several .tpl.php files for nodes, CCK fields, and Views theming. These template files have a lot of logic in them to move things around, strip links, create new links, etc. I understand that this is bad development and not "The Drupal Way". If I understand correctly, "The Drupal Way" is to use preprocessor functions in your template.php file to manipulate variables and add new variables. A few questions about that: Is there a naming convention for creating a preprocessor function for a specific theme? For example, if I have a CCK field template called content-field-field_transmission_make_model.tpl, how would I name the preprocessor function? Can I use template preprocessor functions for node templates, CCK field templates, and Views templates? Do they have different methods of modifying template variables or adding new ones?

    Read the article

  • drupal jQuery 1.4 on specific pages

    - by Mark
    I'm looking for a way to force drupal to use 1.4 on specific pages. This is the same as this old question:http://stackoverflow.com/questions/2842792/drupal-jquery-1-4-on-specific-pages It look me a while to try the answer which I marked correct. But because I'm new to module dev overall I couldn't figure it out based on the answer. The code from that answer looked like this: /** * Implementation of hook_theme_registry_alter(). * Based on the jquery_update module. * * Make this page preprocess function runs *last*, * so that a theme can't call drupal_get_js(). */ function MYMODULE_theme_registry_alter(&$theme_registry) { if (isset($theme_registry['page'])) { // See if our preprocess function is loaded, if so remove it. if ($key = array_search('MYMODULE_preprocess_page', $theme_registry['page']['preprocess functions'])) { unset($theme_registry['page']['preprocess functions'][$key]); } // Now add it on at the end of the array so that it runs last. $theme_registry['page']['preprocess functions'][] = 'MYMODULE_preprocess_page'; } } /** * Implementation of moduleName_preprocess_hook(). * Based on the jquery_update module functions. * * Strips out JS and CSS for a path. */ function MYMODULE_preprocess_page(&$variables, $arg = 'my_page', $delta=0) { // I needed a one hit wonder. Can be altered to use function arguments // to increase it's flexibility. if(arg($delta) == $arg) { $scripts = drupal_add_js(); $css = drupal_add_css(); // Only do this for pages that have JavaScript on them. if (!empty($variables['scripts'])) { $path = drupal_get_path('module', 'admin_menu'); unset($scripts['module'][$path . '/admin_menu.js']); $variables['scripts'] = drupal_get_js('header', $scripts); } // Similar process for CSS but there are 2 Css realted variables. // $variables['css'] and $variables['styles'] are both used. if (!empty($variables['css'])) { $path = drupal_get_path('module', 'admin_menu'); unset($css['all']['module'][$path . '/admin_menu.css']); unset($css['all']['module'][$path . '/admin_menu.color.css']); $variables['styles'] = drupal_get_css($css); } } } I need the jquery_update 1.3.2 to be unset on the node-types of 'blog' and 'video'. Can someone help me out? Thank you.

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >