Closed (won't fix)
Project:
Usernode
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
30 Nov 2008 at 09:33 UTC
Updated:
3 Feb 2013 at 18:04 UTC
Jump to comment: Most recent file
Comments
Comment #1
smitty commentedComment #2
smitty commentedHere comes a new patch for this issue. What has changed:
1. 'Contact Link' : I've seen that in Drupal the contact page is only available for logged in users. So for an anonymous user now is displayed: "Login or register to contact".
2. 'Number of Posts': It was not possible to sort the column 'Number of Posts' because the field is UID and so the view is sorted according to ‘uis’ instead according to ‘numberposts’. I tried to insert a sort_handler in the field and a handler in the sort-array. These handlers are called correctly (I tested this by inserting dummy code into the handlers).
But now I need help! I've no idea what code to insert into the handlers to get the views sorted according to ‘numberposts’ (which is calculated in usernode_views_handler_field_numberposts)
It would be very kind if anybody could give me some hints! Thank you!
Comment #3
smitty commentedReally nobody who can help?
Comment #4
pdcarto commentedI'm afraid I cannot offer any help, but I would offer encouragement since I am among the many people who are looking for the ability to put a user contact link into a user view. It's not hard to show a contact link for all displayed users*, but selectively showing it only when the displayed user has checked the contact box for his account, and only when the current user's role has permissions to access the contact form - that's not possible currently as far as I can tell (views2, D6).
* Add a field for user:uid; check "output this field as a link"; link path: "user/[uid]/contact"
Comment #5
smitty commentedThanks for the encouragement!
The patch #2 offers exactly what you need. The contact link is only shown if the user has enabled the contact form and if the current user is logged in.
But further on I need help with sorting the number of posts.
Comment #6
dbeall commented@pdcarto #4 Thank You! have been messing with this for many hours, now is fixed.
Was attempting to use the "link to users contact form", but it was not showing for anonymous users even with permissions set for the field. Rebuilt permissions, clear cache, still would not work.
Although I like the little e-mail icon better, problem has been solved.
Thanks again..
Comment #7
BrianLewisDesign commentedOr just rewrite the [iud] field in views (and don't forget permissions):
relationship - Content:Author
field - Content: Author uid
- REWRITE RESULTS - Rewrite the output of this field [X]
<a href="?q=user/[iud]/contact">Send Email</a>Comment #8
pomliane commentedThis version of Usernode is not supported anymore. The issue is closed for this reason.
Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.
This issue has been automagically closed by a script.