Wordpress backend design - wordpress

I have to build an "admin only" page where an admin user can input 3 objects - a person's "name", "description" and a photo. this way they can add/edit/delete people from the website.
I have tried adding "add_menu_page()" to the admin navigation menu and that worked, but I'm kind of lost as to what to do next, or even if I'm on the right track.
I'm assuming I will load the people into the WP database and query the database when i need to display each person.

Yes you are on the right track. Just create a form for the admin where he/she can enter the name, description and photo of a person.
You should make another page using the same method i.e. add_menu_page() and load your WP DB there and provide the option to the admin to delete, edit or add from there.

Related

Disable Order item link

Limit User Access
I'm trying to limit user access to not let him edit product data, such as weight, price, measurements...
I installed the Ultimate Dashboard Plugin and even managed to remove this direct access, letting him see only the orders page, because that's what I want him to have access to.
But when you open the order, he can still access the product through the order link.
Please is there any way I can disable this possibility?
You can achieve that by using the User Role Editor plugin. You can create a custom role there and uncheck the "Edit Product" capability.
Once you created the new custom role, you should go to the "All Users" page from the left admin sidebar, then find the user that you want to prevent editing the products and change its role to the new role that you created with the plugin.
Here is the documentation and examples:
http://shinephp.com/user-role-editor-wordpress-plugin/

Wordpress - Proper way to manage custom users

I have a site in Wordpress.
The functionality I need is such that, I can create 'users' of the site. These users have no purpose editing the Wordpress site in any way, and don't need to know we're even using the wordpress platform.
These users need to be able to edit their contact info and upload/view/swap out their own resume, using a page that I will build for them (not the wp-admin dashboard in any way). This resume will be PDFs and WordDocs.
At first I thought I'd just use the built in Wordpress Users and Roles that Wordpress offers. However, I'm not sure how I would attach resumes to that user, and let that user edit their own resume. I know I can use the 'user_contactmethods' hook to attach basic fields. However, I'd be trying to attach a link to a file that Wordpress hosts, and would need to be able to replace that file on a whim, in php. Also, my goal is to prevent them from ever using the Wordpress dashboard or editing tools.
Next, I thought I could create a custom post type for a 'SiteUser'. That would make it easy to manage a PDF/WordDoc attached to that post type. Also, that user wouldn't have any way to access the Wordpress stuff. Before I do that though, I wanted to ask on here if this really is the right way to do this.
This solution feels hacky.
Can I get some proposed solutions to this problem that could be perceived as 'the proper way'?
Thanks
Here is a rough idea of what you are looking to do.
Step 1
Create the user role for these new users
Step 2
Set the permission for them and disable backend access and redirect all access of those roles to a custom page /account/
Step 3
Use Advance custom fields plugin to create some custom fields on the user meta. (text, file, image)
Step 4
Apply some login logic/form and Link to a /account/edit-info/ custom page with the acf frontend form. https://www.advancedcustomfields.com/resources/create-a-front-end-form/
Step 5
Use these info to display somewhere on the /account/ page
Optional
Using gravity forms instead to manage user data entry gives better control but requires more coding, and a better user experience.
Front-end Admin Steps
Repeat Step 1-2
Loop site user and list them and their custom field files Have a button that opens a Gravity form with the user ID text field pre-populated and hidden, and have a file uploader element.
Add backend hooks after validation directly replace the user meta
containing the file path or ID (however you choice to store it in
Advance custom fields)

Adding profile2 profile to panel in drupal7

I am building a social networking site with drupal 7.32.I am using Profile2 module for user profiles.I have added fields to the default profile type.Now, I want to display the profile on the right side of the two column stacked layout of the panel.After creating the panel pages and on the last screen where the layout appears when I click on the gear and add content the next screen asks for node id which I am not able to fill.What should be the node id ? I am in a fix.
Any and all help would be appreciated.
Are you using the Page manager? Add the "currently logged in user" to the context and you should get the ability to add personal information to the page.
Another way to go is to create a view with a contextual filter to the currently logged in user. The view can then later be displayed on the panels page (without context).

Drupal 7 : get user profile picture at registration

I am using Drupal 7.
I follow this link to enable profile picture of user.
Now i want to get profile picture from user at the time of registration.
How can i get this?
Any help will be appreciated.
Ideal module to do this is Reg-With-Pic
You will be given a check box at admin/config/people/accounts named "Enable user pictures on registration" and weight selection.
If you are using Content Profile module, File field would be an option.
Here is the Helper function to add default user account fields to user registration and edit form.
http://api.drupal.org/api/drupal/modules--user--user.module/function/user_account_form/7
You might also want to use the Gravatar module to take some of the pain out of what you are suggesting. It's enough trouble to set up a profile on yet another site that you might not want to force them to configure their profile at the time of registration, especially with such things as a "user picture", unless you really want to put a damper on registrations.
Depending on the type of site you are working on, the Gravatar module might be ideal. Anyone who already has a Gravatar will have it automatically set as their user picture.
http://drupal.org/project/gravatar

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.

Resources