views

Bad query

  1. user warning: You have an error IN your SQL syntax; CHECK the manual that corresponds TO your MySQL server version FOR the RIGHT syntax TO USE near '= node_node_data_field_client.nid WHERE node.type i

Fix for Views

  1. <?php
  2. $view_args[] = "";
  3. $view = views_get_view('degree_program');
  4. $programs = views_build_view('items', $view, $view_args, false, 20);
  5. $majors = array();

Fix for Views

  1. <?php
  2. $view_args[] = "";
  3. $view = views_get_view('degree_program');
  4. $programs = views_build_view('items', $view, $view_args, false, 20);
  5. $majors = array();

Fix for Views

  1. <?php
  2. $view_args[] = "";
  3. $view = views_get_view('degree_program');
  4. $programs = views_build_view('items', $view, $view_args, false, 20);
  5. $majors = array();

Views

  1. <?php
  2. $view_args[] = "";
  3. $view = views_get_view('degree_program');
  4. $programs = views_build_view('items', $view, $view_args, false, 20);
  5. $majors = array();

Fix for Argument handling code for a view taking in TID as argument, trying to get the parent TID to be returned (if it has)

  1. // note that this only gets the immediate parent
  2. if ($args[0]){
  3.         $parents = taxonomy_get_parents($args[0]);
  4.         if ($parents) {
  5.                 foreach ($parents as $parent) {
  6.                 $parentID = $parent->tid;

cck variables get printed as null in Drupal 5 view

  1. //in template.php----------------------------
  2.  
  3.  
  4. function phptemplate_views_view_list_promotion_box($view, $nodes, $type) {
  5.   /*
  6.   $fields = _views_get_fields();
  7.  

Inserting a nodereference field into a view.

  1.  // Add the nodereference field if it's not present.
  2.   $nodereference_table = content_views_tablename($nodereference_field);

Fix for views_ajax show thumbnail

  1. function theme_views_ajax_page_item($node) {
  2.   $file=next($node->files);
  3. //  return l(theme('image', $file->filepath, NULL, NULL, array('border' => 0)), $path, NULL, NULL, NULL, NULL, TRUE);
Syndicate content