Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter
Support for Vanilla Forums Cloud product

In this Discussion

Follow Us


Guest Welcome Message

MarkMark Vanilla Staff
edited March 2007 in Questions
This discussion is related to the Guest Welcome Message addon.
Guest Welcome Message

Comments

  • I like the way freakforum.no presents it's "you need to register" message: any chance of an optional second layout? for example see the very top of each page you visit here: http://www.freakforum.nu/forum/forumdisplay.php?f=44
  • If you don't mind editing the add-on you can make the message appear elsewhere. For instance: a) As a notice in the notice box at the top of the discussions: Change $Panel->AddString to $NoticeCollector->AddNotice and remove the comma and position marker , 10 before the final bracket. b) Make it appear at the end of the Panel instead of the beginning: leave $Panel->AddString but increase the number 10 to larger number so that it appears beneath all other items in the panel (e.g. 450 as 500 is where the About Vanilla Infos start). c) Make it appear in its own div: Do the same as b) but edit the beginning to start with a closing div and take out the div at the end, e.g. so that the beginning and end look like this: $Panel->AddString('</div><div id="GuestWelcome"> ... ... ... ... .$Context->GetDefinition('GuestWelcomeBody'), 450); Then you can use css to place the div #GuestWelcome where you like, e.g. { position:absolute; top:0; left:0; width:100%; height:20px; background-color:yellow; } to force stick it at the top. Define this and the other styles in the style.css that comes with the GuestWelcome add-on.
  • Uploaded version 3.0 of Guest Welcome Message.
  • MarkMark Vanilla Staff
    I just changed it so it works like the New Applicants add-on. It puts the message at the top of the page on almost every page (if you aren't signed in).
  • Mark maybe when you upload a new source file you should have a short input to say what's changed and have the lussumobot post it?
  • MarkMark Vanilla Staff
    I was thinking exactly that when I uploaded this one today...
  • I like it the way it was actually pic
    Could we have both versions?

    Posted: Wednesday, 14 March 2007 at 1:56PM (AEDT)

  • MarkMark Vanilla Staff
    There's another thought ... I keep records of every single version uploaded. I could have a historical availability, I guess...
  • Mini, you beat me to it! It would create a nice changelog :) The historical availability would also be great :)
  • MarkMark Vanilla Staff
    I've been thinking a lot about changing the way those extension files are renamed. Instead of adding the date, make it do ExtensionName-version.number.zip and disallow overwriting files. So people have to update their version number whenever they upload a new version.
  • I already put the -version.number bit anyway, so of course I'll support that ;) Forcing the version number is also a good thing IMO. means you can't end up having two releases of the same version.
  • Re: version numbers: check out http://www.codinghorror.com/blog/archives/000793.html

    Gist of article:
    Software version numbers like x.y.z provide little or info (other than major vs minor version)
    It makes a lot more sense to use (or at least incorporate) date/time instead
    -> date + time will always unique
    -> provides instant feedback on plug-in age (hmmm. old plug-in, perhaps I should check for a new version?)

    Since downloads already seem to specify a unique name, e.g. tabled-2007-03-143.zip,
    why not use the same approach for indicating the version...

    Re: overwrite...

    To avoid long 'version' lists due to last-minute changes,
    developer could perhaps be allowed to delete files uploaded
    within the last 3 hours?
  • @Mark: just wanted to give you some feedback, after upgrading to version 3.0. Much to my surprise, I actually got a couple of messages straight away from my users, telling me that the 'new look' was great, and that it made the sign-in process more visible and obvious. It also seems to have made the registration process clearer. I immediately got 2 new registrations. Coincidence? Perhaps, but I prefer to give credit to your new layout! Keep up the good work!
  • I have my Vanilla forum in English and Japanese. I installed this Welcome message add-on, but sadly it's only in English, even when I've set my Vanilla interface to Japanese. Where do I put the Japanese translation? Thank you!
  • MarkMark Vanilla Staff
    @JDW: You can either add it to your languages/yourlanguage/definitions.php or you can add it to conf/language.php
  • If you add the text to the conf/language.php file you also have to include the framework functions for the GetUrl() function calls to work. The function is called if someone clicks on the Terms of Service link while registering.

    // Need to include this to have the GetUrl() calls below work
    include_once($Configuration['LIBRARY_PATH'].'Framework/Framework.Functions.php');

    // From the GuestWelcome extension:
    $Context->Dictionary["GuestWelcome"] = "<strong>Welcome Guest!</strong>
    <br />Want to take part in these discussions? If you have an account, <a href=\"".GetUrl($Configuration, "people.php")."\">sign in now</a>.
    <br />If you don't have an account, <a href=\"".GetUrl($Configuration, "people.php", "", "", "", "", "PostBackAction=ApplyForm")."\">apply for one now</a>.";


    I have a question. Why does the guest welcome box move its position slightly on the Search page? It is only on this page that the layout is slightly broken, and I can't figure out why.
  • Jordan,

    Thank you for the reply.

    However, you seem to be talking about editing a file other than what I edited. Specifically, you are talking about editing conf/language.php. In contrast, I edited only the following files:

    /extensions/GuestWelcome/default.php
    /languages/Japanese/definitions.php
    /languages/English/definitions.php

    So I am not sure if your "framework" recommendation applies to my specific case. Does it?
  • I was replying to Mark's post. If you end up putting your language stuff in conf/languages.php you should add the include_once() I mentioned. Otherwise don't worry about it.
  • Jordan,

    Thank you for the clarification.

    I guess I now only need to continue worrying about how to solve the GetUrl problem in light of the fact my translations are NOT placed in /conf/languages.php!

    Thanks.
  • Is there a way to change the color scheme? I have a very specific color scheme going on and the yellowish stuff really clashes bad. I don't think my clients would like that. I cannot figure out what css file this references. Am I missing something?
  • Herrgeist: When I need to change a color on a webpage, I use Eye dropper. You will have to right-click on it and check the box next to 'show RGB' to see the hex mode color notation that is used in CSS, then just find that color sequence in the CSS and change it.

    CSS also has a three character shorthand, so something like #CCC is the same color as #CCCCCC. White is #FFF (or in longhand #FFFFFF), black is #000.
  • Yeah, I do the same thing with Photoshop to get the code. I just can't figure out where the color code to edit is.
  • Boy I feel dumb now. The extension doesn't even have a CSS file...

    It looks like it uses the .Notice section (it's relatively close to the top) in the themes/vanilla/styles/default/vanilla.css file: background: url(notice.gif) left center no-repeat #FFFECC;
  • ah I see. Thank you for that.
  • Thanks a lot, great add-on, it solved me for the newbies who get confused :D
  • Thank you so much for a great post, Works like a charm :)
  • I want the guest welcome message only on my start page. This ist the BlogThis page (extension.php?PostBackAction=Blog) How do I have to modify the default.php? Simply adding extension.php to the array and delete everything else does not work. Then the message is displayed on every extensions page. thanks
  • I have installed this extension but I cannot find the interface to change the setting. I have looked in roles& permissions to enable it, but there is nothing there. The extension is enabled in the extensions page. I went and edited the php file, but the change didn't work.
  • Hey, maybe someone will find it useful, I updated this extension so it points where terms of service are for authenticated users.
    To make it work you have to do 2 things,
    add a line like so to settings.php in /conf folder
    $Configuration['TERMSOFSERVICE_MESSAGE']='yes';
    and define your message, like so
    $Context->Dictionary['TermsOfServiceMessage'] = 'Looking for Terms of Service? It's here.';
    in definition.php inside guest welcome extension.

    if (in_array($Context->SelfUrl, array("account.php", "categories.php", "comments.php", "index.php", "search.php")) && $Context->Session->UserID == 0) {
    $NoticeCollector->AddNotice($Context->GetDefinition('GuestWelcome'));
    }
    else if (in_array($Context->SelfUrl, array("index.php")) && $Configuration['TERMSOFSERVICE_MESSAGE'] != '') {
    $NoticeCollector->AddNotice($Context->GetDefinition('TermsOfServiceMessage'));
    }
    Cheers, :)
Sign In or Register to comment.