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.

Pulling username into Page Management tab?

edited October 2006 in Vanilla 1.0 Help
I have the Page Management add-on & I want to pull in the username onto the page as a variable so it prefills my Gabbly chat iframe.

I just need it to fill this markup (brackets removed):

iframe src='http://cw.gabbly.com/gabbly/cw.jsp?e=1&t=mysite.com&nick=NICK' scrolling='no' style='width:300px; height:250px' frameborder='0'

Sooo... what code would I need to pull in the username?

Comments

  • $Context->Session->User->Name
  • I'm a luddite, I need the exact code. <?php (something here) ?>
  • It depends on how you are building your code. I've used that in extensions I've built, but that was in php.
  • It's in the Page Management Extension. There's a form field for HTML & it says you can add PHP in. Hmm. Maybe I'll try a different approach.
  • NickENickE New
    edited October 2006
    <iframe src='http://cw.gabbly.com/gabbly/cw.jsp?e=1&t=mysite.com&nick=<?php echo(htmlspecialchars($GLOBALS['Context']->Session->User->Name)); ?>' scrolling='no' style='width:300px; height:250px' frameborder='0'>should work. I'm not 100% sure if the call to htmlspecialchars is needed, because the username might already be formatted by vanilla, but I suppose it's good to be sure.
  • That works. Thanks!
This discussion has been closed.