Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

[Paid work] "Sign in/Sign Out" link outside Vanilla

edited May 2008 in Vanilla 1.0 Help
Hi all, my last try didn't go so well so I've simplified what I need and am here to try again. What I need is for the "Not signed in (Sign In)" link to appear outside a Vanilla installation. And if logged in, the "Signed in as wohoo (Sign Out)" link. No login forms, just that simple line of text that appears on the top-right side of Vanilla. I have a Wordpress 2.5 site and I'd really like to get this done without merging databases. If it makes a difference, this is how I have things set up: WP: Vanilla: Figuring out how to do this is the only major thing standing in my way from getting my site and Vanilla exactly the way I'd like them to be, so I'd really appreciate any help. If anyone can give me a hand with this I'll gladly send a $25 their way via PayPal. Thanks!


  • Options
    edited May 2008
  • Options
    I'd like this too, although I'm not going to pay for it. Also, a link such as "Signed in as _______. Enter the forum." ('Enter the forum' link when signed in, in case you missed that)
  • Options
    edited May 2008
    OK, I *believe* this will work...

    1) Check "conf/settings.php"--- does $Configuration['COOKIE_PATH'] = '/forums/' ? Change it to '/'.

    2) Add this where appropriate---

    if (array_key_exists('lussumocookieone', $_COOKIE) && array_key_exists('lussumocookietwo', $_COOKIE)) { // User is signed IN } else { // User is signed OUT }

    Want me to try to do the whole thing?

    One other thing, you *might* have to place the code before any output (setting cookies works that way), but I don't think that matters in this case.
  • Options
    Point (1) is understood.
    Point (2): By "add this where appropriate" you mean what exactly? Where is appropriate, in my WP theme header? And what do I wrap that code in if at all? <?php ?>, ? N00b here, remember :)

    And what then, add this to where I want the "Sign in/out" to actually appear?:

    <?php echo '<div id="Session" style="background:#000;height:23px" width="982">'; if ($this->Context->Session->UserID > 0) { echo str_replace('//1', $this->Context->Session->User->Name, $this->Context->GetDefinition('SignedInAsX')).' (<a href="'.$this->Context->Configuration['SIGNOUT_URL'].'">'.$this->Context->GetDefinition('SignOut').'</a>)'; } echo '</div>'; ?>
  • Options
    Still need assistance with this. Surely someone can help out?
This discussion has been closed.