When you configuring the field, you can set both 'VOTE UP/DOWN WIDGET' and 'VOTING API TAG'.
But if you will enter your custom tag (not declared by other module with votingapi hook), different than default 'vote', you will partly loose ingeration with votingapi by this tag, because vud_field.module will not declare your custom tag for votingapi (there is hook_votingapi_metadata_alter for that). For example, you will not able to create relationship in views filtered by your new voting tag.

I suggest to add hook_votingapi_metadata_alter() to vud_field.module, that will declare the tag, if user enter new tag, not declared before by other module.

Comments

marvil07’s picture

Title: Custom voting tags declaring for votingapi » Expose custom votingapi tags declared on vud_fields
Status: Needs review » Active

You are right.

I will say it would be great to have that hook implemented, but instead of doing it while saving field settings, we could also iterate through current vud_field fields settings on the hook and find out which tags we have(with an static cache to avoid rebuilding it every time).

Patches welcome.

PS: BTW "needs review" means a patch ;-)

marvil07’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Issue summary: View changes