Searching users and showing user records in Plone - plone

I want to implement search functionality in plone. Search depending on users , users email. Want to display user full details.
Is there any existing add on which I can use (or) I have to write my own code.

Plone does not do "users by content" by default.
User objects are not registered as content
Thus, the standard Plone search functionality does not cover users
If you wish to make users visible for everyone and searchable
There is add-on http://pypi.python.org/pypi/Products.remember/ which will turn users to content items and this serve some niche use cases
Alternatively, you can write your own search box view like Users/Group page in Site setup does
If you need members to be public on your site I would suggest take a look on Products.remember. It will also give you the ability to extend user records through Archetypes content subsystem and make them subject to workflow menu (have different states for members like disabled, registered, etc.)
http://collective-docs.readthedocs.org/en/latest/content/archetypes/index.html

Related

How to display teasers (fields), dependent of conditions user put into webform in Drupal 7?

I want to make site that displays form, and makes user capable to input certain parameters in it. For example, real estate site. Let say I have these fields among others: location, price, size. If user choose to see houses under 100 000$, Drupal has to back node teasers (fields) for houses only under that price.
Now, I wonder how to make Views module start searching when user click submit button, and how to make conditions under which Views search, dynamically dependent of parameters users put into form.
Do I need some additional modules beside Views and Webform modules? Or maybe, I don't need them? Maybe I have to write some php/mysql script that do searching and fetching, but, naturally, I think Views module is build for that kind of circumstances. Thanks in advance!
1) There is an option in Views when you create the exposed filters: "Remember the last selection". This caches the user selection for each Views and when user visits the Views again he will see the previous filters enabled.
2) For better UX you can use Better_Exposed_Filters and Views_Saved_Searches modules. With the first one you have much more options for exposed filters (eg expose as checkboxes) and with the last one users can save their searches and use them later (like bookmarking a url path).
PS. I don't think using the Webform module with views will be useful in order to create personal saved searches. Instead, Views Saved Searches is what you are looking for.

Drupal 6.x Add More Module - No end to adding more

Simple question for all of you here dealing with Drupal 6.x...
With Drupal's Add More module, is there a way to configure my webform so that there is no limit on how many of a specific fields I can add more of?
Please see my image for example:
For example, I'd like to enable the user to add as many titles as they would like. Is that doable?
Unfortunately, it's not currently possible to add unlimited "add another" functionality with webforms. And if this functionality does become a reality someday, I doubt it will be backported to the Drupal 6 version of the module. From the webform modules author (quicksketch):
there is no progress on this subject. The ability to support multiple
values requires a tremendous amount of re-architecting, including
changes to the way CSVs are generated, analysis, the database
structure, and the UI (both for administrators and users). I wouldn't
expect this feature to be added any time soon.
See this thread for more information:
http://drupal.org/node/354381
I would suggest using a node and the CCK module plus rules and views to collect this information.
Assumptions:
Anonymous users can fill out the current form
You need some way of retrieving the data that is submitted
Regular users of the site should not be able to view submissions
Very loose directions:
Create a content type and add all of the fields that your current webform contains to it. CCK has the ability to store unlimited values out of the box. On the field settings page, inside the Global Settings fieldset, select "Unlimited" for the "Number of Values" field.
Give anonymous users permission to Create [your-new-content-type] Content on the Role Permissions page.
Using the Rules module, create a new triggered rule that fires on "Content is about to be viewed" with an condition "Content has type [your-new-content-type]" and an action of redirect to homepage (or a custom error page that you created). (Note: this is a bit of a performance hit. There are better ways to restrict access to this content type, but for the sake of this tutorial, this was the easiest to explain)
Using the Views module, create a new view with Style set to Table. Add each of the fields in [your-new-content-type] in the fields section. Under "Access" choose "role" and select the role that is assigned to your user. Add a "page" display, give it a Path and save. This is the page you will use to view submissions.
Optional:
Use the Rules module to send yourself (or the submitter) an email when a node of [your-new-content-type] is created.

Make content visible only to author in Drupal

I want to allow members of a Drupal website to upload their own content to the site (something like a blog post or questionnaire), but have it visible only to themselves (hidden from other members with the same role). The idea is to have them store some personal content that other members don't need to see, but that only the author member would need to see (or have access to) when using the site.
What modules would I need to use? Or how could I go about setting that up?
You can do this easily with http://drupal.org/project/content_access
I don't know if you've already solved this problem, but I recently did something similar with a shared blog in Drupal 7. I wanted users to have both private and public blog posts. I used the Save Draft module (http://drupal.org/project/save_draft) to add an extra button to the content editing screen, which I called Save (Unpublished) rather than "Save Draft" -- I used the String Overrides module to make that happen (http://drupal.org/project/stringoverrides). In the admin panel for permissions, Authenticated users were granted to right to view and edit their own unpublished items. Users could thus save their blog posts in a way that others could not see them. Then I used Views (http://drupal.org/project/views) to create a list view that used the criteria content type = blog, state = unpublished, and content author = current user. This gives users a list of their unpublished blog posts.
The https://drupal.org/project/view_own module handles this exactly the way you are looking for.

How I can add "files available for download" to Drupal user profile page

first time here. I have searched all day for my particular issue with no luck.
I have users that have specific roles auto generated (they purchase a game). I want to display files available to their particular role on their user profile page. I just want to know how I can add a generic view or associate a panel with user profile pages. I want this to display for every user, not on a per user basis. Basically it'll act like, say, direct2drive, you log in and go to your user profile basically and see what games you bought. Seems simple but I am having a heck of a time figuring out how to do this.
I am pretty used to using views but I just don't get how to edit the user profiles like I want to.
Thanks!
The simplest way is to install views_attach, and create a view with a Profile display. This displays the View on the user profile pages, rather than on its own page or in a block, and will pass the user's uid to the View as an argument.
Alternatively, if you're already using comfortable using panels, you can go to admin/build/panels and enable the Users panel. This replaces the user profile page with a panel, which you can add views, nodes and blocks to as normal.

Display different content for anonymous and logged in users

What I need to accomplish is this:
If an anonymous user visits the site, show regular site content.
If a user logs in to the site, then user-related content appears in place of the regular content.
I would like to accomplish this using the Views module.
I have looked at the Premium module, but it seems to be abandoned. I would like to avoid using the content-access module if at all possible, since I already have other access controls in place.
If you are creating a page display for the views, you can accomplish this with view's access controls. Views will show the first available display that the user has permissions to.
Create a display for the authenticated user view
Set the page path
Set the Access restrictions (eg., by Authenticated role)
Create a display for the anonymous user view
Set the page path to the same value
Optionally restrict access to the Anonymous role (not necessary, since if views can load the authenticated display for the user it will not bother with this one, but may keep it's use clear)
Since you cannot re-order the displays in a view (yet), you must define the views in the order of most restrictive to least restrictive.
For more complex displays, you can use the Panels Pages module to render the page differently based on a user's role.
If you only want to differentiate between anonymous and authenticated users, you can specify that different content blocks are visible to each role.
On my own site, I needed to differentiate between Administrators and everyone else, so I could not use the authenticated user role to define access for individual items. Similar to Views, with Panels Pages you can define multiple variants of pages that use the same path. Administrators have access to the first variant, and all other users fall through to using the second.
You could try using the CCK content permissions and set permissions on a per field basis. Then have different fields for different content that you want to publish. I believe this is included with the CCK module.

Resources