Download & Extend

Word Filter does not filter words when using views

Project:Wordfilter
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

For example, using views 2 to create a most recent comments, this could include the comment title and a snippet of the comment body the excluded words will still appear in the view.

Comments

#1

Category:bug report» feature request

I haven't played around with Views 2 enough but I would suspect
that this is because Views does not call node_load or comment_load
to get node/comment data but rather retrieves content directly
from the database. This means that the Drupal hooks for
hook_nodeapi and hook_comment are not run.

Wordfilter works by filtering node and comment titles and content
when the relevant hook_nodeapi or hook_comment Drupal
hooks are run ('load' or 'view' operations) and so are not going
to filter on content loaded outside of the standard Drupal
hooks.

I guess I'll have to look into Views pre/post processing of fields
to see what can be done there if anything.

#2

ok looks like we can hook in word filtering for views with
hook_views_pre_view(). Views results in Full Node and
Teaser View already get filtered via the standard Drupal
hooks but not List and Table view.

Will get this working and add it to the module.

#3

still looking for the new Views 2 hooks to do this. The method
that works in Views 1 does not work here.

#4

Hello!
Just wanted to see if this issue was ever resolved, or if its still a problem. Thanks!

#5

Subscribe. I noticed the same thing

#6

Would be nice to have it in views..

#7

The D7 implementation handles filtering of field content based on content filters (mostly due to modifications in core), but will not handle titles at present. Just as an FYI.

#8

Is anyone aware of a workaround or other solution to this problem for D6?

#9

i added a views customfield with php code executing

echo wordfilter_filter_process($data->node_title);
nobody click here