CVS edit link for naushunaushad

I am a software developer.I want to contribute modles,themes in drupal.I want share my idea to others.

Comments

naushunaushad’s picture

Assigned: Unassigned » naushunaushad
Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new1.49 KB

Hi
I developed a module for logout action.This module working with action and trigger. We can redirect a new URL after logout.Module is attached here.

vimalramaka’s picture

  • The Login/Logout Destination module does something similar to this.
  • Please read this: http://drupal.org/node/231036.
  • You need not have version, project, datestamp in your .info file. They are automatically added by drupal.org
  • The first line in your .info file isn't correct, it should be: ; $Id$
vimalramaka’s picture

Status: Needs review » Needs work
naushunaushad’s picture

StatusFileSize
new1.51 KB
naushunaushad’s picture

StatusFileSize
new1.5 KB

Use this one

vimalramaka’s picture

  • In logout_redirect.module:
    Line 84: The parameters for form validation and submission functions have changed to $form, &$form_state (http://drupal.org/node/144132#process-params)
  • You have an action form, but I don't see any place to set the URL. Please implement hook_menu.
  • Also, for your hook_help, you need hook_menu. So implementing of hook_menu resolves two issues.
  • Bunch of indent problems, from coder:

    Line 24: Use an indent of 2 spaces, with no tabs
    switch ($path) {

    Line 25: Use an indent of 2 spaces, with no tabs
    // Main module help for the logout_redirect module

    Line 26: Use an indent of 2 spaces, with no tabs
    case 'admin/help#logout_redirect':

    Line 27: Use an indent of 2 spaces, with no tabs
    return '

    ' . t('This module working with core modules action and trigger.

    Line 34: Use an indent of 2 spaces, with no tabs
    }

    Line 39: use a space between the closing parenthesis and the open bracket
    function logout_redirect_action_info(){

    Line 40: Use an indent of 2 spaces, with no tabs
    $actions['logout_redirect_action'] = array(

    Line 41: Use an indent of 2 spaces, with no tabs
    'description' => t('Redirect to a URL after logout'),

    Line 42: Use an indent of 2 spaces, with no tabs
    'type' => 'user',

    Line 43: Use an indent of 2 spaces, with no tabs
    'configurable' => TRUE,

    Line 44: Use an indent of 2 spaces, with no tabs
    'hooks' => array(

    Line 45: Use an indent of 2 spaces, with no tabs
    'user' => array('logout'),

    Line 46: Use an indent of 2 spaces, with no tabs
    )

    Line 47: Use an indent of 2 spaces, with no tabs
    );

    Line 48: Use an indent of 2 spaces, with no tabs
    return $actions;

    Line 57: use a space between the closing parenthesis and the open bracket
    function logout_redirect_action(&$object,$context){

    Line 57: missing space after comma
    function logout_redirect_action(&$object,$context){

    Line 58: Use an indent of 2 spaces, with no tabs
    drupal_goto($context['logout_redirect_url']);

    Line 66: Use an indent of 2 spaces, with no tabs
    $form['logout_redirect_url'] = array(

    Line 67: Use an indent of 2 spaces, with no tabs
    '#type' => 'textfield',

    Line 68: Use an indent of 2 spaces, with no tabs
    '#title' => t('URL'),

    Line 69: Use an indent of 2 spaces, with no tabs
    '#default_value' => $context['logout_redirect_url'],

    Line 70: Use an indent of 2 spaces, with no tabs
    '#size' => '60',

    Line 71: Use an indent of 2 spaces, with no tabs
    '#maxlength' => '90',

    Line 72: Use an indent of 2 spaces, with no tabs
    '#required' => TRUE,

    Line 73: Use an indent of 2 spaces, with no tabs
    '#description' => t('The URL to which the user should be redirected after logout. This can be an internal URL like node/1,login.html etc or an external URL like http://drupal.org.

    Line 75: Use an indent of 2 spaces, with no tabs
    );

    Line 76: Use an indent of 2 spaces, with no tabs
    return $form;

    Line 85: Use an indent of 2 spaces, with no tabs
    return array(

    Line 86: Use an indent of 2 spaces, with no tabs
    'logout_redirect_url' => $form_state['values']['logout_redirect_url'],

    Line 87: Use an indent of 2 spaces, with no tabs
    );

vimalramaka’s picture

Your current .info with line numbers is:

1) ; $Id: logout_redirect.info, 2010/10/29 10:43:00 $  
2) name = 'logout_redirect'
3) description = Provide an action for redirection after logout.
4) core = 6.x

5) project = "logout_redirect" 
6) datestamp = "1288423416" 
  • you must not have anything in between "Id" and "$". So your line number 1 should just contain: ; $Id$
  • Remove the lines 5 and 6, you must not have them. They are automatically generated by drupal.org when you upload the module as a project.
naushunaushad’s picture

thanks for your information

naushunaushad’s picture

StatusFileSize
new1.45 KB

use this one

naushunaushad’s picture

hi vimal
can you please tell me what is the need of menu hook in this module.We need to use this with help of action and trigger modules.

We can see the help from the following location

sitename/admin/help

vimalramaka’s picture

naushunaushad’s picture

StatusFileSize
new1.5 KB
vimalramaka’s picture

Well, you need not specially implement hook_menu for help. You need to implement hook_menu for a place, to set up the URL for redirection. As of now, there is no place I can set the URL, through Drupal front-end.

So please implement hook_menu for the form.

naushunaushad’s picture

Thanks vimal.
But this module depends on action modules.We can create an action for logout redirect.We must use action settings link for create logout redirect action.Thats the logic.So the seperate link is not necessary for this module.

thanks for your valuable informations

jlbretton’s picture

thanks naushunaushad.
Nice little module, solving what I couldn't do with other alternatives tried like Login/Logout Destination or Apache redirections rules.
It works as expected, allowing me to switch easly between https wth special port number and standart http.

avpaderno’s picture

Assigned: naushunaushad » Unassigned
Issue tags: +Module review

Hello, and thank you for applying for a CVS account. I am adding the review tags, and somebody will report what needs to be changed.

As per requirements, the motivation should include a description of the module features (more than two sentences), and a comparison with the existing solutions.

naushunaushad’s picture

Thank you for adding review tags

This module can be used for setting redirection page after logout.This module offer drupal standard.I am using action and trigger for redirection.There is no action available for logout.

There is a module available for Login/Logout Destinations.But this is not using action and trigger.And this need query string destination for setting redirection page.I think we can use the logout_redirect module for extending the some use page redirection functionalities.

For example suppose we want role based redirection after login we can extend this module for this purpose.

avpaderno’s picture

Status: Needs work » Needs review

Thank you for your reply.

lorinpda’s picture

Hi,
You module depends on the optional core module "Trigger". However, you .info file does not contain a dependency statement. Therefore, please consider adding the following line to your .info file dependencies[] = trigger.

Along the same lines, I would consider enhancing your hook_help implementation so that it provides a user links to core Actions and Triggers configuration settings dialogs.

Finally, the "coder" module reports several formatting issues. Otherwise, I tested the functionality, works as expected (nice work).

avpaderno’s picture

Status: Needs review » Needs work

I am changing status as per previous comment.

naushunaushad’s picture

Thank you.

zzolo’s picture

Component: Miscellaneous » miscellaneous
Status: Needs work » Closed (won't fix)

Hi. Please read all the following and the links provided as this is very important information about your CVS Application:

Drupal.org has moved from CVS to Git! This is a very significant change for the Drupal community and for your application. Please read the following documentation on how this affects and benefits you and the application process:
Migrating from CVS Applications to (Git) Full Project Applications

  • The status of this application will be put to "postponed" and by following the instructions in the above link, you will be able to reopen it.
  • Or if your application has been "needs work" for more than 5 weeks, your application will be marked as "closed (won't fix)". You can still reopen it, by reading the instructions above.
naushunaushad’s picture

Project: Drupal.org CVS applications » Git Browser
Version: » 6.x-1.x-dev
Component: miscellaneous » Code
Status: Closed (won't fix) » Postponed
naushunaushad’s picture

Status: Postponed » Closed (won't fix)
avpaderno’s picture

Issue summary: View changes
Issue tags: -Module review