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.

Custom landing page after registration

Hello,

To messaure how many people have registrated - on the forum - through certain web promotions Im in need to put a specific code on a landing page, which only will be seen by users which have registrated.

So I have been googling and digging to accomplish how to send people to a custom landing page after registration have been completed. So far I haven't been able to accomplish this and wonder if there is any good tutorial/already active topic regarding this? If not, how do I solve a custom landing page?

Greerings!

Comments

  • It's not clear if you want different landing pages, or just one.

    You can easily change your permanent landing page (see here for example http://vanillaforums.org/docs/homepage )

  • I do not know if that would work, but you might like to try it. Save it as /plugins/RedirectAfterRegistration/class.redirectafterregistration.plugin.php

    <?php defined('APPLICATION') or die;
    
    $PluginInfo['RedirectAfterRegistration'] = array(
        'Name' => 'Redirect After Registration',
        'Description' => 'Redirects newly registered users to custom page',
        'Version' => '0.1',
        'Author' => 'R_J',
        'AuthorUrl' => 'http://www.vanillaforums.org/profile/r_j'
        'License' => 'MIT'
    );
    
    class RedirectAfterRegistrationPlugin extends Gdn_Plugin {
        public function entryController_registrationSuccessful_handler ($sender) {
            $sender->Form->SetFormValue(
                'Target',
                C('Plugins.RedirectAfterRegistration.Route', '/whereveryouwant')
            );
        }
    }
    

    Then you can either replace "whereveryouwant" in the source code or add $Configuration['Plugins']['RedirectAfterRegistration']['Route'] = '/what/ever'; to your config.php

    Maybe there is an easier solution. But if you try that plugin, please give feedback if it worked

  • Thanks R_J, works like a charm!

  • R_JR_J Admin
    edited January 2015

    @Fredrik said:
    Thanks R_J, works like a charm!

    Well, in that case I make it an official plugin B)http://vanillaforums.org/addon/redirectafterregistration-plugin

    I've added a settings screen, but there is no reason for you to download that new version if you already are using the code above.
    I cannot imagine that the url will change so often that having a settings screen makes sense at all but adding it is so easy and makes it look shiny professional...

Sign In or Register to comment.