HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Howdy Stranger and bottom description location!

I saw someone asking where is located the Howdy Stranger title ?
The Howdy Stranger title is located in APPLICATIONS/DASHBOARD/VIEWS/MODULES/GUEST.PHP LINE 3
And the bottom howdy stranger description is located in APPLICATIONS/DASHBOARD/MODULES/CLASS.GUESTMODULE.PHP LINE 17
Hope i helped you.

«1

Comments

  • hgtonighthgtonight ∞ · New Moderator

    You should use locale definitions rather than modifying core files. In this example, placing the following in your /conf/locale.php file will override the guest module text:

    $Definition['Howdy, Stranger!'] = 'Welcome to the community!';
    $Definition['GuestModule.Message'] = "I don't think I have seen you before. If you want to join in on the conversation, click one of these buttons!";
    

    This is the preferred method for modifying translatable text.

    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.

  • Yes, but i shared other method.

  • Yes but we want to discourage the other method.

    grep is your friend.

  • R_JR_J Ex-Fanboy Munich Admin

    @AlbinJakupi said:
    I saw someone asking where is located the Howdy Stranger title ?
    The Howdy Stranger title is located in APPLICATIONS/DASHBOARD/VIEWS/MODULES/GUEST.PHP LINE 3
    And the bottom howdy stranger description is located in APPLICATIONS/DASHBOARD/MODULES/CLASS.GUESTMODULE.PHP LINE 17
    Hope i helped you.

    If the one who asked the question wanted to look at the source code in order to study it, your answer is the better one.
    If he wanted to translate something, he would be thankful for @hgtonight s answer on the long run.

    I always dislike it when someone asks"How can I change this?" and the answer is something like "Why do you want to do this? Do that!" So I think your answer is okay, but it is not complete. Adding @hgtonight s advice makes it more helpful.

  • Yes , it's sure the @hgtonight 's answer is good but i shared another method i said anyone who want just translate it can use @hgtonigt method but and my method is good and simple too.

  • @AlbinJakupi said:
    Yes , it's sure the hgtonight 's answer is good but i shared another method i said anyone who want just translate it can use hgtonigt method but and my method is good and simple too.

    Sorry you are plain wrong. You not edit core file except if you wish to maintain a fork, and then you can publish documentation for it and host support forum for that rather then on vanillaforums.org

    What you can do is copy views to you theme to change, though only if it is really necessary as this has some pitfalls too.

    hgtonight provided the correct way to do it, you way is not the correct way as it will be wiped with updates.

    grep is your friend.

  • R_JR_J Ex-Fanboy Munich Admin

    As @x00 said: your way is okay as long as you will never update to official sources again. I can hardly imagine that this will be the case for anyone.

  • x00x00 MVP
    edited September 2013

    --

    grep is your friend.

  • Another problem (if I understand this) is that if you update the core, when you update it with a new version of Vanilla, you have to go back and make the changes again.

  • @RogerJH said:
    Another problem (if I understand this) is that if you update the core, when you update it with a new version of Vanilla, you have to go back and make the changes again.

    Absolutely correct!

  • @hgtonight said:
    You should use locale definitions rather than modifying core files. In this example, placing the following in your /conf/locale.php file will override the guest module text:

    $Definition['Howdy, Stranger!'] = 'Welcome to the community!';
    $Definition['GuestModule.Message'] = "I don't think I have seen you before. If you want to join in on the conversation, click one of these buttons!";
    

    This is the preferred method for modifying translatable text.

    This is great and works if you just want to change the text, but what if you want to remove it all together? I tired setting the values to null, but that still left behind the HTML wrappers, like <h4></h4>.

    $Definition['Howdy, Stranger!'] = null;
    $Definition['GuestModule.Message'] = null;
    
  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited April 2014

    To remove it simply leave only apostrophe

    $Definition['Howdy, Stranger!'] = '';

    If you want to remove the guest module all together put this in the config.php

    $Configuration['Garden']['Modules['ShowGuestModule']=FALSE;

  • Actually, looks like I posted too soon.

    I was able to solve my own issue by simply copying theguest.php from applications/views/modules/guest.php into my custom theme: themes/mytheme/views/modules/guest.php

    Then I was able to simply edit my theme specific guest.php file and remove the text from above the buttons. So my local file now looks like:

    <?php if (!defined('APPLICATION')) exit(); ?>
    <div class="Box GuestBox">
       <?php $this->FireEvent('BeforeSignInButton'); ?>
    
       <?php
       if (strcasecmp(C('Garden.Registration.Method'), 'Connect') != 0) {
          echo '<div class="P">';
    
          echo Anchor(T('Sign In'), SignInUrl($this->_Sender->SelfUrl), 'Button'.(SignInPopup() ? ' SignInPopup' : ''));
          $Url = RegisterUrl($this->_Sender->SelfUrl);
          if(!empty($Url))
             echo ' '.Anchor(T('Apply for Membership'), $Url, 'Button ApplyButton');
    
          echo '</div>';
       }
       ?>
       <?php $this->FireEvent('AfterSignInButton'); ?>
    </div>
    

    Now this view file overrides the default one.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited April 2014

    You could also just add those buttons as a module and not display the guest module.If you are using 2.1 , you can disable the Guest module in config.php and then

    The main style is hiding the me box sign in and register links

    .MeBox-SignIn {
    display: none!important;
    }
    

    Add to your custom.css this, if it does not work you will need to change that in the main stye in the applications/dashboard/design/style.css ,by removing the !important from it. Then the links will show.

    .MeBox-SignIn {
    display:block!important;
    }
    
  • @vrijvlinder said:
    If you want to remove the guest module all together put this in the config.php

    $Configuration['Garden']['Modules['ShowGuestModule']=FALSE;

    Good to know, but in my case I want the module, but I'm moving it to a different location in my theme.

  • @vrijvlinder said:
    You could also just add those buttons as a module and not display the guest module

    Another great idea and I actually tried this first, but I couldn't find good documentation on how to build and implement a custom module for my theme. Do you have a link to a good resource?

  • peregrineperegrine MVP
    edited April 2014

    but I couldn't find good documentation on how to build and implement a custom module for my theme. Do you have a link to a good resource?

    wiki

    http://vanillaforums.org/discussion/comment/197947#Comment_197947

    http://vanillaforums.org/discussion/comment/183549/#Comment_183549

    themehooks

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

  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited April 2014

    Look at the GuestBigButton plugin. Also the FeedEk plugin would work, just replace the html in the module for the sign in and register. And rename the entire plugin.

    You can clone it and call it signinmodule or something and instead of loading the newdiscussion module, you would put the links to sign in and register.

    It is very simple as I found out recently and went on a module creation binge. A module is just a widget .

    The content you want to echo goes in the class.yourmodule.php

  • ChiprangChiprang New
    edited November 2017

    @AlbinJakupi said:
    I saw someone asking where is located the Howdy Stranger title ?
    The Howdy Stranger title is located in APPLICATIONS/DASHBOARD/VIEWS/MODULES/GUEST.PHP LINE 3
    And the bottom howdy stranger description is located in APPLICATIONS/DASHBOARD/MODULES/CLASS.GUESTMODULE.PHP LINE 17
    Hope i helped you.

    So simple and easy. Thanks

    How to change 'Announcement' to some other texts like 'Featured'. Your method is best for beginners like me.

Sign In or Register to comment.