1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 21:57:51 +02:00

Fixes #797 missing LANs and correct forum layout for bootstrap 3 css classes.

This commit is contained in:
Cameron
2015-01-30 02:50:37 -08:00
parent 5f61cf2ccb
commit 552d113ce0
11 changed files with 77 additions and 64 deletions

View File

@@ -123,13 +123,21 @@ $fVars->ICONKEY = "
<td style='width:10%'><span class='smallblacktext'>".LAN_FORUM_0041."</span></td> <td style='width:10%'><span class='smallblacktext'>".LAN_FORUM_0041."</span></td>
</tr>\n</table>\n"; </tr>\n</table>\n";
if(!$srchIcon = $tp->toGlyph('fa-search'))
{
$srchIcon = LAN_SEARCH;
}
$fVars->SEARCH = " $fVars->SEARCH = "
<form method='get' class='form-inline input-append' action='".e_BASE."search.php'> <form method='get' class='form-inline input-append' action='".e_BASE."search.php'>
<div class='input-group'>
<input class='tbox' type='text' name='q' size='20' value='' maxlength='50' /> <input class='tbox form-control' type='text' name='q' size='20' value='' maxlength='50' />
<input class='btn btn-default button' type='submit' name='s' value='".LAN_SEARCH."' /> <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='r' value='0' />
<input type='hidden' name='ref' value='forum' /> <input type='hidden' name='ref' value='forum' />
</div>
</form>\n"; </form>\n";

View File

@@ -377,7 +377,7 @@ class e107forum
case 'lock': case 'lock':
if(e107::getDb()->update('forum_thread', 'thread_active=0 WHERE thread_id='.$id)) 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'; $ret['status'] = 'ok';
} }
else else
@@ -390,7 +390,7 @@ class e107forum
case 'unlock': case 'unlock':
if(e107::getDb()->update('forum_thread', 'thread_active=1 WHERE thread_id='.$id)) 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'; $ret['status'] = 'ok';
} }
else else
@@ -403,7 +403,7 @@ class e107forum
case 'stick': case 'stick':
if(e107::getDb()->update('forum_thread', 'thread_sticky=1 WHERE thread_id='.$id)) 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'; $ret['status'] = 'ok';
} }
else else
@@ -416,7 +416,7 @@ class e107forum
case 'unstick': case 'unstick':
if(e107::getDb()->update('forum_thread', 'thread_sticky=0 WHERE thread_id='.$id)) 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'; $ret['status'] = 'ok';
} }
else else

View File

@@ -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 class='text-right'><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 class='text-right'><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='".$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>"; $text .= "<li><input type='image' ".IMAGE_admin_delete." name='deleteThread_{$threadId}' value='thread_action' onclick=\"return confirm_({$threadId})\" /> Delete</li>";

View File

@@ -382,12 +382,14 @@ if ($forum->checkPerm($thread->threadInfo['thread_forum_id'], 'post') && $thread
$tVars->QUICKREPLY = " $tVars->QUICKREPLY = "
<form action='" . $e107->url->create('forum/thread/reply', array('id' => $thread->threadId)) . "' method='post'> <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='form-group'>
<div class='center'> <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>
<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> </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>"; </form>";
// Preview should be reserved for the full 'Post reply' page. <input type='submit' name='fpreview' value='" . Preview . "' /> &nbsp; // Preview should be reserved for the full 'Post reply' page. <input type='submit' name='fpreview' value='" . Preview . "' /> &nbsp;

View File

@@ -277,7 +277,10 @@ define("LAN_FORUM_4012", "Unstick thread"); // LAN_398
define("LAN_FORUM_4013", "Lock thread"); // LAN_399 define("LAN_FORUM_4013", "Lock thread"); // LAN_399
define("LAN_FORUM_4014", "Unlock thread"); // LAN_400 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 /* THIS WILL BE DELETED ONCE THE REWRITE IS DONE

View File

@@ -88,7 +88,7 @@ class plugin_forum_post_shortcodes extends e_shortcode
$rows = (e107::wysiwyg()==true) ? 15 : 10; $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) // if(!e_WYSIWYG)
{ {
// $ret .= display_help('helpb', 'forum'); // $ret .= display_help('helpb', 'forum');

View File

@@ -428,7 +428,7 @@ class plugin_forum_view_shortcodes extends e_shortcode
$ue = $tp->parseTemplate("{USER_EXTENDED=location.text_value}",true); $ue = $tp->parseTemplate("{USER_EXTENDED=location.text_value}",true);
$username = $this->postInfo['user_name']; $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> <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"> <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(); $tp = e107::getParser();
// {EMAILITEM} {PRINTITEM} {REPORTIMG}{EDITIMG}{QUOTEIMG} // {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"> <button class="btn btn-small dropdown-toggle" data-toggle="dropdown">
Options Options
<span class="caret"></span> <span class="caret"></span>
</button> </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 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><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."print.php?plugin:forum.".$this->postInfo['post_thread']."'>".LAN_FORUM_2045." ".$tp->toGlyph('print')."</a></li>"; // FIXME
if (USER) // Report 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 // Edit
if ( (USER && $this->postInfo['post_user'] == USERID && $this->thread->threadInfo['thread_active'])) 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')) 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) if (MODERATOR)
{ {
$text .= "<li class='divider'> </li>"; $text .= "<li role='presentation' class='divider'> </li>";
$type = ($this->postInfo['thread_start']) ? 'thread' : 'Post'; $type = ($this->postInfo['thread_start']) ? 'thread' : 'Post';
if ((USER && $this->postInfo['post_user'] != USERID && $this->thread->threadInfo['thread_active'])) 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 // only show delete button when post is not the initial post of the topic
if(!$this->forum->threadDetermineInitialPost($this->postInfo['post_id'])) 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') 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 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>";
} }
} }

View File

@@ -225,7 +225,7 @@ $THREADTOPIC_REPLY = "
$FORUMPOST_TEMPLATE['form'] = " $FORUMPOST_TEMPLATE['form'] = "
{FORMSTART} {FORMSTART}
<div class='row-fluid'> <div class='row row-fluid'>
<div>{BACKLINK}</div> <div>{BACKLINK}</div>
</div> </div>

View File

@@ -79,14 +79,14 @@ $FORUM_TRACK_END = "<br />TRACK-END";
// New in v2.x - requires a bootstrap theme be loaded. // New in v2.x - requires a bootstrap theme be loaded.
$FORUM_TEMPLATE['main-start'] = "<div class='row-fluid'> $FORUM_TEMPLATE['main-start'] = "<div class='row row-fluid'>
{FORUM_BREADCRUMB} {FORUM_BREADCRUMB}
<div class='right'> <div class='form-group right'>
{SEARCH} {SEARCH}
</div>
</div> </div>
<div class='row'>
</div> <table class='table table-striped table-bordered table-hover'>
<table class='table table-striped'>
<colgroup> <colgroup>
<col style='width:3%' /> <col style='width:3%' />
<col /> <col />
@@ -114,7 +114,7 @@ $FORUM_TEMPLATE['main-forum'] = "<tr>
<td><small>{LASTPOSTUSER} {LASTPOSTDATE}</small></td> <td><small>{LASTPOSTUSER} {LASTPOSTDATE}</small></td>
</tr>"; </tr>";
$FORUM_TEMPLATE['main-end'] = "</table>"; $FORUM_TEMPLATE['main-end'] = "</table></div>";
/* /*
$FORUM_TEMPLATE['main-end'] .= " $FORUM_TEMPLATE['main-end'] .= "

View File

@@ -282,10 +282,10 @@ $FORUM_CRUMB['forum']['value'] = "{FORUM_TITLE}";
//TODO Find a good place to put a {SEARCH} dropdown. //TODO Find a good place to put a {SEARCH} dropdown.
$FORUM_VIEWFORUM_TEMPLATE['start'] = ""; $FORUM_VIEWFORUM_TEMPLATE['start'] = "";
$FORUM_VIEWFORUM_TEMPLATE['header'] = "<div class='row-fluid'><div>{BACKLINK}</div> </div> $FORUM_VIEWFORUM_TEMPLATE['header'] = "<div class='row row-fluid'><div>{BACKLINK}</div> </div>
<div class='row-fluid'> <div class='row row-fluid'>
<div class='span9 pull-left'><h3>{FORUMTITLE}</h3></div> <div class='col-md-9 span9 pull-left'><h3>{FORUMTITLE}</h3></div>
<div class='span3 pull-right right' style='padding-top:10px'>{NEWTHREADBUTTONX}</div></div> <div class='col-md-3 span3 pull-right right' style='padding-top:10px'>{NEWTHREADBUTTONX}</div></div>
<table class='table table-hover table-striped'> <table class='table table-hover table-striped'>
<colgroup> <colgroup>
<col style='width:3%' /> <col style='width:3%' />

View File

@@ -312,40 +312,40 @@ $FORUM_CRUMB['forum']['value'] = "<a class='forumlink' href='{FORUM_HREF}'>{FORU
$FORUM_VIEWTOPIC_TEMPLATE['start'] = " $FORUM_VIEWTOPIC_TEMPLATE['start'] = "
<div class='row-fluid'> <div class='row row-fluid'>
<div>{BACKLINK}</div> <div>{BACKLINK}</div>
</div> </div>
<div class='row-fluid'> <div class='row 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='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> </div>
{MESSAGE} {MESSAGE}
<ul id='forum-viewtopic' class='unstyled'> <ul id='forum-viewtopic' class='unstyled list-unstyled'>
<li class='divider'></li> <li class='divider'></li>
"; ";
$FORUM_VIEWTOPIC_TEMPLATE['thread'] = " $FORUM_VIEWTOPIC_TEMPLATE['thread'] = "
<li id='post-{POSTID}'> <li id='post-{POSTID}'>
<div class='row-fluid btn-navbar'> <div class='row row-fluid btn-navbar navbar-btn'>
<div class='span2 center'>{NEWFLAG}<small> <div class='col-md-2 span2 center'>{NEWFLAG}<small>
{LEVEL=badge} {LEVEL=pic} {LEVEL=badge} {LEVEL=pic}
</small> {ANON_IP}</div> </small> {ANON_IP}</div>
<div class='span4 muted'><small>{THREADDATESTAMP=relative}</small></div> <div class='col-md-4 text-muted span4 muted'><small>{THREADDATESTAMP=relative}</small></div>
<div class='span5 muted right'><small>{LASTEDIT}{LASTEDITBY=link}</small></div> <div class='col-md-5 text-muted span5 muted right text-right'><small>{LASTEDIT}{LASTEDITBY=link}</small></div>
<div class='span1 right'>{POSTOPTIONS}</div> <div class='col-md-1 span1 right text-right'>{POSTOPTIONS}</div>
</div> </div>
<div class='row-fluid' > <div class='row row-fluid' >
<div class='span2 center'> <div class='col-md-2 span2 center'>
{AVATAR}<br /> {AVATAR}<br />
{USERCOMBO}<br /> {USERCOMBO}<br />
{CUSTOMTITLE} {CUSTOMTITLE}
</div> </div>
<div class='span9 '> <div class='col-md-9 span9 '>
{POLL} {POLL}
{THREAD_TEXT} {THREAD_TEXT}
{ATTACHMENTS} {ATTACHMENTS}
@@ -353,15 +353,15 @@ $FORUM_VIEWTOPIC_TEMPLATE['thread'] = "
</div> </div>
<div class='row-fluid'> <div class='row row-fluid'>
<div class='span2 finfobar'> <div class='col-md-2 span2 finfobar'>
&nbsp; &nbsp;
</div> </div>
<div class='span9 finfobar' > <div class='col-md-9 span9 finfobar' >
<small> {SIGNATURE=clean}</small> <small> {SIGNATURE=clean}</small>
</div> </div>
<div class='span3'> <div class='col-md-3 span3'>
</div> </div>
</div> </div>
@@ -370,10 +370,10 @@ $FORUM_VIEWTOPIC_TEMPLATE['thread'] = "
<li class='divider'></li>"; <li class='divider'></li>";
$FORUM_VIEWTOPIC_TEMPLATE['end'] = "</ul> $FORUM_VIEWTOPIC_TEMPLATE['end'] = "</ul>
<div class='row-fluid clearfix'> <div class='row row-fluid clearfix'>
<div class='span3 pull-left'>{GOTOPAGES}</div> <div class='col-md-3 span3 pull-left'>{GOTOPAGES}</div>
<div class='span6 center'>{QUICKREPLY}</div> <div class='col-md-6 text-center span6 center'>{QUICKREPLY}</div>
<div class='span3 pull-right right '>{BUTTONSX}</div> <div class='col-md-3 span3 pull-right right '>{BUTTONSX}</div>
</div> </div>
{THREADSTATUS} {THREADSTATUS}