Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Listing of users?
Please excuse the newbie question, but I can't seem to find any info on this. I am wondering if it is possible to display a directory-type listing of all users, which would be visible to all users, with each user name linking to that user's profile.
Thanks!
Thanks!
Tagged:
0
Answers
Thanks.
Start to create a new application "userlist",
the doc is here
http://vanillaforums.org/docs/appquickstart
i tried clone skeleton and do what the doc says, but without success
if you are able to display an hello world, say it
The guts of the code is in this php file:
vanilla\applications\dashboard\views\user\index.php
A patient person could probably modify it and re-write it to suite their needs.
http://pinoyau.info/plugin/BrowseMember/
speaking of the BrowseMembers plugin,
i found a nice fix for making more than just a - z availible as browsable member search.
You need to change from a route to an array, because if you would make a route go from 0 - Z it would implement stuff like < > = and ? and you wont want to search that in usernames.
go into the Plugin folder, and open "BrowseMember/files/default.php" and change
to
you might ask yourself why i put 0 into a different kind of link, thats because somehow clicking 0 in an array shows all members, just like the reset/all link, so i cheated a way around this by adding a link directly to the form output.
(the markdown in here doesnt like me, but you can see the changes on the 0 if you hover over the number)
oh and like i said in another topic, pluralisation makes sense:
"9 user(s)" should be "9 users" and a single user should be "1 user"
easily done by changing
printf(T('%s user(s) found.'), $this->Pager->TotalRecords);
to
printf(Plural($this->Pager->TotalRecords, '%s user', '%s users'), $this->Pager->TotalRecords);
FYI:
Plural()
contains asprintf()
. So you don't need to wrap it in the printf. Just do the following:thank you for making this idea even better, Todd
Nice mod