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.
    • CommentAuthorrmccue
    • CommentTimeNov 28th 2007 edited
     # 1
    I'm trying to semi-integrate Vanilla with another PHP file (it will be located at /roadmap/index.php, Vanilla is located at /forums/). I need to get the username, email address and URL if applicable. Should I use the following code, then do a var_dump() to find out the properties/members of $Context?
    include_once("./forum/appg/settings.php");
    include_once("./forum/appg/init_people.php");
    • CommentAuthorrmccue
    • CommentTimeNov 28th 2007
     # 2
    OK, it seems to be stored in $Content->Session, however it doesn't get any information. Will I need to change the cookie path?
    • CommentAuthorrmccue
    • CommentTimeNov 28th 2007
     # 3
    Well, it's still not working, even with that.
    • CommentAuthorrmccue
    • CommentTimeNov 28th 2007
     # 4
    Also, this example appears to be out of date.
    • CommentAuthorrmccue
    • CommentTimeNov 29th 2007
     # 5
    OK, I've finally got it working, after I changed the cookie path back. However, it doesn't give $Context->Session->User->FullName, even though I have it set in my account settings. Any ideas?
    • CommentAuthorrmccue
    • CommentTimeDec 6th 2007
     # 6
    I'm going to go on a guess here. Do I need to read the settings from the database?
  1.  # 7
    That would certainly be one way to do it. I'm pretty sure it should be in the user class somewhere though...
    •  
      CommentAuthorWanderer
    • CommentTimeDec 6th 2007
     # 8
    I did this for an external Page Manager page but I am not home at the moment. I will check it out soon and let you know what I did.

    It may not be the correct way but hey, it woiks for moi!
    • CommentAuthorrmccue
    • CommentTimeDec 8th 2007
     # 9
    Was it something like Mark's example? Because I thought that was only when using cookies, not sessions.
    •  
      CommentAuthorWanderer
    • CommentTimeDec 9th 2007
     # 10
    Sorry mate, the week-end was hectic, didn't get around to it.

    There's a couple of files you need to link to in the external page, maybe these two...
    <script type="text/javascript" src="/.../js/global.js"></script>
    <script type="text/javascript" src="/.../js/vanilla.js"></script>

    I will look it up first chance I get though, come to think of it, there is also a PHP file or two you'll need to link to.
    Do keep hassling me, I am all over the place at the moment.
    • CommentAuthorrmccue
    • CommentTimeDec 9th 2007
     # 11
    Sure, I understand. I was busy getting Christmas stuff ready :)

    OK, so what exactly are those JS scripts used for? I'm thinking that they may only be needed for the actual forum pages, but then again, I have been wrong before. :P
    •  
      CommentAuthorWanderer
    • CommentTimeDec 10th 2007
     # 12
    I've looked, I can't seem to find any reference to external files (maybe I was dreaming) but I did find this snippet which returns the logged in user...

    <?php echo $this->Context->Session->User->Name; ?>

    Posted: Monday, 10 December 2007 at 8:05PM

    • CommentAuthorrmccue
    • CommentTimeDec 10th 2007
     # 13
    Yes, but I'm trying to get the details, such as $Context->Session->User->FullName

    Do I need to query the database or not to get that information?
    • CommentAuthorrmccue
    • CommentTimeDec 14th 2007
     # 14
    I guess I'll just use the DokuWiki session, since it's integrated with Vanilla anyway...
Add your comments
    Username Password
  • Format comments as