Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

How can i make 'New Discussion' public

jone68jone68 New
edited January 2014 in Vanilla 2.0 - 2.8

I would like to make New Discussion button public and when guest click on it, it will redirect to login page. Just replace Howdy,stranger..... block with new discussion buton.

How can i do that?

Comments

  • Options
    hgtonighthgtonight ∞ · New Moderator

    Do you not want the guest module (box on the left) to show at all? Or just replace the words with the new discussion button?

    What version number of Vanilla are you running?

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Options
    jone68jone68 New
    edited January 2014

    Yes, i don't want to show the guest module at all. Instead i would like to show new discussion button visible to guests.

    I'm using Version 2.1a33

    Thanks,

  • Options
    peregrineperegrine MVP
    edited January 2014

    @jone68 said:
    Yes, i don't want to show the guest module at all. Instead i would like to show new discussion button visible to guests.

    I'm using Version 2.1a33

    Thanks,

    crazy to be running an outdated alpha version in my opinion. you may have security holes as well.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    hgtonighthgtonight ∞ · New Moderator

    You can disable the guest module by adding this to your /conf/config.php file: $Configuration['Garden']['Modules']['ShowGuestModule'] = FALSE;.

    If you want to show the new discussion module on all the pages, you need to disable the check for a valid session. Copy the file at /applications/vanilla/modules/class.newdiscussionmodule.php and paste it into a new plugin folder. E.g. /plugins/ModuleOverrides/modules/class.newdiscussionmodule.php. Modify that file by removing line 17. This removes the check for permissions.

    Then you need to create a basic plugin that you can enable disable. Create a new text file called class.moduleoverrides.plugin.php in the /plugins/ModuleOverrides folder and paste this into it:

    $PluginInfo['ModuleOverrides'] = array( 
        'Name' => 'Module Overrides',
        'Description' => 'This plugin wraps module overrides to protect the modifications against core updates.',
        'Version' => '0.1',
        'MobileFriendly' => TRUE,
        'Author' => 'Zachary Doll',
        'AuthorEmail' => 'hgtonight@daklutz.com',
        'AuthorUrl' => 'http://www.daklutz.com',
        'License' => 'GPLv3' // Specify your license to prevent ambiguity
    );
    
    class ModuleOverrides extends Gdn_Plugin {
      // Don't actually do anything
    }
    

    Then go to your plugins page in the dashboard and enable Module Overrides.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Options

    @hgtonight Thank you very much! I will try that and report back the result later.

    @peregrine ya, i'm aware of the security issue. I'm trying to upgrade it now. Thanks,

Sign In or Register to comment.