public function Configure($AuthenticationSchemeAlias = NULL)
 {
     $Message = T("Please choose an authenticator to configure.");
     if (!is_null($AuthenticationSchemeAlias)) {
         $AuthenticatorInfo = Gdn::Authenticator()->GetAuthenticatorInfo($AuthenticationSchemeAlias);
         if ($AuthenticatorInfo !== FALSE) {
             $this->AuthenticatorChoice = $AuthenticationSchemeAlias;
             if (array_key_exists($AuthenticationSchemeAlias, $this->ConfigureList) && $this->ConfigureList[$AuthenticationSchemeAlias] !== FALSE) {
                 echo Gdn::Slice($this->ConfigureList[$AuthenticationSchemeAlias]);
                 return;
             } else {
                 $Message = sprintf(T("The %s Authenticator does not have any custom configuration options."), $AuthenticatorInfo['Name']);
             }
         }
     }
     $this->SetData('ConfigureMessage', $Message);
     $this->Render();
 }
 public function Slice($SliceName, $Arguments = array())
 {
     $CurrentPath = Gdn::Request()->Path();
     $ExplodedPath = explode('/', $CurrentPath);
     switch ($this instanceof Gdn_IPlugin) {
         case TRUE:
             $ReplacementIndex = 2;
             break;
         case FALSE:
             $ReplacementIndex = 1;
             break;
     }
     if ($ExplodedPath[0] == strtolower(Gdn::Dispatcher()->Application()) && $ExplodedPath[1] == strtolower(Gdn::Dispatcher()->Controller())) {
         $ReplacementIndex++;
     }
     $ExplodedPath[$ReplacementIndex] = $SliceName;
     $SlicePath = implode('/', $ExplodedPath);
     return Gdn::Slice($SlicePath);
 }
Example #3
0
File: info.php Project: TiGR/Garden
</h1>
<?php 
$CurrentStep = GetValue('CurrentStep', $this->Data, 0);
$Complete = FALSE;
if ($CurrentStep < 1) {
    // The import hasn't started yet.
    echo '<div class="Info">', T('Garden.Import.Info', 'You\'ve successfully uploaded an import file.
Please review the information below and click <b>Start Import</b> to begin the import.'), '</div>';
} else {
    $Steps = GetValue('Steps', $this->Data, array());
    if (count($Steps) > 0 && !array_key_exists($CurrentStep, $Steps)) {
        // The import is complete.
        $Complete = TRUE;
        // The import is complete.
        echo '<div class="Info">', T('Garden.Import.Complete.Description', 'You have successfully completed an import.
   Click <b>Finished</b> when you are ready.'), '</div>';
        echo Gdn::Slice('/dashboard/role/defaultroleswarning');
    } else {
        // The import is in process.
        echo '<div class="Info">', T('Garden.Import.Continue.Description', 'It appears as though you are in the middle of an import.
   Please choose one of the following options.'), '</div>';
    }
}
include $this->FetchViewLocation('stats', 'import', 'dashboard');
if ($CurrentStep < 1) {
    echo Anchor(T('Start Import'), 'dashboard/import/go', 'Button'), ' ', Anchor(T('Restart'), 'dashboard/import/restart', 'Button');
} elseif (!$Complete) {
    echo Anchor(T('Continue Import'), 'dashboard/import/go', 'Button'), ' ', Anchor(T('Restart'), 'dashboard/import/restart', 'Button');
} else {
    echo Anchor(T('Finished'), 'dashboard/import/restart', 'Button');
}
Example #4
0
                  echo $this->Form->TextBox('SignInUrl');
                  echo Wrap(T('The URL where users sign in on your site'));
               ?></li>
               <li><?php
                  echo $this->Form->Label(T('Sign-Out URL'), 'SignOutUrl');
                  echo $this->Form->TextBox('SignOutUrl');
                  echo Wrap(T('The URL where users sign out of your site'));
               ?></li>
            </ul>
            <?php
               echo $this->Form->Close('Save', '', array(
                                 'class' => 'SliceSubmit Button'
                              ));
            ?>
         </td>
         
         <td class="RemoteConfig">
            <div>
               <?php echo T("These are the settings you might need when you configure ProxyConnect on your remote website."); ?>
               <p>
                  <?php echo T("You will probably need to configure Vanilla and your remote application to use a shared Cookie Domain that they can both access. We've
                  tried to guess what that might be, based on your hostname, but you'll need to check this and make sure that it works."); ?>
               </p><br/>
            </div>
            <?php 
               echo Gdn::Slice('dashboard/settings/proxyconnect/integration/proxyconnectmanual/cookie');
            ?>
         </td>
      </tbody>
   </table>
</div>
Example #5
0
?>
</li>
            <li><?php 
echo $this->Form->Label(T('Sign-Out URL'), 'SignOutUrl');
echo $this->Form->TextBox('SignOutUrl');
echo Wrap(T('The URL where users sign out of your site'));
?>
</li>
         </ul>
         <?php 
echo $this->Form->Close('Save', '', array('class' => 'SliceSubmit Button'));
?>
      </td>
      
      <td class="RemoteConfig">
         <div>
            <?php 
echo T("These are the settings you might need when you configure ProxyConnect on your remote website.");
?>
            <p>
               <?php 
echo T("You will probably need to configure Vanilla and your remote application to use a shared Cookie Domain that they can both access. We've\r\n               tried to guess what that might be, based on your hostname, but you'll need to check this and make sure that it works.");
?>
            </p><br/>
         </div>
         <?php 
echo Gdn::Slice('dashboard/settings/proxyconnect/cookie');
?>
      </td>
   </tbody>
</table>