Maybe I'm missing something obvious here, but I can't see anyway of displaying a node's input format via Views. On the View's Edit page, under Fields neither Node: nor Node Revision: shows anything looking like input format, and it is conspicuous by its absence after log and timestamp in node.views.inc.

(What I'm trying to do is build a View for administering content, the ability to display a node's input format would be useful.)

Comments

gpk’s picture

Status: Active » Needs work
StatusFileSize
new2.77 KB

Started a patch but we perhaps need a filter.views.inc? No problem getting the numeric input format to display, but no joy getting the formats' names, maybe because Views doesn't know about the filter_formats table? Have left debugging stuff in the handler's render method.

gpk’s picture

Title: Missing node format? » Missing field: node input format
gpk’s picture

Status: Needs work » Needs review
StatusFileSize
new4.05 KB

This patch merely adds format and format name fields for node revisions.

Having now seen a little of the inner working of Views I'm even more impressed than when I saw the stunning UI of Views 2 for the first time. An amazing contribution to Drupal.

merlinofchaos’s picture

Category: bug » feature

Not really a bug that it's missing. =)

(And I'm trying to get only stuff that's necessary for a 2.4 release; will revisit for 2.5)

gpk’s picture

Fair enough, I kind of "assumed" everything would/should be there, now that I can see the magnitude of what we are talking about that was perhaps a little unrealistic!

This is my first attempt at coding for Views so not sure how on-target it is. Will gladly do what I can to help get this in 2.5, to avoid having to keep patching our AD install. It does seem to work though!

gpk’s picture

StatusFileSize
new4.52 KB

Patch was missing a hunk (note to self: must sort out cygwin or similar to reduce patch hacking...), & improved a comment. Still works OK, with Views 2.3 (Acquia version).

merlinofchaos’s picture

This patch is good but it needs a check_plain() on the format name because it is from the database.

gpk’s picture

StatusFileSize
new4.55 KB

Updated. Glad you have keener eyes than mine!

ench0’s picture

excuse me but how is this patch supposed to work? I am getting the below error :

patch -p0 < filter_format_3.patch
patching file modulesfilter.views.inc
can't find file to patch at input line 61
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- includeshandlers.inc.1.105 2009-04-03 181454.000000000 +0100
|+++ includeshandlers.inc 2009-04-11 173705.000000000 +0100
--------------------------
File to patch: _

I am using it with views: views-5.x-1.6.tar.gz

gpk’s picture

Status: Needs review » Reviewed & tested by the community

@9: looks like patch can't find your includes/handlers.inc file (inside the main modules/views folder)... very strange, is the file there? did it create modules/filter.views.inc OK? Or just use 6.x-2.x-dev ...

Note also that this patch has been applied to the 6.x-2.x (MAIN) branch, and partially to the 6.x-3.x branch - modules/filter.views.inc is still missing from 6.x-3.x...

http://drupal.org/cvs?commit=220142
http://drupal.org/cvs?commit=220144
http://drupal.org/cvs?commit=220394 (added missing modules/filter.views.inc to MAIN)
http://drupal.org/cvs?file=/modules/views/modules/filter.views.inc

Hope it isn't my hamfistedness with patches that is causing the problems!

ench0’s picture

hi gpk

sorry my bad - I was applying it to views 5 / drupal 5. I even said so in my post (which of course does not excuse my not reading carefully that this is for Views 6.x-2.x)

gpk, would it be too hard to make this work with drupal 5?

gpk’s picture

Ah, oh, not sure about Views 5.x (sorry - missed that detail!!), this is my only coding for Views, you might need to ask in IRC.

gpk’s picture

Version: 6.x-2.x-dev » 6.x-3.x-dev

It's the 6.x-3.x branch that is missing filter.views.inc.

merlinofchaos’s picture

Status: Reviewed & tested by the community » Fixed

I swear I committed that. There were other files also not committed. Sigh. Sometimes CVS is annoying.

gpk’s picture

I believe you!!
Many thanks :-)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.