Closed (fixed)
Project:
Realname Userreference
Version:
6.x-1.0-beta1
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
22 Feb 2009 at 22:34 UTC
Updated:
1 Aug 2012 at 15:27 UTC
Jump to comment: Most recent file
Comments
Comment #1
bobgeier commentedTitle fix
Comment #2
schturdark commentedThis would be really useful. Subscribing.
Comment #3
guillaumeduveauAlso look at #369334: Realname for Privatemsg autocomplete
Comment #4
guillaumeduveauI'm working on a patch for Realname, but I have a sticky point with CCK (that's why I'm leaving this issue in CCK/Userreference).
In short how can I call another autocomplete function ? I don't see any [#autocomplete_path] in D6, in D5 it was apparent and easy to change.
Longer version :
In D5 I can see how NancyDru is modifying the autocomplete function, by changing [#autocomplete_path] where it appears.
We just have to replace userreference/autocomplete/field_(name_of_userreference_field) by a custom path like realname/userreference/autocomplete/field_(name_of_userreference_field).
In D6 I can't find any [#autocomplete_path].
Somewhat the [#autocomplete_path] is hidden in the field [#type]=>userreference_autocomplete and the callback is defined in userreference_autocomplete_process(). I don't know CCK, fields, widgets and FAPI enough to find my way here, how do I just change the function called by the UserReference Autocomplete widget ?
Comment #5
guillaumeduveauBump, I'm trying to get help on that one in forums, IRC but nothing so far... Hints would be very appreciated ! I'm starting to think it's NOT possible to change the autocomplete function in D6 and that I would have to create a new Userreference widget ?
Comment #6
guillaumeduveauI've found that the only way in D6 to do the CCK User Reference autocompletion integration with Realnames is to change the autocompletion function and for this, I didn't find another way than add a new widget. I think it's better like that, because you can still use the standart CCK User Reference autocomplete widget. However it is much more code than in D5 (http://drupal.org/node/369334#comment-1515162) so I wrote a new module for this.
NancyDru, what would you prefer ? Leaving that feature in a new module or integrate the code in the Realname module ? I can do it if you want, just tell me :)
The integration with views is still basic but I don't think I'll go further, I don't need it.
Comment #7
erikwebb commented@guix -
I like where you're going with this module, but I can't get it to even set to a field without errors. This is a sample of the 4 errors I get each time:
Where should this `realname` table be coming from? I have RealName installed and working for other purposes already, so I don't think it's coming from there.
Thanks,
Erik
Comment #8
guillaumeduveauErik, you need the latest dev of Realname (2009-Apr-22). Thanks for the comment and let me know what you think about it.
Comment #9
nancydru@guix, I think the separate module is a better choice. The question then is it a CCK module or a RealName contrib?
Comment #10
erikwebb commentedNow I am having another, much less severe, problem. The query being used is this -
SELECT n.realname, n.uid, u.name FROM realname n LEFT JOIN users_roles r ON u.uid = r.uid INNER JOIN users u ON n.uid = u.uid WHERE (n.realname LIKE "%C%") AND (r.rid IN (6,5)) AND (u.status = 1)The problem is that I'm getting an error because the
users ualias is not appearing until the secondJOINclause, but is being referenced in the first. If I flip that query, I get the results as expected.BTW, this is the exact error -
Unknown column 'u.uid' in 'on clause' query: SELECT n.realname, n.uid, u.name FROM realname n LEFT JOIN users_roles r ON u.uid = r.uid INNER JOIN users u ON n.uid = u.uid WHERE (n.realname LIKE '%C%') AND (r.rid IN (6,5)) AND (u.status = 1) ORDER BY n.realname ASC in <blah>/drupal-6.11/sites/all/modules/realname_userreference/realname_userreference.module on line 403.Thanks again,
Erik
Comment #11
erikwebb commentedTo fill in the gaps, here is the patch I used.
Comment #12
guillaumeduveau@Erik : Thanks ! In fact it was a typo, but I didn't notice it as it was working on MySQL 5. Here's a patch to apply to my first .zip (and a new .zip of the whole module). Let me know if it doesn't work for you...
@NancyDru : The module is related both to CCK and Realname. I think it's too specialized to enter into CCK as a submodule. Then for "Realname contrib", did you mean a sub-module included in Realname or a real separated module ? I think this should be a real separated module, like Node Reference URL Widget (from which it's inspired). If you agree with that I'll apply for a CVS access.
Comment #13
erikwebb commentedLooks like the new package is working in whole.
Thanks,
Erik
Comment #14
guillaumeduveauThanks Erik. New .zip with some additional security checks and some code cleanup. I'm applying for a CVS account and if I'm accepted, will publish this as a new module.
Comment #15
micheleannj commentedsubscribing
Comment #16
bobgeier commentedThank for the work, guix!
It would be great to add in widgets for select list as well.
I'll spend a bit of time this week testing.
Comment #17
design.er commentedThanks a lot for this great module! I love it!!! :)
Is it possible to make a hybrid text field like on facebook's relationship field? That means if I'm typing a name in the text field the userreference field will provide suggestions for community users as usual... and if the person is a registered community user then it will link to the user as usual. If user is not a community user the userreference field will accept the value but doesn't link to it.
I think it makes sense for functionalities like relationship statuses and events - for speakers (registered users) and guest speakers (not registered users).
Regards,
Stefan
Comment #18
guillaumeduveauHi and thanks for your interest !
The module is now published here : http://drupal.org/project/realname_userreference
Please add your issues there.
Comment #19
guillaumeduveauComment #20
elektrorl commentedSorry, but it does not work… But the fiel User Reference is loaded on a CCK multigroup. Is it possible there is a bug between both modules?
Comment #21
guillaumeduveauPlease post new issues to report bugs / feature requests.
Elektrorl, see #518678: Does not work with CCK multigroup ;)
Comment #22
guillaumeduveauComment #24
ruchiaz commentedHI
I have create cck field for company name. Once user register he needs to select one of company as a referee which is already registered in the system. This user reference cck referee field needs to be auto completed with referee company and should save as reference user id in the node. My problem is this reference filed auto completed with company name and user name (eg. companyname (username) ). but once i submit form it says 'found no valid user with that name'.
Please Help.
Thanks.
Comment #25
nancydruPlease open a new issue. Posting in a 3 yr old issue is probably futile.