Love this module and am using it on a couple of community sites. One thing that could really enhance the user experience, particularly given I'm exposing the mass eMailing view to my clients, is 'friendlier' tokens being generated from Views Send for the columns from the view. One of the tokens that one organisation has to get its head around is [views-send-node_users_node_data_field_org_board_name_node_data_field_pr_first_name_field_pr_first_name_value]. Granted, this is as a result of a couple of views associations / joins through a user reference and content profile, and I know having read the code we're just grabbing the alias Views itself generates, but I'm wondering if there is some way to 'simplify' this token, or provide an opportunity for the administrator to override the bit after "views-send-". It would be a lot easier for my client if the above token could just read, [views-send-first-name].

One option could be, in the specific views-send settings for the view, allow overrides there, where, with the above example, I could just enter "first-name". If no alias is specified there, then default to the auto-generated alias. Validation of submission of the settings would need to ensure the supplied aliases are unique within the view, but would make the end-user experience better I think.

Shawn

Comments

hansfn’s picture

Assigned: Unassigned » hansfn

This is fixed (or at least much better) in the D7 version. I should be able to backport that code.

sdsheridan’s picture

Awesome! Do you have an ETA? :)

hansfn’s picture

Status: Active » Fixed

This is fixed in commit f659caa. (The dev version is rebuilt automatically every day.)

Please test and let me know if it works (better) for you too. I have tested with CCK fields and normal fields in Views.

roball’s picture

Thank you - it is working fine! Have successfully tested it with the latest 6.x-1.x-dev (2012-May-22) snapshot.

The CCK tokens are much friendlier now! Where I previously had to use [views-send-node_users_node_data_field_profile_full_name_field_profile_full_name_value], now it's just [field_profile_full_name-raw]. Great!

hansfn’s picture

Just a comment: "[field_profile_full_name-raw]" isn't a Views Send token since they all start with "views-send".

roball’s picture

I have both tokens "[views-send-field_profile_full_name]" (under "View row tokens") and "[field_profile_full_name-raw]" (under "CCK computed_field tokens").

hansfn’s picture

Status: Fixed » Closed (fixed)

Thx for the clarification.

roball’s picture

Version: 6.x-1.x-dev » 6.x-1.0-alpha1
Status: Closed (fixed) » Active

The strange thing is that [field_profile_full_name-raw] (from "CCK computed_field tokens") works, while [views-send-field_profile_full_name] will be replaced by an empty string on some of my views!

Another drawback is that the list of available token replacements might be way toooo long - it includes all CCK fields defined on the entire site.

hansfn’s picture

Status: Active » Closed (fixed)

The list of tokens from CCK can be very long indeed. Other modules struggle with the same. The problem in Views Send is that you can't easily tell if the view is containing only node objects, user objects or both. (That's the power of Views.) I'll look at the presentation of the list - it would help breaking it down in node tokens, user tokens and global/site tokens.

If a token is wrongly replaced by an empty string, you should open a new issue.

roball’s picture

OK, new bug report opened: #1636036: Token replacement doesn't work.

hansfn’s picture

FYI: I just made a commit that makes the list of token replacements very compact when the token module is enabled - see commit a2ea6b6.

roball’s picture

This is nice! Much more user friendly :-) Thanks for this commit.