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.

How to change the welcome message "Howdy, Stranger"?

I really like your Pure theme. It looks very professional.
However, I am new to Vanilla and needs help on changing the welcome message "Howdy, Stranger".

Can you show me how to edit it.

Thanking you in advanced.

«1

Comments

  • Search the forum.

    grep is your friend.

  • rsaepulohrsaepuloh New
    edited November 2014

    I have searched in the forum, but nothing really helps or maybe I have not found the right answer.
    I will keep looking. Can anybody give a quick reference?

  • @rsaepuloh‌ Welcome to the community.

    A search for 'Howdy Stranger' provides a number of results that would help you.

    If you have changed your forum language, go to the Dashboard and find Locales under Addons

    After clicking on Locales, make sure your Default Locale is en-CA.

    You may have to press Save twice to get it to take.

  • rsaepulohrsaepuloh New
    edited November 2014

    Hi @whu606 and @R_J thank you for the response.

    I think I found the place to edit the definition here: /home/language/public_html/forum/applications/dashboard/modules/class.guestmodule.php

    But this is the only thing I see (I did not see the "howdy, Stranger"
    Can I just edit and save the code below?

    /**
    * Renders the "You should register or sign in" panel box.
    */
    class GuestModule extends Gdn_Module {

    public $MessageCode = 'GuestModule.Message';
    public $MessageDefault = "It looks like you're new here. If you want to get involved, click one of these buttons!";

    public function __construct($Sender = '', $ApplicationFolder = FALSE) {
    if (!$ApplicationFolder)
    $ApplicationFolder = 'Dashboard';
    parent::__construct($Sender, $ApplicationFolder);
    }

    public function AssetTarget() {
    return 'Panel';
    }

    public function ToString() {
    if (!Gdn::Session()->IsValid() && C('Garden.Modules.ShowGuestModule'))
    return parent::ToString();

      return '';
    

    }

    }

  • You really don't want to research yourself, do you? ;) Look at that comment: http://vanillaforums.org/discussion/comment/192237/#Comment_192237

    Read that single comment, do as you are told there. And then please read some of the other links you can find easily in order to understand what you're doing.

  • That same discussion has a nice conversation about the cons of editing the core files...

  • rsaepulohrsaepuloh New
    edited November 2014

    SOLVED!!! YES!!

    For information, I used Cpanel, here are the steps I used and worked:

    1. open "File Manager".

    2. I went here : public_html/forum/applications/dashboard/views/modules/guest.php

    3. then, right click on "guest.php"

    4. Find the "Howdy, Stanger" in the code (Line 3 in mine), then change the text to whatever text you want.

    5. Click "Save" (on the top right corner)

    and DONE!!!

    Thank you : @R_J and @whu606

  • /!\ Don't edit core files.

    If you had taken a look at the link we've given you, you would have known better. After the next update, your users will see "Howdy Stranger!" again.

  • face palm

    grep is your friend.

  • whu606whu606 MVP
    edited November 2014

    Seriously, it is hard to help some people.

    I took time out, first to give you the correct search term, then to give you the specific post you needed, and you chose to simply ignore that.

    What you have done is absolutely NOT the right way to go.

    I have to be honest, I would be disinclined to offer you help in future based on this experience.

  • rsaepulohrsaepuloh New
    edited November 2014

    @R_J & @whu606 : I thought I have done what was instructed.

    Honestly, I have read everything and followed every instruction I found in the forum.
    Pardon me for being hard, but what I was looking for, was just simple "step-by-step" instruction like what I just did above. If only I have the ability you guys help, I would make it easy for everybody.

    I don't even have any clue what you guys are referring to by saying : "Don't edit core files."

    I am sure, I am not the only one who has difficulty in following your instruction by just saying "click this link and figure it out by yourself".

    I thought the idea of this forum is to help all people (not only those who knows technical stuff) and guide them so that they can learn.

    Do not mistaken me by thinking that I am not grateful for all your help and patience. I just wish that you can be more sensitive to people like me who knows nothing and need to learn from scratch.

    However, I will re-read all the comments you have given and see what I did wrong.

  • Of course, the easiest thing for any questioner is a step-by-step walk through, but please bear in mind your question may have (and in this case has been), asked many times before, often with a step-by-step.

    How is

    the same as

    "click this link and figure it out by yourself".

    Follow the link, and read the 2nd post. That's your answer.

    If you don't understand the answer, then of course, ask questions about it, but to ignore my suggestion (and others) completely makes/made me feel I had wasted my time, which I could otherwise have been spending preparing lessons.

    No one who has answered you is 'staff' - we are all volunteering our free time to help others get the hang of Vanilla.

  • @whu606 again, I would apologise. But I think you get me wrong. I have followed and read every instruction and acted based on my limited understanding on this matter. FYI, before I post anything here, I have been reading this forum for 3 days and did not understand anything. That is why I made a post on this matter because I am desperate.

    I really appreciate with all the helps. It is just so frustrating if somebody say just go here : /conf/locale.php

    does it mean go here: public_html/forum/conf ???
    If it is, I see nothing says locale.php

    Again, I did not mean to be unappreciative. I truly apologise if you feel that way.
    I have put back the core file to the original. But this mean I ended up with the same problem.

  • OK

    But now you are in a position to do it right!

    The more someone can say 'I tried this/read that but don't get it' the easier it is to see how best to offer help.

    There was a link inside hgtonight's post to here:

    http://vanillawiki.homebrewforums.net/index.php/Locales

    Where you could see:

    Definitions are strings that can override current text. The basic definition line looks like consists of the string to translate as the $Definition key and the customized string as the value. In the example below, we are redefining the text 'Howdy, Stranger!' to 'Welcome to our Community!'

    $Definition['Howdy, Stranger!'] = 'Welcome to our Community!';

    There can be any number of definitions in a locale file. If the /conf/locale.php file doesn't exist, use the below example as a starting point for your new file.

    <?php if (!defined('APPLICATION')) exit();
    $Definition['Howdy, Stranger!'] = 'Welcome to our Community!';
    

    So, since you haven't got a locale.php file, in cPanel, go into the conf folder, click New File and call it locale.php, click on it to edit it, then copy the last two lines of that into that file, and save it, changing 'Welcome to our Community' to anything you like.

    Don't hesitate to ask if any of this is unclear, or you get stuck, but please DO say what you have done/where you have got up to.

  • rsaepulohrsaepuloh New
    edited November 2014

    @whu606 Perfect! It Worked!!!

    Do I go here if I want to change the text "it looks like you're new here . . ." : public_html/forum/applications/dashboard/modules/class.guestmodule.php

    Or . . .

    Do I add this to the locale.php I just created and put it on the 3rd line?:
    $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!";

  • whu606whu606 MVP
    edited November 2014

    Files in applications should not be edited, as any changes may/will be overwritten during an upgrade. There is (almost always) a better solution, in this case your second suggestion is correct!

    The left hand side of the 'equation' has the text you want changed.

    That is the text that will be called on various pages.

    The text on the right hand side is what you want to be shown.

    Think of it as a kind of find and replace if that helps, so if you don't have the correct term on the left, Vanilla won't be able to find it, and replace it with your new text.

  • @whu606 thanks it really helps. I think I understand how that works now.

Sign In or Register to comment.