custom page in Drupal - drupal

hi i have created a website in drupal.In this registration page can be access by following url
http://mysite.com?q=user/register
But i want to make a custom page for registration.
Please give me some guide line , i don't have any idea for this

You want to modify the user registration form,
http://www.google.ca/search?client=safari&rls=en&q=user+registration+template+drupal&ie=UTF-8&oe=UTF-8&redir_esc=&ei=Jn0dTdTzI466sQP4uZ2PCg

a) hook_form_user_register_alter() documentation at http://api.drupal.org/api/drupal/developer--hooks--core.php/function/hook_form_alter/6 b) if you totally cant do what you want with a happy little form altering then you can always hook_menu_alter() the page and use whatever page callback you desire instead of drupal_get_form.

Goto admin/build/modules
Enable Profile module
Add fields in profile and while adding a field make it 'visible during registration'

Related

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)

Display form into the login page Drupal

I'm very new in Drupal and I encounter a problem.
I want to add a login page. So I have the page http://localhost/mytheme/user/login
I don't know how to display the login form into that page ....
Thanks for your help !
First way. This is standard drupal's login form. You can use it on your custom pages
user_login form
Second way. Rename Admin Paths module, which can rename you paths to standart user's operations. For example you have default yousite.com/user/login and you can set path to login as yousite.com/mytheme/user/login it's easy

Custom user profile in Wordpress

Is there a way to modify the Add user page in the administrator so I can add several custom fields when creating new users?
Not sure but This article seems to do just what you need:
http://justintadlock.com/archives/2009/09/10/adding-and-using-custom-user-profile-fields

Embed registration page on another page in Drupal?

Currently you can get to the registration page by going here: user/register
I need to be able to embed the registration form on ANOTHER page. How do I do that?
You could try the method suggested here: http://drupal.org/node/248275
a.k.a. embed the form using the PHP Code input filter:
<?php
print drupal_get_form('user_register');
?>
However, there will be a few gotchas with trying to embed the user registration page anywhere besides /user/register, because of the way Drupal's User module is set up.
It might be better for you to form_alter the user registration form, so you can customize it to fit your needs. Or, you might be able to get by with adding a block specifically to the user registration page.
What exactly are you trying to achieve by adding the registration page somewhere else?

How to use hook alter form in module to register a user and also save some data in another table?

have a general idea on how to use hook alter to modify the feel of the registration form .
However the challenge I have is to not only have the user register, but to save some extra data into another table and then redirect user to a new page.
How would I get about doing that? Please help
Again, it'd be easier to plan what you're trying to do and take advantage of common solutions. I suspect what you're after is the Content Profile module.
add a custom function to your form, according to http://api.drupal.org/api/drupal/developer--topics--forms_api_reference.html/6#submit-prop for more info
please notice the login page and the login block are different forms, with different form ids for your hook_form_alter.
Just implement hook_user(); when the first parameter is 'register', the registration form is being presented to a user, and the module can change it by adding new form fields (the module needs to return them to Drupal).

Resources