Skip to main content
Added note about FB-authentication checks
Source Link
user7667
user7667

Hiding options such as publishing and URL aliases is accomplished through the use of user roles and permissions. Visit /admin/people/permissions on your site to see what I mean. Enable the help module for more (contextual) assistance.

If you want to perform additional modification beyond basic access control, then, seeing as to how you are attempting to customise a form, you would need to implement a Drupal hook named hook_form_alter(). You will need to do this in a custom module - if you haven't done this before, it's a lot easier than it sounds :)

There should be plenty of information and guides on SE, d.o as well as Google on how to use this hook to modify forms. But the one reference that you definitely need to be aware of is the Form API reference.

Since you want links to the node-add form to be visible, rather than controlling access to the page based on the FB-authentication status, you can check the status during the form_alter and either add a message and disable the form, or as is usually done, set an error message or notice (using drupal_set_message()) and redirect them to a page where they can log in via FB; the message/notice will be displayed at the destination.

Hiding options such as publishing and URL aliases is accomplished through the use of user roles and permissions. Visit /admin/people/permissions on your site to see what I mean. Enable the help module for more (contextual) assistance.

If you want to perform additional modification beyond basic access control, then, seeing as to how you are attempting to customise a form, you would need to implement a Drupal hook named hook_form_alter(). You will need to do this in a custom module - if you haven't done this before, it's a lot easier than it sounds :)

There should be plenty of information and guides on SE, d.o as well as Google on how to use this hook to modify forms. But the one reference that you definitely need to be aware of is the Form API reference.

Hiding options such as publishing and URL aliases is accomplished through the use of user roles and permissions. Visit /admin/people/permissions on your site to see what I mean. Enable the help module for more (contextual) assistance.

If you want to perform additional modification beyond basic access control, then, seeing as to how you are attempting to customise a form, you would need to implement a Drupal hook named hook_form_alter(). You will need to do this in a custom module - if you haven't done this before, it's a lot easier than it sounds :)

There should be plenty of information and guides on SE, d.o as well as Google on how to use this hook to modify forms. But the one reference that you definitely need to be aware of is the Form API reference.

Since you want links to the node-add form to be visible, rather than controlling access to the page based on the FB-authentication status, you can check the status during the form_alter and either add a message and disable the form, or as is usually done, set an error message or notice (using drupal_set_message()) and redirect them to a page where they can log in via FB; the message/notice will be displayed at the destination.

Updated answer
Source Link
user7667
user7667

Hiding options such as publishing and URL aliases is accomplished through the use of user roles and permissions. Visit /admin/people/permissions on your site to see what I mean. Enable the help module for more (contextual) assistance.

If you want to perform additional modification beyond basic access control, then, seeing as to how you are attempting to customise a form, you would need to implement a Drupal hook named hook_form_alter(). You will need to do this in a custom module - if you haven't done this before, it's a lot easier than it sounds :)

There should be plenty of information and guides on SE, d.o as well as Google on how to use this hook to modify forms. But the one reference that you definitely need to be aware of is the Form API reference.

Hiding options such as publishing and URL aliases is accomplished through the use of user roles and permissions. Visit /admin/people/permissions on your site to see what I mean. Enable the help module for more (contextual) assistance.

Hiding options such as publishing and URL aliases is accomplished through the use of user roles and permissions. Visit /admin/people/permissions on your site to see what I mean. Enable the help module for more (contextual) assistance.

If you want to perform additional modification beyond basic access control, then, seeing as to how you are attempting to customise a form, you would need to implement a Drupal hook named hook_form_alter(). You will need to do this in a custom module - if you haven't done this before, it's a lot easier than it sounds :)

There should be plenty of information and guides on SE, d.o as well as Google on how to use this hook to modify forms. But the one reference that you definitely need to be aware of is the Form API reference.

Source Link
user7667
user7667

Hiding options such as publishing and URL aliases is accomplished through the use of user roles and permissions. Visit /admin/people/permissions on your site to see what I mean. Enable the help module for more (contextual) assistance.