Beispiel #1
0
 function showFormatButtons()
 {
     global $tmpl;
     global $config;
     if (!$config->getValue('bbcodeLibAvailable')) {
         // no bbcode -> no buttons
         return;
     }
     if (count($this->elementButtonRequested) < 0) {
         // no buttons added -> nothing to show
         return;
     }
     // TODO: does also link to included javascript each time called
     // TODO: Make it do this only once
     include dirname(dirname(__FILE__)) . '/bbcode_buttons.php';
     $bbcode = new bbcode_buttons();
     foreach ($this->elementButtonRequested as $element) {
         $buttons = $bbcode->showBBCodeButtons($element);
         $tmpl->assign('buttonsToFormat', $buttons);
     }
 }
Beispiel #2
0
    echo '<span><textarea class="player_edit" id="edit_user_comment" rows="10" cols="50" name="user_comment">';
    echo $user_comment;
    echo '</textarea></span></p>';
    // logo/avatar url
    echo '<p><label class="player_edit" for="edit_avatar_url">Avatar URL: </label>';
    $site->write_self_closing_tag('input id="edit_avatar_url" type="text" name="logo_url" maxlength="200" size="60" value="' . $logo_url . '"');
    echo '</p>';
    // admin comments, these should only be set by an admin
    if ($allow_add_admin_comments_to_user_profile === true) {
        if ($site->bbcode_lib_available()) {
            echo "\n" . '<div class="player_edit">';
            echo '<div class="invisi" style="display: inline;">';
            echo '	<label class="player_edit">bbcode:</label><span>';
            echo '</div>';
            // bbcode_buttons.php file already included
            $bbcode = new bbcode_buttons();
            $bbcode->showBBCodeButtons('admin_comments');
            unset($bbcode);
            echo '</span>';
            echo "\n";
            echo '</div>' . "\n";
        }
        echo '<p><label class="player_edit" for="edit_admin_comments">Edit admin comments: </label>';
        echo '<span><textarea class="player_edit" id="edit_admin_comments" rows="10" cols="50" name="admin_comments">';
        echo $admin_comments;
        echo '</textarea></span></p>' . "\n";
    }
    echo '<div><input type="submit" name="edit_user_profile_data" value="Change user profile" id="send"></div>' . "\n";
    echo '</form>' . "\n";
    $site->dieAndEndPageNoBox('');
}
Beispiel #3
0
 protected function showForm()
 {
     global $site;
     global $tmpl;
     // protected against cross site injection attempts
     $randomKeyName = 'teamCreate_' . \user::getCurrentUser()->getID() . '_' . microtime();
     // convert some special chars to underscores
     $randomKeyName = strtr($randomKeyName, array(' ' => '_', '.' => '_'));
     $randomkeyValue = $site->setKey($randomKeyName);
     $tmpl->assign('keyName', $randomKeyName);
     $tmpl->assign('keyValue', htmlent($randomkeyValue));
     // bbcode editor
     include_once dirname(dirname(dirname(__FILE__))) . '/bbcode_buttons.php';
     $bbcode = new bbcode_buttons();
     // set up name of field to edit so javascript knows which element to manipulate
     $tmpl->assign('buttonsToFormat', $bbcode->showBBCodeButtons('team_description'));
     unset($bbcode);
 }
Beispiel #4
0
 protected function showForm()
 {
     global $site;
     global $tmpl;
     // protected against cross site injection attempts
     $randomKeyName = 'teamEdit_' . $this->team->getID() . '_' . microtime();
     // convert some special chars to underscores
     $randomKeyName = strtr($randomKeyName, array(' ' => '_', '.' => '_'));
     $randomkeyValue = $site->setKey($randomKeyName);
     $tmpl->assign('keyName', $randomKeyName);
     $tmpl->assign('keyValue', htmlent($randomkeyValue));
     // indicate if team is currently opened or closed
     $tmpl->assign('teamOpen', $this->team->getOpen());
     // bbcode editor
     include_once dirname(dirname(dirname(__FILE__))) . '/bbcode_buttons.php';
     $bbcode = new bbcode_buttons();
     // set up name of field to edit so javascript knows which element to manipulate
     $tmpl->assign('buttonsToFormat', $bbcode->showBBCodeButtons('team_description'));
     unset($bbcode);
     $tmpl->assign('teamDescription', $this->team->getRawDescription());
     $tmpl->assign('avatarURI', $this->team->getAvatarURI());
 }