Arrange drupal 7 people/users admin page - drupal

I want to arrange the people's section of my drupal 7 admin page. Right now, the People/users are arranged according to usernames, status, roles, member for, ....etc. I want to make it look like last name, first name, employee id, ....etc (these are custom profile fields.) Then finally I want to arrange it alphabetically according to their last name. I have tried using views but ended up with the following two issues: 1. I couldn't find the custom profile fields like the first name, last name, ...etc, and 2. I have to either create a page or block to access the results of the views page (I want to make everything in the people's page.) I would real appreciate your help!!!

If you're referring to /admin/people, you can create a page and use that path in your view, and it'll override the default /admin/people page. This is an explicit feature of the views module.
Bear in mind you'll have to mimic all the existing functionality you want to keep from the admin/people page (eg exposed filters and sorting), and make sure you set the access permissions on the view to ensure only admin users have access.
As for not being able to see custom profile fields, do you mean they're not showing up in the list of fields to select? I don't know why that would be... if you've created a view based on Users, then the fields will show up under the "User" category (User: first name, User: last name &c). I've checked my own install and everything's showing up fine. Further info?

Related

limit drupal view to show only nodes created by user

I'm using drupal 7. I created a view for displaying nodes of a specific content type (e.g. products). When viewing the page, I want only those products displayed which were created by the user (currently shows all products).
I would like to do it without using a url filter so the url would be simply:
/myproducts
Use the filter "User: Current". If that doesn't work, try with a relationship
With the Advanced Help module you can see "Example to filter content by the current logged-in user": http:// yoursite /help/views/example-filter-by-current-user
And there said:
Creating the relationship
In order to have access to the author of the content, it is important to create a relationship between the current content type, and users.
Under Advanced in the right column, select add next to Relationships.
Select Content: Author and click on Add and configure relationships. Leave the settings as they are and click on Apply (all displays).
You now have access to the user data related to the content you are viewing.
Filtering the view
Now you need to filter the view to display only content authored by the current user. This >data is now available for the content because you have created the relationship in the step >above.
Next to Filter criteria click on add to add a new filter to your view.
Filter the list of fields by selecting User next to Filter at the top. You now have more >fields than before due to the relationship you created.
Select User: Current from the list and click on Add and configure filter criteria.
Since this field is only visible due to the relationship you created, author will already be selected under Relationship. This shows that the relationship you created is being used for the filter field.
Select Yes under Is the logged in user, and click on Apply (all displays).
If you have authored content of the type Blog Post, you should now see a list of those posts under the preview section at the bottom.
Saving & testing the view
Here's what I used to make it work.
Under relationships, add content:author
Under contextual relationship, add user: authentication name and relationship: author (or whatever you called your relationship).
And if you want to be even more sure, add to filter: user current and add relationship.

Client management page on Drupal 7

I would like to know what is the best way to create a custom page for my client where he can update is content by himself, the simpliest way possible for him, without even entering drupal management.
I would like to create a page with different dropdown list where he can't update a table on a page, only by selecting an item in those and add other dropdown list as well.
For example: he logs in a custom page
Theres a list with different kind of fruits, he choose banana and it automaticaly update a page table and update it with banana.
After that he could also create a new drop down list of vegetables for example, and add different kind in it so he can use it to update the site later. All that done with ajax as well.
I'm very new to drupal and have a couple of php notions, but i don't know where to start, would it be in CCK, Views or Form Api or the three at the same time?
Or is there a module out there doing that kind of thing?
English is not my primary language, so sorry if it isn't very clear.
Thank you very much.
I think what you are looking for is CCK module. You can create a CCK content type and have a field within it called fruits. From the admin interface you can decide what are the values that should be in the dropdown.
You can give the client permission to create a node of the content type. If you think he should be able to edit only the drop down values, make sure you give him the permission to only that field.
You can create a listing page using http://drupal.org/project/views or you can also consider using
http://drupal.org/project/editview
You should take a look at views bulk operations, and try using the "modify node fields" feature which will allow you to perform bulk operations on node fields displayed in a view and then look into roles & permissions which will help you restrict viewing the "View" by role.

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.

Drupal - linking Taxonomies together with views in a sequence

I have something in Drupal (v6) that i'm trying to nail, but having a little difficulty. I am laying out a list of products which have the following taxonomy vocabularies attached to them:
Manufacturer
Product Type
Use
When entering a product, which uses a custom content type, the admin can select one or more terms from each of these vocabs.
I then need to lay the front-end out using Views as follows:
List of Manufacturers displayed to the user - user clicks one
List of Product Types displayed to the user that have a product contained within that matches the chosen Manufacturer - user clicks one
List of Uses displayed to the user that have a product contained within that matches the chosen Manufacturer and Product Type - user clicks one to view full node details
The tricky bit is making the link between each of these vocabs using Views. The taxonomy vocabs have no hierarchy defined within them, I just need to be able to display them to the user in the order above. I can't change to using a nested hierarchy in just one vocabulary as the 3 seperate vocabs are used elsewhere on the site for other purposes and need to stay as they are.
Is it possible to create what i'm after with Views? Any tips on how best to rig it together?
Could use 3 views, with the 2nd and 3rd taking arguments.
So a url could look like:
/products/ - 1st view
/products/Ford - 2nd view, one argument
/products/Ford/Cars - 3rd view, two args
That said, for something like this I'd probably just write a custom module. How practical that is depends on how comfortable you are with Drupal and PHP.

Drupal Custom Form with Filters

I'm displaying cars on a page created with a view and displays. I want to be able to create a form on the home page to allow people to select the 'make', which will then update the 'models' list based on the 'make' the user selects, 'year' to and from, and 'amount' to and from. What the user selects will of course alter the list of used cars, whether that's on the existing used cars page or a new page.
I would be happy to create a custom module if required, just need some direction.
Thanks !
When using views, what you need to do is to use exposed filtes. Inside your view you can setup filters like normally, only when you expose them, the user get to change the value of the filter.
How the filters will be themed to the user will depend on how you store the values, so it's a bit hard to say how to progress from there. It might be a bit tricky to get a select and not a textfield. Once you get select fields, this could probably be done with either some theming or form_alter, all you need is to add some js to change the options. The js part should be pretty normal, you will probably need to fetch the model names and values using ajax.

Resources