It would be very useful to integrate your module with Views. It is planned?
Thank you.

CommentFileSizeAuthor
#10 user_titles-357896-10.patch56.55 KBrooby
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

fuldespanto’s picture

I also miss that integration, it would be great to show titles and their associated images without tweaking the templates.

Thanks anyway for this much needed module

Apollo610’s picture

subscribe - would be interested in this as well.

aharown07’s picture

Yes, please!

juancarlos’s picture

I could really use this as well.

luxx’s picture

subscribing

ltwinner’s picture

I would love to be able to filter and sort users by title in views. I don't know if it's possible though as the user titles for each user actually aren't saved in the database for each user...as far as I can see they are decided dynamically and assigned during a page request. So unless it's changed so that users are given a tid (tite id) in the database I dont know how you would integrate it with views.

rooby’s picture

Title: To realize the integration with Views. » Views 2 integration
Component: Miscellaneous » Code
Assigned: MITSUFAN » rooby
Category: task » feature

I'll do this one too

Babalu’s picture

subscribe

gausarts’s picture

Plus 1. Thanks

rooby’s picture

Version: 6.x-1.0-beta2 » 6.x-1.x-dev
Status: Active » Needs review
FileSize
56.55 KB

This addition turned out to be a bit of a pain.

Previously user titles for each user were not stored in the database but calculated on the fly.
For views support we need the data to be in a database table so I had to make some changes to how the module works.
Users titles are now stored in the database.
To go along with this I also made a few other changes that were needed, were logical or were bug fixes.

Here is the list of changes in this patch:
* Moved user titles post counting out to a contrib module called ut_basic
This means if you are using userpoints or some other scheme you don't need to have the basic user titles scheme installed.
* For ut_basic points give comments separate node type settings to nodes to allow more flexibility
* Added user_titles_users table which stores users current title
* Added views support
* Bug fix: Updated an sql statement that was previously MySQL specific
* Bug fix: Matching users block now works correctly when using contrib modules to calculate titles
* Bug fix: Fixed some text output that didn't use the t() function

After applying this patch you will need to run update.php
The update process will enable ut_basic as that functionality was previously in user_titles.

Views support is via the user titles views sub module so that it won't waste any resources if you don't want to use it.
For views there are title and image fields, a title argument, a title filter (can be role specific or not) and a title sort.

Views support for ut_basic could also be added so you could filter and sort based on points and such things but I
haven't the time to do that right now so it will have to wait.

It's a big patch and I've been quite tired whilst doing it so please have a test and let me know of any bugs.

Thanks.

Agileware’s picture

Status: Needs review » Fixed

With the lack of feedback on this I have committed this to dev.

Hopefully we can get some more testing that way.

Agileware’s picture

If you have issues with the new functionality please open new issues.

Status: Fixed » Closed (fixed)

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