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 to Vanilla forum Activity Welcome to Vanilla! vanila! remove

how to Vanilla forum Activity Welcome to Vanila! remove

Comments

  • Options
    R_JR_J Ex-Fanboy Munich Admin

    The Activity is added with those lines:

    // Insert the new user
    $UserID = $this->_Insert($Fields, array('NoConfirmEmail' => TRUE));
    AddActivity(
       $UserID,
       'Join',
       T('Welcome to Vanilla!')
    );
    

    Do not simply change those lines ;)
    Instead, you could override the function "AddActivity". Copy the function from /library/core/functions.general.php to a new file, say /plugins/MyAddActivity/functions.general.php. Change it like this:

    <?php if (!defined('APPLICATION')) exit();
    function AddActivity($ActivityUserID, $ActivityType, $Story = '', $RegardingUserID = '', $Route = '', $SendEmail = '') {
       if ($ActivityType == 'Join' && $Story == T('Welcome to Vanilla!'))
          return;
       $ActivityModel = new ActivityModel();
       return $ActivityModel->Add($ActivityUserID, $ActivityType, $Story, $RegardingUserID, '', $Route, $SendEmail);
    }
    

    You would also have to create a most simple plugin file for that /plugins/MyAddActivity/class.myaddactivity.plugin.php so that you have a plugin you could activate in the dashboard

    <?php if (!defined('APPLICATION')) exit();
    
    $PluginInfo['MyAddActivity'] = array(
        'Name' => 'My AddActivity',
        'Description' => 'Suppress "User Joined! Welcome to Vanilla" activity',
        'Version' => '1.0',
        'RequiredApplications' => array('Vanilla' => '2.0.18'),
        'MobileFriendly' => TRUE
    );
    class MyAddActivityPlugin extends Gdn_Plugin {
    }
    

    I have taken the AddActivity function from Vanilla 2.0.18.8 so please take the current function from your installation and just add the if clause.
    I have not tested the code above, but it should work, I think. If not, come back and report what's happening.

  • Options

    no work this plugin,I useingVanilla 2.0.18.8

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited January 2014

    I think he just wants the definition changed or removed. Add this to your locale.php file

    $Definition['Welcome to Vanilla!']='';

  • Options
    R_JR_J Ex-Fanboy Munich Admin

    I leave the field to the Crystal Ball owners ;)

  • Options
    peregrineperegrine MVP
    edited January 2014

    @R_J said

    I leave the field to the Crystal Ball owners

    Sometimes, even a crystal ball owner can't distill 3 to 4 word meaningless phrases. if a person can't express what they want in english, or post in their native language, probably a waste of time for all involved.

    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
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    You just need to apply Occam's Razor principle .... the simplest answer is the correct answer 99.99% of the time.

  • Options
    peregrineperegrine MVP
    edited January 2014

    @vrijvlinder said:
    You just need to apply Occam's Razor principle .... the simplest answer is the correct answer 99.99% of the time.

    I thought it was 99.95% of the time with a Standard Deviation 0f 50%

    • It has the twin virtues of simplicity and mystery.

    • Measured council spilling from your mouth.

    and to OP

    • Speak plainly I grow tired of mystery

    • Cut circle with straight line and give voice of what you are seeking.

      and then I will leave it at

       - then we are face to face with a paradox.
      

    How many yak's could a yak-shaver shave if yak-shaver could shave yaks (with an Occam's Razor).

    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
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    If I knew what his native language was, I could learn it and understand his query in half the time ...
    Could he be from the same place that chanux and please sir ?

    Taking wagers now :

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited January 2014

    @peregrine said:
    I thought it was 99.95% of the time with a Standard Deviation 0f 50%

    Well actually, it is the simpler theory is the correct one until one with more thorough more complete explanation of the complex theory can obtained.

    Since we are working with only a small amount of variables , applying this was logical and after you add the missing Variables it becomes clear :

    how to change or remove in the Vanilla forum Activity list ,the message you get after you join. example:

    "Welcome to Vanilla!" (name of user->) vanila!

    Answer :

    $Definition['Welcome to Vanilla!']='';

Sign In or Register to comment.