mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 20:00:37 +02:00
Forum Post BC-Fixes. Renamed forum-post shortcodes to avoid name conflicts.
This commit is contained in:
@@ -426,14 +426,11 @@ class e_parse_shortcode
|
||||
}
|
||||
elseif(E107_DBG_BBSC || E107_DBG_SC)
|
||||
{
|
||||
echo "<h3>Couldn't Find Class '".$className."' in <b>".$path."</b></h3>";
|
||||
// echo "<h3>Couldn't Find Class '".$className."' in <b>".$path."</b></h3>";
|
||||
echo "<div class='alert alert-danger'>Couldn't Load: <b>".$path."</b> with class-name:<b> {$className}</b> and pluginName <b>{$pluginName}</b></div>";
|
||||
}
|
||||
}
|
||||
elseif(E107_DBG_BBSC || E107_DBG_SC)
|
||||
{
|
||||
echo "<div class='alert alert-danger'>Couldn't Load: <b>".$path."</b> with class-name:<b> {$className}</b> and pluginName <b>{$pluginName}</b></div>";
|
||||
|
||||
}
|
||||
|
||||
// TODO - throw exception?
|
||||
return null;
|
||||
|
@@ -353,6 +353,7 @@ class forum_post_handler
|
||||
*/
|
||||
function getTemplate($type = 'post')
|
||||
{
|
||||
$pref = e107::pref('core');
|
||||
|
||||
global $FORUMPOST, $subjectbox, $userbox, $poll_form, $fileattach, $fileattach_alert; // needed for BC.
|
||||
|
||||
@@ -380,9 +381,217 @@ class forum_post_handler
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------- Legacy -------------------------
|
||||
|
||||
if(!defined("USER_WIDTH")){ define("USER_WIDTH","width:95%"); }
|
||||
|
||||
if(empty($userbox))
|
||||
{
|
||||
$userbox = "<tr>
|
||||
<td class='forumheader2' style='width:20%'>".LAN_FORUM_3010."</td>
|
||||
<td class='forumheader2' style='width:80%'>
|
||||
<input class='tbox form-control' type='text' name='anonname' size='71' value='".vartrue($anonname)."' maxlength='20' style='width:95%' />
|
||||
</td>
|
||||
</tr>";
|
||||
}
|
||||
|
||||
if(empty($subjectbox))
|
||||
{
|
||||
$subjectbox = "<tr>
|
||||
<td class='forumheader2' style='width:20%'>".LAN_FORUM_3011."</td>
|
||||
<td class='forumheader2' style='width:80%'>
|
||||
<input class='tbox form-control' type='text' name='subject' size='71' value='".vartrue($subject)."' maxlength='100' style='width:95%' />
|
||||
</td>
|
||||
</tr>";
|
||||
}
|
||||
|
||||
if(empty($fileattach))
|
||||
{
|
||||
$fileattach = "
|
||||
<tr>
|
||||
<td colspan='2' class='nforumcaption2 fcaption'>".($pref['image_post'] ? LAN_FORUM_3012 : LAN_FORUM_3013)."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:20%' class='forumheader3'>".LAN_FORUM_3014."</td>
|
||||
<td style='width:80%' class='forumheader3'>".str_replace(array('[', ']'), array('<b>', '</b>'), LAN_FORUM_3015)."<br>".LAN_FORUM_3016.": ".vartrue($allowed_filetypes)." <br />".LAN_FORUM_3017."<br />".LAN_FORUM_3018.": ".(vartrue($max_upload_size) ? $max_upload_size." ".LAN_FORUM_3019 : ini_get('upload_max_filesize'))."
|
||||
<br />
|
||||
<div id='fiupsection'>
|
||||
<span id='fiupopt'>
|
||||
<input class='tbox' name='file_userfile[]' type='file' size='47' />
|
||||
</span>
|
||||
</div>
|
||||
<input class='btn btn-default button' type='button' name='addoption' value='".LAN_FORUM_3020."' onclick=\"duplicateHTML('fiupopt','fiupsection')\" />
|
||||
</td>
|
||||
</tr>
|
||||
";
|
||||
|
||||
}
|
||||
// If the upload directory is not writable, we need to alert the user about this.
|
||||
if(empty($fileattach_alert))
|
||||
{
|
||||
$fileattach_alert = "
|
||||
<tr>
|
||||
<td colspan='2' class='nforumcaption2'>".($pref['image_post'] ? LAN_FORUM_3012 : LAN_FORUM_3013)."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' class='forumheader3'>".str_replace('[x]', e_FILE."public", LAN_FORUM_3021)."</td>
|
||||
</tr>\n";
|
||||
}
|
||||
// ------------
|
||||
|
||||
if(empty($FORUMPOST))
|
||||
{
|
||||
$FORUMPOST = "
|
||||
<div style='text-align:center'>
|
||||
<div class='spacer'>
|
||||
{FORMSTART}
|
||||
<table style='".USER_WIDTH."' class='fborder table'>
|
||||
<tr>
|
||||
<td colspan='2' class='fcaption'>{BACKLINK}
|
||||
</td>
|
||||
</tr>
|
||||
{USERBOX}
|
||||
{SUBJECTBOX}
|
||||
<tr>
|
||||
<td class='forumheader2' style='width:20%'>{POSTTYPE}</td>
|
||||
<td class='forumheader2' style='width:80%'>
|
||||
{POSTBOX}<br />
|
||||
{EMAILNOTIFY}<br />
|
||||
{NOEMOTES}<br />
|
||||
{POSTTHREADAS}
|
||||
</td>
|
||||
</tr>
|
||||
{POLL}
|
||||
{FILEATTACH}
|
||||
|
||||
<tr style='vertical-align:top'>
|
||||
<td colspan='2' class='forumheader' style='text-align:center'>
|
||||
{BUTTONS}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{FORMEND}
|
||||
|
||||
<table style='".USER_WIDTH."'>
|
||||
<tr>
|
||||
<td>
|
||||
{FORUMJUMP}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div></div>
|
||||
";
|
||||
}
|
||||
|
||||
if(empty($FORUMPOST_REPLY))
|
||||
{
|
||||
$FORUMPOST_REPLY = "
|
||||
<div style='text-align:center'>
|
||||
<div class='spacer'>
|
||||
{FORMSTART}
|
||||
<table style='".USER_WIDTH."' class='fborder table'>
|
||||
<tr>
|
||||
<td colspan='2' class='fcaption'>{BACKLINK}
|
||||
</td>
|
||||
</tr>
|
||||
{USERBOX}
|
||||
{SUBJECTBOX}
|
||||
<tr>
|
||||
<td class='forumheader2' style='width:20%'>{POSTTYPE}</td>
|
||||
<td class='forumheader2' style='width:80%'>
|
||||
{POSTBOX}<br />
|
||||
{EMAILNOTIFY}<br />
|
||||
{NOEMOTES}<br />
|
||||
{POSTTHREADAS}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{POLL}
|
||||
|
||||
{FILEATTACH}
|
||||
|
||||
<tr style='vertical-align:top'>
|
||||
<td colspan='2' class='forumheader' style='text-align:center'>
|
||||
{BUTTONS}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{FORMEND}
|
||||
|
||||
<table style='".USER_WIDTH."'>
|
||||
<tr>
|
||||
<td>
|
||||
{FORUMJUMP}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div></div>
|
||||
<div style='text-align:center'>
|
||||
{THREADTOPIC}
|
||||
{LATESTPOSTS}
|
||||
</div>
|
||||
";
|
||||
}
|
||||
|
||||
if(empty($LATESTPOSTS_START))
|
||||
{
|
||||
$LATESTPOSTS_START = "
|
||||
<table style='".USER_WIDTH."' class='fborder table'>
|
||||
<tr>
|
||||
<td colspan='2' class='fcaption' style='vertical-align:top'>".str_replace('[y]', "{LATESTPOSTSCOUNT}", LAN_FORUM_3022)."</td>
|
||||
</tr>";
|
||||
}
|
||||
|
||||
if(empty($LATESTPOSTS_POST))
|
||||
{
|
||||
$LATESTPOSTS_POST = "
|
||||
<tr>
|
||||
<td class='forumheader3' style='width:20%;vertical-align:top'><b>{POSTER}</b></td>
|
||||
<td class='forumheader3' style='width:80%'>
|
||||
<div class='smallblacktext' style='text-align:right'>".IMAGE_post2." {THREADDATESTAMP}</div>
|
||||
{POST}
|
||||
</td>
|
||||
</tr>
|
||||
";
|
||||
}
|
||||
|
||||
if(empty($LATESTPOSTS_END))
|
||||
{
|
||||
$LATESTPOSTS_END = "
|
||||
</table>
|
||||
";
|
||||
}
|
||||
|
||||
if(empty($THREADTOPIC_REPLY))
|
||||
{
|
||||
$THREADTOPIC_REPLY = "
|
||||
<table style='".USER_WIDTH."' class='fborder table'>
|
||||
<tr>
|
||||
<td colspan='2' class='fcaption' style='vertical-align:top'>".LAN_FORUM_1003."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='forumheader3' style='width:20%;vertical-align:top'><b>{POSTER}</b></td>
|
||||
<td class='forumheader3' style='width:80%'>
|
||||
<div class='smallblacktext' style='text-align:right'>".IMAGE_post2." {THREADDATESTAMP}</div>
|
||||
{POST}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
";
|
||||
}
|
||||
|
||||
|
||||
// -------------------------------- End Legacy Code ----------------------------------//
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if($type == 'post')
|
||||
{
|
||||
return (deftrue('BOOTSTRAP')) ? $FORUM_POST_TEMPLATE : array('form'=>$FORUMPOST);
|
||||
$template= (deftrue('BOOTSTRAP')) ? $FORUM_POST_TEMPLATE : array('form'=>$FORUMPOST);
|
||||
// print_a($template);
|
||||
return $this->upgradeTemplate($template);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -408,6 +617,39 @@ class forum_post_handler
|
||||
}
|
||||
|
||||
|
||||
private function upgradeTemplate($template)
|
||||
{
|
||||
$arr = array(
|
||||
'POSTOPTIONS' => "FORUM_POST_OPTIONS",
|
||||
'POSTOPTIONS_LABEL' => "FORUM_POST_OPTIONS_LABEL",
|
||||
'POLL' => 'FORUM_POST_POLL',
|
||||
'FORUM_AUTHOR' => 'FORUM_POST_AUTHOR',
|
||||
'FORUM_SUBJECT' => 'FORUM_POST_SUBJECT',
|
||||
'BUTTONS' => 'FORUM_POST_BUTTONS',
|
||||
'FORMSTART' => 'FORUM_POST_FORM_START',
|
||||
'FORMEND' => 'FORUM_POST_FORM_END',
|
||||
'POSTBOX' => 'FORUM_POST_TEXTAREA',
|
||||
'EMAILNOTIFY' => 'FORUM_POST_EMAIL_NOTIFY',
|
||||
'BACKLINK' => 'FORUM_POST_BREADCRUMB',
|
||||
'POSTTYPE' => 'FORUM_POST_TEXTAREA_LABEL'
|
||||
);
|
||||
|
||||
foreach($arr as $old => $new)
|
||||
{
|
||||
//$template = str_replace("{".$old."}", "{".$new."}", $template);
|
||||
$reg = '/\{'.$old.'((?:=|:)?[^\}]*)\}/'; // handle variations.
|
||||
$repl = '{'.$new.'$1}';
|
||||
$template = preg_replace($reg,$repl, $template);
|
||||
|
||||
}
|
||||
|
||||
// print_a($template);
|
||||
|
||||
return $template;
|
||||
|
||||
}
|
||||
|
||||
|
||||
function renderFormMove()
|
||||
{
|
||||
if(!deftrue('MODERATOR'))
|
||||
|
@@ -18,7 +18,7 @@ class plugin_forum_post_shortcodes extends e_shortcode
|
||||
$this->e107 = e107::getInstance();
|
||||
}
|
||||
|
||||
function sc_latestposts($parm)
|
||||
function sc_latestposts($parm) //TODO move elsewhere?
|
||||
{
|
||||
$parm = ($parm ? $parm : 10);
|
||||
global $LATESTPOSTS_START, $LATESTPOSTS_END, $LATESTPOSTS_POST;
|
||||
@@ -48,12 +48,12 @@ class plugin_forum_post_shortcodes extends e_shortcode
|
||||
return e107::getParser()->parseTemplate($THREADTOPIC_REPLY, true);
|
||||
}
|
||||
|
||||
function sc_formstart()
|
||||
function sc_forum_post_form_start()
|
||||
{
|
||||
return "<form class='form-horizontal' enctype='multipart/form-data' method='post' action='".e_REQUEST_URL."' id='dataform'>";
|
||||
}
|
||||
|
||||
function sc_formend()
|
||||
function sc_forum_post_form_end()
|
||||
{
|
||||
$frm = e107::getForm();
|
||||
return $frm->hidden('action',$this->var['action']).$frm->close();
|
||||
@@ -81,7 +81,7 @@ class plugin_forum_post_shortcodes extends e_shortcode
|
||||
return (USER == false ? $userbox : '');
|
||||
}
|
||||
|
||||
function sc_forum_author()
|
||||
function sc_forum_post_author()
|
||||
{
|
||||
$opts = array('size' => 'xlarge');
|
||||
$tp = e107::getParser();
|
||||
@@ -110,7 +110,7 @@ class plugin_forum_post_shortcodes extends e_shortcode
|
||||
return ($this->var['action'] == 'nt' ? $subjectbox : '');
|
||||
}
|
||||
|
||||
function sc_forum_subject()
|
||||
function sc_forum_post_subject()
|
||||
{
|
||||
$opts = array('size' => 'xlarge');
|
||||
|
||||
@@ -144,12 +144,12 @@ class plugin_forum_post_shortcodes extends e_shortcode
|
||||
|
||||
}
|
||||
|
||||
function sc_posttype()
|
||||
function sc_forum_post_textarea_label()
|
||||
{
|
||||
return ($this->var['action'] == 'nt' ? LAN_FORUM_2015 : LAN_FORUM_2006);
|
||||
}
|
||||
|
||||
function sc_postbox()
|
||||
function sc_forum_post_textarea()
|
||||
{
|
||||
$tp = e107::getParser();
|
||||
|
||||
@@ -181,7 +181,7 @@ class plugin_forum_post_shortcodes extends e_shortcode
|
||||
|
||||
}
|
||||
|
||||
function sc_buttons()
|
||||
function sc_forum_post_buttons()
|
||||
{
|
||||
|
||||
$ret = "<input class='btn btn-default button' type='submit' name='fpreview' value='".LAN_FORUM_3005."' /> ";
|
||||
@@ -272,10 +272,10 @@ class plugin_forum_post_shortcodes extends e_shortcode
|
||||
}
|
||||
|
||||
|
||||
function sc_postoptions_label()
|
||||
function sc_forum_post_options_label()
|
||||
{
|
||||
$type = $this->sc_postthreadas();
|
||||
$poll = $this->sc_poll('front');
|
||||
$poll = $this->sc_forum_post_poll('front');
|
||||
$attach = $this->sc_forumattachment();
|
||||
|
||||
if(empty($type) && empty($poll) && empty($attach))
|
||||
@@ -288,10 +288,10 @@ class plugin_forum_post_shortcodes extends e_shortcode
|
||||
|
||||
|
||||
|
||||
function sc_postoptions($parm='')
|
||||
function sc_forum_post_options($parm='')
|
||||
{
|
||||
$type = $this->sc_postthreadas();
|
||||
$poll = $this->sc_poll('front');
|
||||
$poll = $this->sc_forum_post_poll('front');
|
||||
$attach = $this->sc_forumattachment();
|
||||
|
||||
$tabs = array();
|
||||
@@ -369,7 +369,7 @@ class plugin_forum_post_shortcodes extends e_shortcode
|
||||
}
|
||||
|
||||
|
||||
function sc_poll($parm='')
|
||||
function sc_forum_post_poll($parm=null)
|
||||
{
|
||||
|
||||
if(!e107::isInstalled('poll'))
|
||||
@@ -390,11 +390,13 @@ class plugin_forum_post_shortcodes extends e_shortcode
|
||||
return $poll_form;
|
||||
}
|
||||
|
||||
|
||||
return "<tr><td><a href='#pollform' class='e-expandit'>".LAN_FORUM_3028."</a></td><td>
|
||||
//BC Code below.
|
||||
return "<tr><td class='forumheader3' style='vertical-align:top'><a href='#pollform' class='e-expandit' >".LAN_FORUM_3028."</a></td>
|
||||
<td class='forumheader3'>
|
||||
<div id='pollform' style='display:none'>
|
||||
<table class='table table-striped'>".$poll_form."</table></div></td></tr>";
|
||||
<table class='table table-striped' style='margin-left:0'>".$poll_form."</table></div></td></tr>";
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
@@ -416,7 +418,7 @@ class plugin_forum_post_shortcodes extends e_shortcode
|
||||
return '';
|
||||
}
|
||||
|
||||
function sc_backlink()
|
||||
function sc_forum_post_breadcrumb()
|
||||
{
|
||||
global $forum, $threadInfo, $eaction, $action,$forumInfo;
|
||||
|
||||
@@ -432,11 +434,11 @@ class plugin_forum_post_shortcodes extends e_shortcode
|
||||
|
||||
function sc_noemotes()
|
||||
{
|
||||
if(vartrue($eaction) == true) { return ; }
|
||||
if(vartrue($eaction) == true) { return null; }
|
||||
return "<input type='checkbox' name='no_emote' value='1' /> <span class='defaulttext'>".LAN_FORUM_3039.'</span>';
|
||||
}
|
||||
|
||||
function sc_emailnotify()
|
||||
function sc_forum_post_email_notify()
|
||||
{
|
||||
|
||||
|
||||
|
@@ -9,264 +9,47 @@
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
if(!defined("USER_WIDTH")){ define("USER_WIDTH","width:95%"); }
|
||||
|
||||
// the user box and subject box are not always displayed, therefore we need to define them /in case/ they are, if not they'll be ignored.
|
||||
|
||||
if(!vartrue($userbox))
|
||||
{
|
||||
$userbox = "<tr>
|
||||
<td class='forumheader2' style='width:20%'>".LAN_FORUM_3010."</td>
|
||||
<td class='forumheader2' style='width:80%'>
|
||||
<input class='tbox form-control' type='text' name='anonname' size='71' value='".vartrue($anonname)."' maxlength='20' style='width:95%' />
|
||||
</td>
|
||||
</tr>";
|
||||
}
|
||||
|
||||
if(!vartrue($subjectbox))
|
||||
{
|
||||
$subjectbox = "<tr>
|
||||
<td class='forumheader2' style='width:20%'>".LAN_FORUM_3011."</td>
|
||||
<td class='forumheader2' style='width:80%'>
|
||||
<input class='tbox form-control' type='text' name='subject' size='71' value='".vartrue($subject)."' maxlength='100' style='width:95%' />
|
||||
</td>
|
||||
</tr>";
|
||||
}
|
||||
|
||||
// the poll is optional, be careful when changing the values here, only change if you know what you're doing ...
|
||||
if(!vartrue($poll_form))
|
||||
{
|
||||
if(is_readable(e_PLUGIN.'poll/poll_class.php')) {
|
||||
require_once(e_PLUGIN.'poll/poll_class.php');
|
||||
$pollo = new poll;
|
||||
$poll_form = $pollo -> renderPollForm('forum');
|
||||
}
|
||||
}
|
||||
|
||||
// finally, file attach is optional, again only change this if you know what you're doing ...
|
||||
if(!vartrue($fileattach))
|
||||
{
|
||||
$fileattach = "
|
||||
<tr>
|
||||
<td colspan='2' class='nforumcaption2'>".($pref['image_post'] ? LAN_FORUM_3012 : LAN_FORUM_3013)."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:20%' class='forumheader3'>".LAN_FORUM_3014."</td>
|
||||
<td style='width:80%' class='forumheader3'>".str_replace(array('[', ']'), array('<b>', '</b>'), LAN_FORUM_3015)."<br>".LAN_FORUM_3016.": ".vartrue($allowed_filetypes)." <br />".LAN_FORUM_3017."<br />".LAN_FORUM_3018.": ".(vartrue($max_upload_size) ? $max_upload_size." ".LAN_FORUM_3019 : ini_get('upload_max_filesize'))."
|
||||
<br />
|
||||
<div id='fiupsection'>
|
||||
<span id='fiupopt'>
|
||||
<input class='tbox' name='file_userfile[]' type='file' size='47' />
|
||||
</span>
|
||||
</div>
|
||||
<input class='btn btn-default button' type='button' name='addoption' value='".LAN_FORUM_3020."' onclick=\"duplicateHTML('fiupopt','fiupsection')\" />
|
||||
</td>
|
||||
</tr>
|
||||
";
|
||||
//</td>
|
||||
//</tr>
|
||||
}
|
||||
// If the upload directory is not writable, we need to alert the user about this.
|
||||
if(!vartrue($fileattach_alert))
|
||||
{
|
||||
$fileattach_alert = "
|
||||
<tr>
|
||||
<td colspan='2' class='nforumcaption2'>".($pref['image_post'] ? LAN_FORUM_3012 : LAN_FORUM_3013)."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' class='forumheader3'>".str_replace('[x]', e_FILE."public", LAN_FORUM_3021)."</td>
|
||||
</tr>\n";
|
||||
}
|
||||
// ------------
|
||||
|
||||
if(!$FORUMPOST)
|
||||
{
|
||||
$FORUMPOST = "
|
||||
<div style='text-align:center'>
|
||||
<div class='spacer'>
|
||||
{FORMSTART}
|
||||
<table style='".USER_WIDTH."' class='fborder table'>
|
||||
<tr>
|
||||
<td colspan='2' class='fcaption'>{BACKLINK}
|
||||
</td>
|
||||
</tr>
|
||||
{USERBOX}
|
||||
{SUBJECTBOX}
|
||||
<tr>
|
||||
<td class='forumheader2' style='width:20%'>{POSTTYPE}</td>
|
||||
<td class='forumheader2' style='width:80%'>
|
||||
{POSTBOX}<br />
|
||||
{EMAILNOTIFY}<br />
|
||||
{NOEMOTES}<br />
|
||||
{POSTTHREADAS}
|
||||
</td>
|
||||
</tr>
|
||||
{POLL}
|
||||
{FILEATTACH}
|
||||
|
||||
<tr style='vertical-align:top'>
|
||||
<td colspan='2' class='forumheader' style='text-align:center'>
|
||||
{BUTTONS}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{FORMEND}
|
||||
|
||||
<table style='".USER_WIDTH."'>
|
||||
<tr>
|
||||
<td>
|
||||
{FORUMJUMP}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div></div>
|
||||
";
|
||||
}
|
||||
|
||||
if(!vartrue($FORUMPOST_REPLY))
|
||||
{
|
||||
$FORUMPOST_REPLY = "
|
||||
<div style='text-align:center'>
|
||||
<div class='spacer'>
|
||||
{FORMSTART}
|
||||
<table style='".USER_WIDTH."' class='fborder table'>
|
||||
<tr>
|
||||
<td colspan='2' class='fcaption'>{BACKLINK}
|
||||
</td>
|
||||
</tr>
|
||||
{USERBOX}
|
||||
{SUBJECTBOX}
|
||||
<tr>
|
||||
<td class='forumheader2' style='width:20%'>{POSTTYPE}</td>
|
||||
<td class='forumheader2' style='width:80%'>
|
||||
{POSTBOX}<br />
|
||||
{EMAILNOTIFY}<br />
|
||||
{NOEMOTES}<br />
|
||||
{POSTTHREADAS}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{POLL}
|
||||
|
||||
{FILEATTACH}
|
||||
|
||||
<tr style='vertical-align:top'>
|
||||
<td colspan='2' class='forumheader' style='text-align:center'>
|
||||
{BUTTONS}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{FORMEND}
|
||||
|
||||
<table style='".USER_WIDTH."'>
|
||||
<tr>
|
||||
<td>
|
||||
{FORUMJUMP}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div></div>
|
||||
<div style='text-align:center'>
|
||||
{THREADTOPIC}
|
||||
{LATESTPOSTS}
|
||||
</div>
|
||||
";
|
||||
}
|
||||
|
||||
if(!vartrue($LATESTPOSTS_START))
|
||||
{
|
||||
$LATESTPOSTS_START = "
|
||||
<table style='".USER_WIDTH."' class='fborder table'>
|
||||
<tr>
|
||||
<td colspan='2' class='fcaption' style='vertical-align:top'>".str_replace('[y]', "{LATESTPOSTSCOUNT}", LAN_FORUM_3022)."</td>
|
||||
</tr>";
|
||||
}
|
||||
|
||||
if(!vartrue($LATESTPOSTS_POST))
|
||||
{
|
||||
$LATESTPOSTS_POST = "
|
||||
<tr>
|
||||
<td class='forumheader3' style='width:20%;vertical-align:top'><b>{POSTER}</b></td>
|
||||
<td class='forumheader3' style='width:80%'>
|
||||
<div class='smallblacktext' style='text-align:right'>".IMAGE_post2." {THREADDATESTAMP}</div>
|
||||
{POST}
|
||||
</td>
|
||||
</tr>
|
||||
";
|
||||
}
|
||||
|
||||
if(!vartrue($LATESTPOSTS_END))
|
||||
{
|
||||
$LATESTPOSTS_END = "
|
||||
</table>
|
||||
";
|
||||
}
|
||||
|
||||
if(!vartrue($THREADTOPIC_REPLY))
|
||||
{
|
||||
$THREADTOPIC_REPLY = "
|
||||
<table style='".USER_WIDTH."' class='fborder table'>
|
||||
<tr>
|
||||
<td colspan='2' class='fcaption' style='vertical-align:top'>".LAN_FORUM_1003."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='forumheader3' style='width:20%;vertical-align:top'><b>{POSTER}</b></td>
|
||||
<td class='forumheader3' style='width:80%'>
|
||||
<div class='smallblacktext' style='text-align:right'>".IMAGE_post2." {THREADDATESTAMP}</div>
|
||||
{POST}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
";
|
||||
}
|
||||
|
||||
|
||||
// New in v2.x - requires a bootstrap theme be loaded.
|
||||
|
||||
$FORUM_POST_TEMPLATE['form'] = "
|
||||
{FORMSTART}
|
||||
$FORUM_POST_TEMPLATE['form'] = "
|
||||
{FORUM_POST_FORM_START}
|
||||
<div class='row-fluid'>
|
||||
<div>{BACKLINK}</div>
|
||||
<div>{FORUM_POST_BREADCRUMB}</div>
|
||||
</div>
|
||||
|
||||
<div class='form-group'>
|
||||
<label for='name' class='col-sm-3 control-label'>".LAN_FORUM_3010."</label>
|
||||
<div class='col-sm-9'>{FORUM_AUTHOR}</div>
|
||||
<div class='col-sm-9'>{FORUM_POST_AUTHOR}</div>
|
||||
</div>
|
||||
|
||||
<div class='form-group'>
|
||||
<label for='subject' class='col-sm-3 control-label'>".LAN_FORUM_3011."</label>
|
||||
<div class='col-sm-9'>{FORUM_SUBJECT}</div>
|
||||
<div class='col-sm-9'>{FORUM_POST_SUBJECT}</div>
|
||||
</div>
|
||||
|
||||
<div class='form-group'>
|
||||
<label class='col-sm-3 control-label'>{POSTTYPE}</label>
|
||||
<label class='col-sm-3 control-label'>{FORUM_POST_TEXTAREA_LABEL}</label>
|
||||
<div class='col-sm-9'>
|
||||
{POSTBOX}
|
||||
{EMAILNOTIFY}
|
||||
{FORUM_POST_TEXTAREA}
|
||||
{FORUM_POST_EMAIL_NOTIFY}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='form-group'>
|
||||
<label class='col-sm-3 control-label'>{POSTOPTIONS_LABEL}</label>
|
||||
<div class='col-sm-9'>{POSTOPTIONS}</div>
|
||||
<label class='col-sm-3 control-label'>{FORUM_POST_OPTIONS_LABEL}</label>
|
||||
<div class='col-sm-9'>{FORUM_POST_OPTIONS}</div>
|
||||
</div>
|
||||
|
||||
<div class='form-group text-center'>
|
||||
{BUTTONS}
|
||||
{FORUM_POST_BUTTONS}
|
||||
</div>
|
||||
{FORMEND}
|
||||
{FORUM_POST_FORM_END}
|
||||
|
||||
|
||||
";
|
||||
|
||||
|
||||
$js = <<<TMPL
|
||||
// javascript here.
|
||||
TMPL;
|
||||
|
||||
e107::js('footer-inline', $js);
|
||||
|
||||
|
||||
$FORUM_POST_TEMPLATE['reply'] = "";
|
||||
|
||||
@@ -289,4 +72,3 @@ $FORUM_CRUMB['forum']['sep'] = " :: ";
|
||||
|
||||
$FORUM_CRUMB['thread']['value'] = "<a class='forumlink' href='{THREAD_HREF}'>{THREAD_TITLE}</a>";
|
||||
|
||||
?>
|
@@ -626,6 +626,8 @@ class poll
|
||||
|
||||
//XXX New v2.x default for front-end. Currently used by forum-post in bootstrap mode.
|
||||
// TODO LAN - Needs a more generic LAN rewrite when used on another area than forum
|
||||
|
||||
|
||||
if ($mode == 'front')
|
||||
{
|
||||
|
||||
@@ -722,22 +724,22 @@ class poll
|
||||
|
||||
|
||||
//TODO Hardcoded FORUM code needs to be moved somewhere.
|
||||
if ($mode == 'forum')
|
||||
if ($mode == 'forum') // legacy code.
|
||||
{
|
||||
$text = "
|
||||
<tr>
|
||||
<td colspan='2'><span class='smalltext'>".LAN_FORUM_3029."</span></td>
|
||||
<td class='forumheader3' colspan='2'><span class='smalltext'>".LAN_FORUM_3029."</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:20%'><div class='normaltext'>".LAN_FORUM_3030.": </div></td>
|
||||
<td style='width:80%'class='forumheader3'><input class='tbox' type='text' name='poll_title' size='70' value='".$tp->post_toForm(vartrue($_POST['poll_title']))."' maxlength='200' /></td>
|
||||
<td class='forumheader3' style='width:20%'><div class='normaltext'>".LAN_FORUM_3030.": </div></td>
|
||||
<td class='forumheader3' style='width:80%' class='forumheader3'><input class='tbox' type='text' name='poll_title' size='70' value='".$tp->post_toForm(vartrue($_POST['poll_title']))."' maxlength='200' /></td>
|
||||
</tr>";
|
||||
|
||||
$option_count = (count(vartrue($_POST['poll_option'])) ? count($_POST['poll_option']) : 1);
|
||||
$text .= "
|
||||
<tr>
|
||||
<td style='width:20%'>".LAN_FORUM_3031."</td>
|
||||
<td style='width:80%'>
|
||||
<td class='forumheader3' style='width:20%'>".LAN_FORUM_3031."</td>
|
||||
<td class='forumheader3' style='width:80%'>
|
||||
<div id='pollsection'>";
|
||||
|
||||
for($count = 1; $count <= $option_count; $count++)
|
||||
@@ -758,15 +760,15 @@ class poll
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:20%'>".LAN_FORUM_3033."</td>
|
||||
<td style='width:80%'>
|
||||
<td class='forumheader3' style='width:20%'>".LAN_FORUM_3033."</td>
|
||||
<td class='forumheader3' style='width:80%'>
|
||||
<input type='radio' name='multipleChoice' value='1'".(vartrue($_POST['multipleChoice']) ? " checked='checked'" : "")." /> ".LAN_YES."
|
||||
<input type='radio' name='multipleChoice' value='0'".(!$_POST['multipleChoice'] ? " checked='checked'" : "")." /> ".LAN_NO."
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30%'>".LAN_FORUM_3034."</td>
|
||||
<td>
|
||||
<td class='forumheader3'style='width:30%'>".LAN_FORUM_3034."</td>
|
||||
<td class='forumheader3'>
|
||||
<input type='radio' name='storageMethod' value='0'".(!vartrue($_POST['storageMethod']) ? " checked='checked'" : "")." /> ".LAN_FORUM_3035."<br />
|
||||
<input type='radio' name='storageMethod' value='1'".($_POST['storageMethod'] == 1 ? " checked='checked'" : "")." /> ".LAN_FORUM_3036."<br />
|
||||
<input type='radio' name='storageMethod' value='2'".($_POST['storageMethod'] ==2 ? " checked='checked'" : "")." /> ".LAN_FORUM_3037."
|
||||
|
Reference in New Issue
Block a user