Ejemplo n.º 1
0
         break;
     }
     $quote = "[quote=" . $post->uname() . "]" . $post->getVar('post_text', 'e') . "[/quote]\n\n";
 }
 $form->addElement(new RMFormEditor(__('Post', 'bxpress'), 'msg', '90%', '300px', $rmc_config['editor_type'] == 'tiny' ? $post->getVar('post_text') : $post->getVar('post_text', 'e')), true);
 $form->addElement(new RMFormHidden('op', 'post'));
 $form->addElement(new RMFormHidden('id', $id));
 $ele = new RMFormButtonGroup();
 $ele->addButton('sbt', __('Save Changes', 'bxpress'), 'submit');
 $ele->addButton('cancel', _CANCEL, 'button', 'onclick="window.location = \'topic.php?pid=' . $post->id() . '#p' . $post->id() . '\'";');
 $form->addElement($ele);
 // Adjuntar Archivos
 if ($forum->attachments() && $forum->isAllowed($xoopsUser ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS, 'attach')) {
     $forma = new RMForm('<a name="attachments"></a>' . __('Attached Files', 'bxpress'), 'frmAttach', 'edit.php');
     $forma->addElement(new RMFormSubTitle(sprintf(__('You can upload new files to this post. You have a limit of <strong>%s</strong> attachment per post.', 'bxpress'), $xoopsModuleConfig['attachlimit']), 1, 'even'));
     if ($post->totalAttachments() < $xoopsModuleConfig['attachlimit']) {
         $ele = new RMFormFile(__('Attach File:', 'bxpress'), 'attach', 45, $xoopsModuleConfig['maxfilesize'] * 1024);
         $ele->setDescription(sprintf(__('Allowed File Types: %s', 'bxpress'), implode(',', $forum->extensions())));
         $forma->addElement($ele, true);
         $forma->setExtra('enctype="multipart/form-data"');
     }
     // Lista de Archivos Adjuntos
     $list = new RMFormCheck(__('Cuerrent Attachments', 'bxpress'));
     $list->asTable(1);
     foreach ($post->attachments() as $file) {
         $list->addOption("<img src='" . $file->getIcon() . "' align='absmiddle' /> " . $file->name() . " (" . RMUtilities::formatBytesSize($file->size()) . ")", 'files[]', $file->id());
     }
     $forma->addElement($list);
     $ele = new RMFormButtonGroup();
     if ($post->totalAttachments() < $xoopsModuleConfig['attachlimit']) {
         $ele->addButton('upload', __('Upload File', 'bxpress'), 'submit');