Not signed in (Sign In)

Categories

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.

Help keep Vanilla free:
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    • CommentAuthorwohoo
    • CommentTimeApr 24th 2008 edited
     # 1
    Hey everyone,

    would it be possible to have things such as a login field and user icon/name displayed outside of a Vanilla installation?
    I'm using Wordpress 2.5 and got the Jasmine plugin working with the comments (comment link on WP blog post leads to an automatically created forum post) and I see no reason to merge WP with Vanilla anymore, if only people could login into Vanilla from the WP end too.

    Thanks!
    • CommentAuthorwohoo
    • CommentTimeApr 26th 2008
     # 2
    Update / I'm willing to pay a little something through PayPal if someone could guide me through on how to accomplish this. I've gone through the topics here and it looks as if its possible, but I lack the coding expertise to do this on my own. At the very least I'm looking to have the "Not signed in (Sign In) / Signed in as wohoo (Sign Out)" on my Wordpress pages.
    •  
      CommentAuthorHamed
    • CommentTimeApr 26th 2008 edited
     # 3
    how much will you pay
    ( i am not a programmer?)
    but i was thinking if it was not expensive i could ask for something like this too

    or maybe you could share
    but i know that would be hard for you
    especially if it is a lot of money
    • CommentAuthorwohoo
    • CommentTimeApr 26th 2008
     # 4
    Well by the sounds of it, for the people who know what they're doing, it's pretty easy. So all it would take is for a knowlegdable person to type up a well written how-to guide for newbies like myself.

    I'd be willing to throw in $25 for just the "Not signed in (Sign In) / Signed in as wohoo (Sign Out)" implementation and $50 for the whole deal. And if someone does this, I have no problem sharing it with everyone. I just need it asap, so I'm willing to pay a little.
    •  
      CommentAuthorHamed
    • CommentTimeApr 26th 2008
     # 5
    awesome!
    that is super!
    is this just for wordpress or for any external page?
    jw
    • CommentAuthorwohoo
    • CommentTimeApr 27th 2008
     # 6
    I'd need it just for the latest Wordpress. But I'd imagine it'd work for any internal page, not sure though.
    •  
      CommentAuthorHamed
    • CommentTimeApr 27th 2008
     # 7
    oh yes i see

    i wonder why no one has posted here yet

    hope they do
    ^_^
    •  
      CommentAuthorsquirrel
    • CommentTimeApr 27th 2008
     # 8
    It's certainly possible. Any script can pull data out of a session and a script that has your Vanilla database login info can pull from Vanilla's DB. But to make that info show up in Wordpress, you're talking about a Wordpress plugin rather than a Vanilla extension.

    Out of curiosity, why are you dropping the integration between WP and Vanilla?
    •  
      CommentAuthorsquirrel
    • CommentTimeApr 27th 2008 edited
     # 9
    Here's the relevant code in Vanilla:

    library/People/People.Class.Authenticator.php, GetIdentity() on line 107.
    Gets the user ID from the session or from cookies.

    library/People/People.Class.UserManager.php, GetSessionDataById() on line 527.
    Given a user ID, gets user properties from the database.

    The really fast and nasty way to do it would be some PHP code like this:

    <?php
    ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . $path_to_vanilla);
    include('appg/settings.php');
    $Configuration['SELF_URL'] = 'norender';
    include('appg/init_vanilla.php');

    echo $Context->Session->User->Name;
    ?>


    But that would pull a lot of Vanilla code into every load of your Wordpress page, which probably isn't what you want.
    • CommentAuthorwohoo
    • CommentTimeApr 27th 2008
     # 10
    I have no idea what to do with that information :)

    But I'm trying to stay away from the WP-Vanilla integration because:
    (a) by the sounds of it, too many things that can go wrong whenever something gets updated
    (b) I don't like to manage things I don't understand

    I'm actually using Janine to get Vanilla handle the comments for my WP posts so I only need to have the user/login info on the WP end as well. I don't need it for anything else. The way I'm designing my Vanilla is so it'll look completely like my site itself, and it would look a bit weird of there's only the ability to log in from half the site.

    Either a WP plugin or just a piece of code I could hardcode into my template would be fine.
    • CommentAuthorwohoo
    • CommentTimeApr 27th 2008 edited
     # 11
    Ok, how and where do I use that? I tried putting that into my sidebar (with correct paths to settings.php and init_vanilla.php) and all I get is a bunch of errors. What else/where else do I need to include?

    Warning: main(http://www.thatblognetwork.com/tvgbtest/forums/appg/settings.php) [function.main]: failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden in /home/wohoo/public_html/tvgbtest/wp-content/themes/default/sidebar.php on line 133

    Warning: main(http://www.thatblognetwork.com/tvgbtest/forums/appg/settings.php) [function.main]: failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden in /home/wohoo/public_html/tvgbtest/wp-content/themes/default/sidebar.php on line 133

    Warning: main() [function.include]: Failed opening 'http://www.thatblognetwork.com/tvgbtest/forums/appg/settings.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php:') in /home/wohoo/public_html/tvgbtest/wp-content/themes/default/sidebar.php on line 133

    Warning: main(http://www.thatblognetwork.com/tvgbtest/forums/appg/init_vanilla.php) [function.main]: failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden in /home/wohoo/public_html/tvgbtest/wp-content/themes/default/sidebar.php on line 135

    Warning: main(http://www.thatblognetwork.com/tvgbtest/forums/appg/init_vanilla.php) [function.main]: failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden in /home/wohoo/public_html/tvgbtest/wp-content/themes/default/sidebar.php on line 135

    Warning: main() [function.include]: Failed opening 'http://www.thatblognetwork.com/tvgbtest/forums/appg/init_vanilla.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php:') in /home/wohoo/public_html/tvgbtest/wp-content/themes/default/sidebar.php on line 135
    •  
      CommentAuthorsquirrel
    • CommentTimeApr 27th 2008
     # 12
    $path_to_vanilla means the directory path, not the URL path. In your case it looks like it would be /home/wohoo/public_html/forums

    But it still probably wouldn't work because I'm guessing WP renders the sidebar from inside a function and class declarations aren't valid inside a function.

    If you didn't understand that last sentence, then this is not a path you want to go down.

    Honestly I think the WP integration is a better bet for you. When you don't understand the code it's always better to go with a proven solution rather than a customized one.
    • CommentAuthorwohoo
    • CommentTimeApr 27th 2008 edited
     # 13
    Like this you mean?


    <?php
    ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . /home/wohoo/public_html/forums);
    include('appg/settings.php');
    $Configuration['SELF_URL'] = 'norender';
    include('appg/init_vanilla.php');

    echo $Context->Session->User->Name;
    ?>


    If so, then this is what I'm getting now:

    Parse error: syntax error, unexpected '/' in /home/wohoo/public_html/tvgbtest/wp-content/themes/default/sidebar.php on line 132

    If I insert it without the "/", like this:

    <?php
    ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . home/wohoo/public_html/forums);
    include('appg/settings.php');
    $Configuration['SELF_URL'] = 'norender';
    include('appg/init_vanilla.php');

    echo $Context->Session->User->Name;
    ?>


    then I get these errors:

    Warning: Division by zero in /home/wohoo/public_html/tvgbtest/wp-content/themes/default/sidebar.php on line 129

    Warning: Division by zero in /home/wohoo/public_html/tvgbtest/wp-content/themes/default/sidebar.php on line 129

    Warning: Division by zero in /home/wohoo/public_html/tvgbtest/wp-content/themes/default/sidebar.php on line 129

    Warning: main(appg/settings.php) [function.main]: failed to open stream: No such file or directory in /home/wohoo/public_html/tvgbtest/wp-content/themes/default/sidebar.php on line 130

    Warning: main(appg/settings.php) [function.main]: failed to open stream: No such file or directory in /home/wohoo/public_html/tvgbtest/wp-content/themes/default/sidebar.php on line 130

    Warning: main(appg/settings.php) [function.main]: failed to open stream: No such file or directory in /home/wohoo/public_html/tvgbtest/wp-content/themes/default/sidebar.php on line 130

    Warning: main() [function.include]: Failed opening 'appg/settings.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php:') in /home/wohoo/public_html/tvgbtest/wp-content/themes/default/sidebar.php on line 130

    Warning: main(appg/init_vanilla.php) [function.main]: failed to open stream: No such file or directory in /home/wohoo/public_html/tvgbtest/wp-content/themes/default/sidebar.php on line 132

    Warning: main(appg/init_vanilla.php) [function.main]: failed to open stream: No such file or directory in /home/wohoo/public_html/tvgbtest/wp-content/themes/default/sidebar.php on line 132

    Warning: main(appg/init_vanilla.php) [function.main]: failed to open stream: No such file or directory in /home/wohoo/public_html/tvgbtest/wp-content/themes/default/sidebar.php on line 132

    Warning: main() [function.include]: Failed opening 'appg/init_vanilla.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php:') in /home/wohoo/public_html/tvgbtest/wp-content/themes/default/sidebar.php on line 132


    The reason I'm staying away from integration is so whenever something goes wrong, I can just disable a plugin or quickly remove the code from the WP end. But if it's all integrated, then doing that would be much more difficult. No?
    • CommentAuthorcircuit
    • CommentTimeJun 22nd 2008
     # 14
    i asked the same question here, but have so far not had any answers. i did find a wordpress support thread asking the same question.

    http://lussumo.com/community/discussion/7278/
    • CommentAuthorfysicsluvr
    • CommentTimeJun 22nd 2008
     # 15
    check your parentheses on that line; you have one more ")" than you do "("
Add your comments
    Username Password
  • Format comments as