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.
Options

Integrating with cbox

kjaonlinekjaonline
edited December 2011 in Vanilla 2.0 - 2.8

Hi guys,

I'm trying to integrate cbox.ws with vanilla, it has the following instructions.

Where the variable $name appears, insert the variable that represents the user's >name as retrieved from your userbase. This will vary depending on your CMS or >forum system.

What is the default $name variable for Vanilla?

and also

&pic=<?=urlencode($avatar_url)?>&lnk=<?=urlencode($profile_url)?>&ekey=<?=md5("gg1a3ha0bgnic2g0"."\t".$avatar_url."\t".$profile_url)?>

Change $avatar_url and $profile_url to the correct variables for the context. Note >that they both appear twice.

Would love some assistance.

Thanks!

Best Answer

  • Options
    ToddTodd Chief Product Officer Vanilla Staff
    Answer ✓

    You can grab most of what you need with Gdn::Session()->User. Try a print_r() on it to see what we give you.

Answers

  • Options
    ToddTodd Chief Product Officer Vanilla Staff
    Answer ✓

    You can grab most of what you need with Gdn::Session()->User. Try a print_r() on it to see what we give you.

  • Options
    kjaonlinekjaonline
    edited December 2011

    Thanks for answering my query @Todd but I have no programming background so I have no idea how to go about doing what you just said. Sorry :(

    Do I substitute $name with Gdn::Session()->User?

    The code that $name goes into is
    ...&amp;sec=form&amp;nme=<?=urlencode($name)?>&amp;nmekey=<?=md5('snip'.$name)?>

  • Options
    ToddTodd Chief Product Officer Vanilla Staff

    I sure can't teach you to code.

  • Options

    Sorry. What function is called when calling for a members username in the database, avatar and profile URL?

  • Options
    kjaonlinekjaonline
    edited December 2011

    Is this code correct?

    &amp;nme=<?=urlencode($UniqueID)?>&amp;nmekey=<?=md5('snip'.$UniqueID)?>

    Followed vanilla's single sign-on integration guide and wondering if UniqueID is how the script calls the database for a user.

Sign In or Register to comment.