Views Developers

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
This group should probably have more organizers. See documentation on this recommendation.

This group exists as a place for people interested in the group to talk about Views development; all development talk is encouraged here, from people who want to work on Views core to people who are interested in Views' API for their own modules. This is a good place to:

1) ask questions
2) talk about problems
3) propose ideas.
4) talk about views related projects.

This group is now unmoderated, and anyone can join at any time. Public posting of ideas is encouraged.

What I want most out of this is to keep track of what views related projects are going on and their status, and proposals for what people would like to see as Views moves forward.

Note: This is a working group. Do not post jobs here, you will lose your posting privileges entirely. Do not post support requests here; they will be deleted.

markfoodyburton's picture

Refactoring CCK and connection with views

My idea started out being simple, I wanted a view in which some (but not all) of the fields were editable.

An increasingly large can of worms has opened up... see the post here:
http://drupal.org/node/155253

I'd really appreciate feedback... I would like to know that what I'm doing will be useful, so please comment!

This is now working, and a patch is attached. It is a patch against the DRUPAL-5 release of both cck and views, and is attached here.

There are two "issues" to track the CCK and Views part of this work:

http://drupal.org/node/156443 (for the views issues)

Read more
mfredrickson's picture

New view plugin module: Node Cloud

Hello,

I wanted to announce a new module, just released today: Node Cloud. If you're familiar with tag clouds this module should look pretty familiar: it themes the output of a view like a tag cloud.

The primary ordering of the view is from the first sort. The sizing of each item is based on the second sort order. This makes the plugin very versatile for making clouds of popular content, highly rated content (say with the voting api), highly commented content, etc.

Read more
infojunkie's picture

Views and bulk actions

One of the useful Web patterns I've been noticing has to do with item lists and bulk actions. Given a list of items, add a checkbox in front of each item, and let the user select an action to be executed on the checked selection. Specifically, I've seen it in phpMyAdmin, Mantis, and Google Mail.

Read more
Dave Cohen's picture

How to make a field that is a sql count?

I'm looking for help writing views hooks for a custom module of mine. In particular, I'm adding views fields which are the result of SQL COUNTs. When I do this, there are some nasty side effects in views. I doubt I'm the first to attempt this, but I'm unable to find any examples out there.

Read more
drupalprojects's picture

How do I determine a filter type

hi

I want to know if there any embedded function that allow me to determine filter type for current views. For example I've created a view to display all nodes with node type "PAGE" and added some filters to this view, for example filtering by taxonomy terms for certain vocabulary and filtering by "Node: Author is anonymous" (just an example!!!!).

I'm developing custom module for views so mu question is how do I determine if some view filers are related to taxonomy tasks and some is not?

Also I've got an array of my filters. Can anybody explain it's values?
<?php
Array
(

Read more
KentBye's picture

Adding Sort via Argument Handler & Visualizing $View Object

I'd be interested in any feedback about potential pitfalls or improvements for this, but I wanted to share a short Views Argument Handling code snippet that is able to control sorting behavior. It programatically changes the $view object when the second URL argument is "desc" (be sure to change the vid to your view id).

if ($args[1]== "desc") {
  $view->sort[0]['vid'] = 4;
  $view->sort[0]['position'] = 0;
  $view->sort[0]['field'] = 'node.nid';
  $view->sort[0]['sortorder'] = 'DESC';
  $view->sort[0]['options'] = '';
  $view->sort[0]['tablename'] = '';
  $view->sort[0]['id'] = 'node.nid'; 
}
return $args;

I ran into trouble when I tried to cut and paste the views export code for the $view->sort array directly into the Argument Handling section because there were some differences in the schema. This led me to digging into the views.module code to see what the $view object actually looked like. Here's a photo of the $view object:
Only local images are allowed.

And here's how the Views Export maps to the Views $View Object...

Read more
ehowland's picture

Strategy for learning to use Views in modules

I started learning views with the tutorials and the great api docs. I decided to follow the strategy suggested in a post that suggests using the user interface to create and then export the views structure. My problem is that I want to create a table view including data from one of my added tables.

These data do not show up in the list of fields to add. That makes sense since there is no place to add my table into the graphical UI. So I tried this strategy:

  1. Create a base view with only node fields (nid, title).

  2. Export this view.

Read more
jiroro's picture

[question]about views arguments and filter

i want to pass node id into my views
and the filter of my views will use this node id to show something that i want.
this could be done in editview ??
or other better ways could do that?

Read more
cchubb's picture

Allowing html markup in the user profile fields

I have been trying to figure out how to allow html markup in the users profile fields. Many of my users have a "bio" field that contains biographical citations, which should be formatted in italics. They were escaped on output so the html tags were showing.

If you want to allow your profile fields to display the html instead, modify views_profile.inc to:

/**
* Default display method for a profile field
*/
function views_handler_field_profile_default($fieldinfo, $fielddata, $value, $data) {
$value = (unserialize($value) === false) ? $value : unserialize($value);

Read more
KarenS's picture

Views Calendar Update

There was lots of good discussion in the DrupalCon presentation on Date + Calendar. Based on Earl's suggestion to make sure the Calendar arguments will work with any view and requests from the audience to be able to combine calendar and traditional views in the page and block, I've reworked the argument handling to make the Calendar arguments work independently of the calendar theme. So in the latest commit to the 5.x and HEAD versions, you can now add calendar arguments to any view (list, table, teasers, etc) and get date-based back/next navigation just like the calendar view has.

Read more
dww's picture

Idea about signup/reply data for nodes and CCK fields + Views

I maintain the signup.module. This module has long struggled with the problem of how to flexibly define what fields are requested and/or required when a user signs up for something. I might have a slick solution, but I'm not sure if CCK can accomplish what I have in mind.

With 5.x CCK, you can assign any fields you want in whatever groups you need to any node type. My module could allow site admins to define the signup/reply form for any given node type as a specific group of arbitrary CCK fields. This field group would not show up on the node edit form. It would be displayed on the node view page itself, so each user could fill-in, submit, and optionally edit their own signup/reply. All fields would automatically be treated as "multiples" in terms of storage, 1 set of each field's values per user who replies, but displayed as single values for any given user viewing the node. When a user replies, the values of any fields in their reply would have to be associated with their identity (uid for auth users, email for anon).

Read more
mfredrickson's picture

PostGIS in Drupal

Hello,

I've may have some time available in the next few months to devote to upgrading Drupal's GIS abilities. One area where I'd like to concentrate is exposing PostGIS data and functionality. In a nutshell, PostGIS allows storing arbitrary geometries (points, lines, polygons, multipolygons and combinations of those types) in database columns.

Read more
starbow's picture

Views and Ahah Forms 1.3 released

I am really excited to announce the release of the work I have been doing to create an Ajax version of Views, by modifying ahah_forms and views_ui to work together . It took weeks longer than I anticipated, and required extending ahah_form.js and tweaking maybe 20% of views_ui, but I am very happy with the result. You can check it out yourself at http://demo.starbowconsulting.com/admin/build/views. The views_ui rewrite is available in the examples directory of ahah_form v1.2 (http://drupal.org/project/ahah_forms)

Update: I have removed the need to login to the site to administer views (some people were having trouble getting in).

Update: v1.3 released: Ok, I am probably just procrastinating reviewing my notes for friday's summit talk, but I have released a much simplified views_ui.module-example. The big thing I realized is that almost everything I really need to do can be done in the theming functions. Also, I have refined the ahah_forms.js visual effects and removed the yellow fade. This allows me to drop the two interface javascript files.

Read more
KarenS's picture

iCal

I've added iCal support as a beta feature for the Views Calendar module. It is a separate module which you can enable or not which gives you the ability to export as well as import ical feeds. This feature is still in development. It is not recommended yet for production sites!!

It requires the HEAD or 5.x snapshot version of both the Calendar and the Date module (the Calendar module now requires the Date API which is packaged with the Date module. The Date API was split out to provide date functionality to other modules with no dependency on CCK).

Read more
dale42's picture

Two Axis Grid Views Plugin

I'd like some advice from the group on how to proceed with a Views plug-in module I'm working on.

I've taken my work from the scheduling grid and, using the Bonus Pack as an example, created a working views plug-in that adds a new View Type. Working name is "Two Axis Grid".

The row and column fields are designated by their position in the fields group on the Views UI. The first field is row, the second is column. Any fields after that are placed in the cell. Hopefully this diagram will give you an idea of how this works:

My Questions:

Read more
dale42's picture

Scheduling Grid with Views

I recently did a presentation for the Vancouver Drupalers on how to abuse a list view into making a scheduling grid:

I've posted a write-up of the presentation in the Vancouver group. If you're interested, check out: http://groups.drupal.org/node/2647

Read more
jorap's picture

Default taxonomy_term setting

Views rocks!

How do you change the taxonomy_term view to show the taxonomy view based on the depth as stated in the URL like, www.drupal.org/taxonomy/term/5/depth-number will show the taxonomy view with the depth-number, and not 0?

I would highly suggest in changing the taxonomy_term default setting. If the default taxonomy_term view is enabled, users who'll take advantage of taxonomy depth feature will wonder why the taxonomy views show with the depth of 0.

Read more
edward.ishaq-gdo's picture

Views Arguments

hi ,
i am new to drupal , i have created a simple view to show a list of groups .
i wanted to relate this view to taxonomy, that is passed in the url.

what i did so far is :

<?php
function diary_views_tables() {

$tables["rc_og"] = array(

'name' => 'rc_og',
    'join'=>array(
        'left'=>array(
            'table'=>'node',
            'field'=>'nid'
        ),
        'right' => array(
    'field' => 'og_nid'
  ) 
    ),

    'name' => 'term_node',
    'join'=>array(
        'left'=>array(
            'table'=>'node',
            'field'=>'nid'
        ),
        'right' => array(
    'field' => 'nid'
Read more
marcp's picture

Allow filtering by users in a particular role

Folks,

I was hoping someone would have a chance to try out this patch to views_user.inc. It adds filter choices that show only users in a specific role. Moshe was unable to get this to work for him, and I'm hoping someone here might be able to shed some light on what's going on.

Thanks,

Marc

Read more
yelvington's picture

Module proposal: Javascript widget generator

I had a brief conversation about this with Ken today and he suggested I post it here. This is just the seed of a module definition; comments and refinements are invited.

We all need to make little chunks of content -- generally headlines and links -- available to other sites. RSS is one way to do that, but Javascript "widgets" are another way, and potentially a better solution in some cases.

Read more
Subscribe with RSS Syndicate content

Views Developers

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week