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.

Vanilla PHP Page

Hi, I'm a new user with a vanilla forum installed, I want know how can create a php page with Vanilla? I need get user info for work with a form in php.

Sorry for my bad english.



  • Options
    R_JR_J Ex-Fanboy Munich Admin

    Not sure what you are trying to achieve, but maybe looking at those 2 examples could help:

  • Options
    edited June 2015

    Thanks I create a page with custom pages plugin, hmm how show a message only for guests? I have this:

    <?php if (!defined('APPLICATION')) exit(); ?> <?php /*---------------- show only for users ----------------------- */ if(Gdn::Session()->UserID < 1) throw NotFoundException(); /*--------------------------- ------------------------- */ $Session = Gdn::Session(); echo '<pre>'; print_r($Session); echo '</pre>'; ?> <h1>Form</h1>

    I dont want show:


    Page not found.

  • Options
    R_JR_J Ex-Fanboy Munich Admin
    edited June 2015
    <?php if (!defined('APPLICATION')) exit();
    $Session = Gdn::Session();
    // Redirect guests to another custom page
    if (!$Session->IsValid()) {
    // Output of decho is only visible for admins

    Seems like you plan to create the form with the html knowledge you have. You should try using Vanillas form builder.

Sign In or Register to comment.