mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 11:50:30 +02:00
Fixes #797 missing LANs and correct forum layout for bootstrap 3 css classes.
This commit is contained in:
@@ -123,13 +123,21 @@ $fVars->ICONKEY = "
|
||||
<td style='width:10%'><span class='smallblacktext'>".LAN_FORUM_0041."</span></td>
|
||||
</tr>\n</table>\n";
|
||||
|
||||
if(!$srchIcon = $tp->toGlyph('fa-search'))
|
||||
{
|
||||
$srchIcon = LAN_SEARCH;
|
||||
}
|
||||
|
||||
$fVars->SEARCH = "
|
||||
<form method='get' class='form-inline input-append' action='".e_BASE."search.php'>
|
||||
|
||||
<input class='tbox' type='text' name='q' size='20' value='' maxlength='50' />
|
||||
<input class='btn btn-default button' type='submit' name='s' value='".LAN_SEARCH."' />
|
||||
<div class='input-group'>
|
||||
<input class='tbox form-control' type='text' name='q' size='20' value='' maxlength='50' />
|
||||
<span class='input-group-btn'>
|
||||
<button class='btn btn-default button' type='submit' name='s' value='search' />".$srchIcon."</button>
|
||||
</span>
|
||||
<input type='hidden' name='r' value='0' />
|
||||
<input type='hidden' name='ref' value='forum' />
|
||||
</div>
|
||||
|
||||
</form>\n";
|
||||
|
||||
|
@@ -377,7 +377,7 @@ class e107forum
|
||||
case 'lock':
|
||||
if(e107::getDb()->update('forum_thread', 'thread_active=0 WHERE thread_id='.$id))
|
||||
{
|
||||
$ret['msg'] = FORLAN_CLOSE;
|
||||
$ret['msg'] = LAN_FORUM_CLOSE; // FORLAN_CLOSE;
|
||||
$ret['status'] = 'ok';
|
||||
}
|
||||
else
|
||||
@@ -390,7 +390,7 @@ class e107forum
|
||||
case 'unlock':
|
||||
if(e107::getDb()->update('forum_thread', 'thread_active=1 WHERE thread_id='.$id))
|
||||
{
|
||||
$ret['msg'] = FORLAN_OPEN;
|
||||
$ret['msg'] = LAN_FORUM_OPEN; // FORLAN_OPEN;
|
||||
$ret['status'] = 'ok';
|
||||
}
|
||||
else
|
||||
@@ -403,7 +403,7 @@ class e107forum
|
||||
case 'stick':
|
||||
if(e107::getDb()->update('forum_thread', 'thread_sticky=1 WHERE thread_id='.$id))
|
||||
{
|
||||
$ret['msg'] = FORLAN_STICK;
|
||||
$ret['msg'] = LAN_FORUM_STICK; // FORLAN_STICK;
|
||||
$ret['status'] = 'ok';
|
||||
}
|
||||
else
|
||||
@@ -416,7 +416,7 @@ class e107forum
|
||||
case 'unstick':
|
||||
if(e107::getDb()->update('forum_thread', 'thread_sticky=0 WHERE thread_id='.$id))
|
||||
{
|
||||
$ret['msg'] = FORLAN_UNSTICK;
|
||||
$ret['msg'] = LAN_FORUM_UNSTICK; // FORLAN_UNSTICK;
|
||||
$ret['status'] = 'ok';
|
||||
}
|
||||
else
|
||||
|
@@ -698,11 +698,11 @@ function fadminoptions($thread_info)
|
||||
|
||||
|
||||
|
||||
$text .= "<li><a href='".e_REQUEST_URI."' data-forum-action='delete' data-forum-thread='".$id."'>Delete ".$tp->toGlyph('trash');
|
||||
$text .= "<li><a href='".e_REQUEST_URI."' data-forum-action='".$stickUnstick."' data-forum-thread='".$id."'>".$lan[$stickUnstick]." ".$icon[$stickUnstick]."</a></li>";
|
||||
$text .= "<li><a href='".e_REQUEST_URI."' data-forum-action='".$lockUnlock."' data-forum-thread='".$id."'>".$lan[$lockUnlock]." ".$icon[$lockUnlock]."</a></li>";
|
||||
$text .= "<li class='text-right'><a href='".e_REQUEST_URI."' data-forum-action='delete' data-forum-thread='".$id."'>Delete ".$tp->toGlyph('trash');
|
||||
$text .= "<li class='text-right'><a href='".e_REQUEST_URI."' data-forum-action='".$stickUnstick."' data-forum-thread='".$id."'>".$lan[$stickUnstick]." ".$icon[$stickUnstick]."</a></li>";
|
||||
$text .= "<li class='text-right'><a href='".e_REQUEST_URI."' data-forum-action='".$lockUnlock."' data-forum-thread='".$id."'>".$lan[$lockUnlock]." ".$icon[$lockUnlock]."</a></li>";
|
||||
|
||||
$text .= "<li><a href='{$moveUrl}'>Move ".$tp->toGlyph('move')."</i></a></li>";
|
||||
$text .= "<li class='text-right'><a href='{$moveUrl}'>Move ".$tp->toGlyph('move')."</i></a></li>";
|
||||
|
||||
/*
|
||||
$text .= "<li><input type='image' ".IMAGE_admin_delete." name='deleteThread_{$threadId}' value='thread_action' onclick=\"return confirm_({$threadId})\" /> Delete</li>";
|
||||
|
@@ -382,12 +382,14 @@ if ($forum->checkPerm($thread->threadInfo['thread_forum_id'], 'post') && $thread
|
||||
|
||||
$tVars->QUICKREPLY = "
|
||||
<form action='" . $e107->url->create('forum/thread/reply', array('id' => $thread->threadId)) . "' method='post'>
|
||||
<textarea cols='80' placeholder='".LAN_FORUM_2007."' rows='4' id='forum-quickreply-text' class='tbox input-xxlarge' name='post' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'></textarea>
|
||||
<div class='center'>
|
||||
<input type='submit' data-token='".e_TOKEN."' data-forum-insert='".$ajaxInsert."' data-forum-post='".$thread->threadInfo['thread_forum_id']."' data-forum-thread='".$threadId."' data-forum-action='quickreply' name='reply' value='".LAN_FORUM_2006. "' class='btn btn-success button' />
|
||||
<input type='hidden' name='thread_id' value='$thread_parent' />
|
||||
|
||||
<div class='form-group'>
|
||||
<textarea cols='80' placeholder='".LAN_FORUM_2007."' rows='4' id='forum-quickreply-text' class='tbox input-xxlarge form-control' name='post' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'></textarea>
|
||||
</div>
|
||||
<div class='center text-center form-group'>
|
||||
<input type='submit' data-token='".e_TOKEN."' data-forum-insert='".$ajaxInsert."' data-forum-post='".$thread->threadInfo['thread_forum_id']."' data-forum-thread='".$threadId."' data-forum-action='quickreply' name='reply' value='".LAN_FORUM_2006. "' class='btn btn-success button' />
|
||||
<input type='hidden' name='thread_id' value='$thread_parent' />
|
||||
</div>
|
||||
|
||||
</form>";
|
||||
|
||||
// Preview should be reserved for the full 'Post reply' page. <input type='submit' name='fpreview' value='" . Preview . "' />
|
||||
|
@@ -277,7 +277,10 @@ define("LAN_FORUM_4012", "Unstick thread"); // LAN_398
|
||||
define("LAN_FORUM_4013", "Lock thread"); // LAN_399
|
||||
define("LAN_FORUM_4014", "Unlock thread"); // LAN_400
|
||||
|
||||
|
||||
define("LAN_FORUM_CLOSE", "Thread closed.");
|
||||
define("LAN_FORUM_OPEN", "Thread reopened.");
|
||||
define("LAN_FORUM_STICK", "Thread made sticky.");
|
||||
define("LAN_FORUM_UNSTICK", "Thread unstuck.");
|
||||
|
||||
|
||||
/* THIS WILL BE DELETED ONCE THE REWRITE IS DONE
|
||||
|
@@ -88,7 +88,7 @@ class plugin_forum_post_shortcodes extends e_shortcode
|
||||
|
||||
|
||||
$rows = (e107::wysiwyg()==true) ? 15 : 10;
|
||||
$ret = "<textarea class='e-wysiwyg tbox' id='post' name='post' cols='70' rows='{$rows}' style='width:95%' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'>$post</textarea>\n<br />\n";
|
||||
$ret = "<textarea class='e-wysiwyg tbox form-control' id='post' name='post' cols='70' rows='{$rows}' style='width:95%' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'>$post</textarea>\n<br />\n";
|
||||
// if(!e_WYSIWYG)
|
||||
{
|
||||
// $ret .= display_help('helpb', 'forum');
|
||||
|
@@ -428,7 +428,7 @@ class plugin_forum_view_shortcodes extends e_shortcode
|
||||
$ue = $tp->parseTemplate("{USER_EXTENDED=location.text_value}",true);
|
||||
$username = $this->postInfo['user_name'];
|
||||
|
||||
$text = '<div class="btn-group">
|
||||
$text = '<div class="btn-group ">
|
||||
|
||||
<a class="btn btn-small" href="'.e_BASE.'user.php?id.'.$this->postInfo['post_user'].'">'.$username.'</a>
|
||||
<button class="btn btn-small dropdown-toggle" data-toggle="dropdown">
|
||||
@@ -473,58 +473,58 @@ class plugin_forum_view_shortcodes extends e_shortcode
|
||||
$tp = e107::getParser();
|
||||
// {EMAILITEM} {PRINTITEM} {REPORTIMG}{EDITIMG}{QUOTEIMG}
|
||||
|
||||
$text = '<div class="btn-group">
|
||||
$text = '<div class="btn-group pull-right">
|
||||
<button class="btn btn-small dropdown-toggle" data-toggle="dropdown">
|
||||
Options
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right">';
|
||||
<ul class="dropdown-menu pull-right text-right">';
|
||||
|
||||
|
||||
$text .= "<li><a href='".e_HTTP."email.php?plugin:forum.".$this->postInfo['post_thread']."'>".LAN_FORUM_2044." ".$tp->toGlyph('envelope')."</a></li>";
|
||||
$text .= "<li><a href='".e_HTTP."print.php?plugin:forum.".$this->postInfo['post_thread']."'>".LAN_FORUM_2045." ".$tp->toGlyph('print')."</a></li>"; // FIXME
|
||||
$text .= "<li class='text-right'><a href='".e_HTTP."email.php?plugin:forum.".$this->postInfo['post_thread']."'>".LAN_FORUM_2044." ".$tp->toGlyph('envelope')."</a></li>";
|
||||
$text .= "<li class='text-right'><a href='".e_HTTP."print.php?plugin:forum.".$this->postInfo['post_thread']."'>".LAN_FORUM_2045." ".$tp->toGlyph('print')."</a></li>"; // FIXME
|
||||
|
||||
if (USER) // Report
|
||||
{
|
||||
$text .= "<li><a href='".$this->e107->url->create('forum/thread/report', "id={$this->postInfo['post_thread']}&post={$this->postInfo['post_id']}")."'>".LAN_FORUM_2046." ".$tp->toGlyph('flag')."</a></li>";
|
||||
$text .= "<li class='text-right'><a href='".$this->e107->url->create('forum/thread/report', "id={$this->postInfo['post_thread']}&post={$this->postInfo['post_id']}")."'>".LAN_FORUM_2046." ".$tp->toGlyph('flag')."</a></li>";
|
||||
}
|
||||
|
||||
// Edit
|
||||
if ( (USER && $this->postInfo['post_user'] == USERID && $this->thread->threadInfo['thread_active']))
|
||||
{
|
||||
$text .= "<li><a href='".e107::getUrl()->create('forum/thread/edit', array('id' => $this->postInfo['post_id']))."'>".LAN_FORUM_2039." ".$tp->toGlyph('edit')."</a></li>";
|
||||
$text .= "<li class='text-right'><a href='".e107::getUrl()->create('forum/thread/edit', array('id' => $this->postInfo['post_id']))."'>".LAN_FORUM_2039." ".$tp->toGlyph('edit')."</a></li>";
|
||||
|
||||
}
|
||||
|
||||
if($this->forum->checkperm($this->postInfo['post_forum'], 'post'))
|
||||
{
|
||||
$text .= "<li><a href='".e107::getUrl()->create('forum/thread/quote', array('id' => $this->postInfo['post_id']))."'>".LAN_FORUM_2041." ".$tp->toGlyph('share-alt')."</a></li>";
|
||||
$text .= "<li class='text-right'><a href='".e107::getUrl()->create('forum/thread/quote', array('id' => $this->postInfo['post_id']))."'>".LAN_FORUM_2041." ".$tp->toGlyph('share-alt')."</a></li>";
|
||||
}
|
||||
|
||||
|
||||
if (MODERATOR)
|
||||
{
|
||||
$text .= "<li class='divider'> </li>";
|
||||
$text .= "<li role='presentation' class='divider'> </li>";
|
||||
$type = ($this->postInfo['thread_start']) ? 'thread' : 'Post';
|
||||
|
||||
if ((USER && $this->postInfo['post_user'] != USERID && $this->thread->threadInfo['thread_active']))
|
||||
{
|
||||
$text .= "<li><a href='".e107::getUrl()->create('forum/thread/edit', array('id' => $this->postInfo['post_id']))."'>".LAN_FORUM_2039." ".$tp->toGlyph('edit')."</a></li>";
|
||||
$text .= "<li class='text-right'><a href='".e107::getUrl()->create('forum/thread/edit', array('id' => $this->postInfo['post_id']))."'>".LAN_FORUM_2039." ".$tp->toGlyph('edit')."</a></li>";
|
||||
}
|
||||
|
||||
// only show delete button when post is not the initial post of the topic
|
||||
if(!$this->forum->threadDetermineInitialPost($this->postInfo['post_id']))
|
||||
{
|
||||
$text .= "<li><a href='".e_REQUEST_URI."' data-forum-action='deletepost' data-forum-post='".$this->postInfo['post_id']."'>".LAN_FORUM_2040." ".$tp->toGlyph('trash')."</a></li>";
|
||||
$text .= "<li class='text-right'><a href='".e_REQUEST_URI."' data-forum-action='deletepost' data-forum-post='".$this->postInfo['post_id']."'>".LAN_FORUM_2040." ".$tp->toGlyph('trash')."</a></li>";
|
||||
}
|
||||
|
||||
if ($type == 'thread')
|
||||
{
|
||||
$text .= "<li><a href='" . e107::getUrl()->create('forum/thread/move', array('id' => $this->postInfo['post_id']))."'>".LAN_FORUM_2042." ".$tp->toGlyph('move')."</a></a></li>";
|
||||
$text .= "<li class='text-right'><a href='" . e107::getUrl()->create('forum/thread/move', array('id' => $this->postInfo['post_id']))."'>".LAN_FORUM_2042." ".$tp->toGlyph('move')."</a></a></li>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$text .= "<li><a href='" . e107::getUrl()->create('forum/thread/split', array('id' => $this->postInfo['post_id']))."'>".LAN_FORUM_2043." ".$tp->toGlyph('cut')."</a></li>";
|
||||
$text .= "<li class='text-right'><a href='" . e107::getUrl()->create('forum/thread/split', array('id' => $this->postInfo['post_id']))."'>".LAN_FORUM_2043." ".$tp->toGlyph('cut')."</a></li>";
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -225,7 +225,7 @@ $THREADTOPIC_REPLY = "
|
||||
|
||||
$FORUMPOST_TEMPLATE['form'] = "
|
||||
{FORMSTART}
|
||||
<div class='row-fluid'>
|
||||
<div class='row row-fluid'>
|
||||
<div>{BACKLINK}</div>
|
||||
</div>
|
||||
|
||||
|
@@ -79,14 +79,14 @@ $FORUM_TRACK_END = "<br />TRACK-END";
|
||||
// New in v2.x - requires a bootstrap theme be loaded.
|
||||
|
||||
|
||||
$FORUM_TEMPLATE['main-start'] = "<div class='row-fluid'>
|
||||
{FORUM_BREADCRUMB}
|
||||
<div class='right'>
|
||||
{SEARCH}
|
||||
$FORUM_TEMPLATE['main-start'] = "<div class='row row-fluid'>
|
||||
{FORUM_BREADCRUMB}
|
||||
<div class='form-group right'>
|
||||
{SEARCH}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<table class='table table-striped'>
|
||||
<div class='row'>
|
||||
<table class='table table-striped table-bordered table-hover'>
|
||||
<colgroup>
|
||||
<col style='width:3%' />
|
||||
<col />
|
||||
@@ -114,7 +114,7 @@ $FORUM_TEMPLATE['main-forum'] = "<tr>
|
||||
<td><small>{LASTPOSTUSER} {LASTPOSTDATE}</small></td>
|
||||
</tr>";
|
||||
|
||||
$FORUM_TEMPLATE['main-end'] = "</table>";
|
||||
$FORUM_TEMPLATE['main-end'] = "</table></div>";
|
||||
/*
|
||||
$FORUM_TEMPLATE['main-end'] .= "
|
||||
|
||||
|
@@ -282,10 +282,10 @@ $FORUM_CRUMB['forum']['value'] = "{FORUM_TITLE}";
|
||||
//TODO Find a good place to put a {SEARCH} dropdown.
|
||||
|
||||
$FORUM_VIEWFORUM_TEMPLATE['start'] = "";
|
||||
$FORUM_VIEWFORUM_TEMPLATE['header'] = "<div class='row-fluid'><div>{BACKLINK}</div> </div>
|
||||
<div class='row-fluid'>
|
||||
<div class='span9 pull-left'><h3>{FORUMTITLE}</h3></div>
|
||||
<div class='span3 pull-right right' style='padding-top:10px'>{NEWTHREADBUTTONX}</div></div>
|
||||
$FORUM_VIEWFORUM_TEMPLATE['header'] = "<div class='row row-fluid'><div>{BACKLINK}</div> </div>
|
||||
<div class='row row-fluid'>
|
||||
<div class='col-md-9 span9 pull-left'><h3>{FORUMTITLE}</h3></div>
|
||||
<div class='col-md-3 span3 pull-right right' style='padding-top:10px'>{NEWTHREADBUTTONX}</div></div>
|
||||
<table class='table table-hover table-striped'>
|
||||
<colgroup>
|
||||
<col style='width:3%' />
|
||||
|
@@ -312,40 +312,40 @@ $FORUM_CRUMB['forum']['value'] = "<a class='forumlink' href='{FORUM_HREF}'>{FORU
|
||||
|
||||
$FORUM_VIEWTOPIC_TEMPLATE['start'] = "
|
||||
|
||||
<div class='row-fluid'>
|
||||
<div class='row row-fluid'>
|
||||
<div>{BACKLINK}</div>
|
||||
</div>
|
||||
|
||||
<div class='row-fluid'>
|
||||
<div class='span9 pull-left'><h3>{THREADNAME}</h3></div><div class='span3 pull-right right' style='padding-top:10px'>{BUTTONSX}</div>
|
||||
<div class='row row-fluid'>
|
||||
<div class='col-md-9 span9 pull-left'><h3>{THREADNAME}</h3></div><div class='col-md-3 span3 pull-right right text-right' style='padding-top:10px'>{BUTTONSX}</div>
|
||||
</div>
|
||||
|
||||
{MESSAGE}
|
||||
|
||||
|
||||
<ul id='forum-viewtopic' class='unstyled'>
|
||||
<ul id='forum-viewtopic' class='unstyled list-unstyled'>
|
||||
<li class='divider'></li>
|
||||
";
|
||||
|
||||
$FORUM_VIEWTOPIC_TEMPLATE['thread'] = "
|
||||
<li id='post-{POSTID}'>
|
||||
<div class='row-fluid btn-navbar'>
|
||||
<div class='span2 center'>{NEWFLAG}<small>
|
||||
<div class='row row-fluid btn-navbar navbar-btn'>
|
||||
<div class='col-md-2 span2 center'>{NEWFLAG}<small>
|
||||
{LEVEL=badge} {LEVEL=pic}
|
||||
</small> {ANON_IP}</div>
|
||||
<div class='span4 muted'><small>{THREADDATESTAMP=relative}</small></div>
|
||||
<div class='span5 muted right'><small>{LASTEDIT}{LASTEDITBY=link}</small></div>
|
||||
<div class='span1 right'>{POSTOPTIONS}</div>
|
||||
<div class='col-md-4 text-muted span4 muted'><small>{THREADDATESTAMP=relative}</small></div>
|
||||
<div class='col-md-5 text-muted span5 muted right text-right'><small>{LASTEDIT}{LASTEDITBY=link}</small></div>
|
||||
<div class='col-md-1 span1 right text-right'>{POSTOPTIONS}</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class='row-fluid' >
|
||||
<div class='span2 center'>
|
||||
<div class='row row-fluid' >
|
||||
<div class='col-md-2 span2 center'>
|
||||
{AVATAR}<br />
|
||||
{USERCOMBO}<br />
|
||||
{CUSTOMTITLE}
|
||||
</div>
|
||||
<div class='span9 '>
|
||||
<div class='col-md-9 span9 '>
|
||||
{POLL}
|
||||
{THREAD_TEXT}
|
||||
{ATTACHMENTS}
|
||||
@@ -353,15 +353,15 @@ $FORUM_VIEWTOPIC_TEMPLATE['thread'] = "
|
||||
</div>
|
||||
|
||||
|
||||
<div class='row-fluid'>
|
||||
<div class='span2 finfobar'>
|
||||
<div class='row row-fluid'>
|
||||
<div class='col-md-2 span2 finfobar'>
|
||||
|
||||
</div>
|
||||
<div class='span9 finfobar' >
|
||||
<div class='col-md-9 span9 finfobar' >
|
||||
<small> {SIGNATURE=clean}</small>
|
||||
</div>
|
||||
|
||||
<div class='span3'>
|
||||
<div class='col-md-3 span3'>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -370,10 +370,10 @@ $FORUM_VIEWTOPIC_TEMPLATE['thread'] = "
|
||||
<li class='divider'></li>";
|
||||
|
||||
$FORUM_VIEWTOPIC_TEMPLATE['end'] = "</ul>
|
||||
<div class='row-fluid clearfix'>
|
||||
<div class='span3 pull-left'>{GOTOPAGES}</div>
|
||||
<div class='span6 center'>{QUICKREPLY}</div>
|
||||
<div class='span3 pull-right right '>{BUTTONSX}</div>
|
||||
<div class='row row-fluid clearfix'>
|
||||
<div class='col-md-3 span3 pull-left'>{GOTOPAGES}</div>
|
||||
<div class='col-md-6 text-center span6 center'>{QUICKREPLY}</div>
|
||||
<div class='col-md-3 span3 pull-right right '>{BUTTONSX}</div>
|
||||
</div>
|
||||
{THREADSTATUS}
|
||||
|
||||
|
Reference in New Issue
Block a user