mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 20:00:37 +02:00
More Forum template tweaks
This commit is contained in:
@@ -302,7 +302,7 @@ if (count($threadList) )
|
||||
{
|
||||
$reg_threads ++;
|
||||
}
|
||||
if ($reg_threads == '1' && !$unstuck && $stuck)
|
||||
if ($reg_threads == '1') // Removed as not needed in new template. && !$unstuck && $stuck
|
||||
{
|
||||
if($FORUM_NORMAL_ROW)
|
||||
{
|
||||
|
@@ -11,9 +11,11 @@ class plugin_forum_view_shortcodes extends e_shortcode
|
||||
$this->e107 = e107::getInstance();
|
||||
}
|
||||
|
||||
function sc_top()
|
||||
function sc_top($parm='')
|
||||
{
|
||||
return "<a href='".e_SELF.'?'.e_QUERY."#top' onclick=\"window.scrollTo(0,0);\">".LAN_10.'</a>';
|
||||
$text = ($parm == 'caret') ? "<span class='caret'></span>" : LAN_10;
|
||||
|
||||
return "<a href='".e_SELF.'?'.e_QUERY."#top' onclick=\"window.scrollTo(0,0);\">".$text.'</a>';
|
||||
}
|
||||
|
||||
function sc_joined()
|
||||
@@ -400,5 +402,75 @@ class plugin_forum_view_shortcodes extends e_shortcode
|
||||
}
|
||||
|
||||
|
||||
function sc_postoptions()
|
||||
{
|
||||
|
||||
// {EMAILITEM} {PRINTITEM} {REPORTIMG}{EDITIMG}{QUOTEIMG}
|
||||
|
||||
$text = '<div class="btn-group">
|
||||
<button class="btn btn-small dropdown-toggle" data-toggle="dropdown">
|
||||
Options
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu left">';
|
||||
|
||||
|
||||
$text .= "<li><a href='".e_HTTP."email.php?plugin:forum.".$this->postInfo['post_thread']."'>".FORLAN_101."</a></li>";
|
||||
$text .= "<li><a href='".e_HTTP."print.php?plugin:forum.".$this->postInfo['post_thread']."'>Print</a></li>";
|
||||
|
||||
if (USER) // Report
|
||||
{
|
||||
$text .= "<li><a href='".$this->e107->url->create('forum/thread/report', "id={$this->postInfo['post_thread']}&post={$this->postInfo['post_id']}")."'>Report</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']))."'>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']))."'>Quote</a></li>";
|
||||
}
|
||||
|
||||
|
||||
if (MODERATOR)
|
||||
{
|
||||
$text .= "<li 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']))."'>Edit</a></li>";
|
||||
}
|
||||
|
||||
$text .= "<li><a href='#'>Delete (fixme)</a></li>"; //FIXME - putting a form here could break layout. Ajax?
|
||||
|
||||
if ($type == 'thread')
|
||||
{
|
||||
$text .= "<li><a href='" . e107::getUrl()->create('forum/thread/move', array('id' => $this->postInfo['post_id']))."'>Move</a></li>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$text .= "<li><a href='" . e107::getUrl()->create('forum/thread/split', array('id' => $this->postInfo['post_id']))."'>Split</a></li>";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$text .= '
|
||||
</ul>
|
||||
</div>';
|
||||
|
||||
return $text;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
?>
|
@@ -14,6 +14,8 @@
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
if(!defined("USER_WIDTH")){ define("USER_WIDTH","width:95%"); }
|
||||
|
||||
|
||||
/*
|
||||
if (!$FORUM_VIEW_START)
|
||||
{
|
||||
$FORUM_VIEW_START = "
|
||||
@@ -178,13 +180,13 @@ if (!$FORUM_VIEW_END) {
|
||||
</div>
|
||||
</div>
|
||||
<div class='spacer'>";
|
||||
/* hardcoded deprecated rss links
|
||||
<div style='text-align:center;'>
|
||||
<a href='".e_PLUGIN."rss_menu/rss.php?11.1.".e_QUERY."'><img src='".e_PLUGIN."rss_menu/images/rss1.png' alt='".LAN_431."' style='vertical-align: middle; border: 0;' /></a>
|
||||
<a href='".e_PLUGIN."rss_menu/rss.php?11.2.".e_QUERY."'><img src='".e_PLUGIN."rss_menu/images/rss2.png' alt='".LAN_432."' style='vertical-align: middle; border: 0;' /></a>
|
||||
<a href='".e_PLUGIN."rss_menu/rss.php?11.3.".e_QUERY."'><img src='".e_PLUGIN."rss_menu/images/rss3.png' alt='".LAN_433."' style='vertical-align: middle; border: 0;' /></a>
|
||||
</div>
|
||||
*/
|
||||
// hardcoded deprecated rss links
|
||||
// <div style='text-align:center;'>
|
||||
// <a href='".e_PLUGIN."rss_menu/rss.php?11.1.".e_QUERY."'><img src='".e_PLUGIN."rss_menu/images/rss1.png' alt='".LAN_431."' style='vertical-align: middle; border: 0;' /></a>
|
||||
// <a href='".e_PLUGIN."rss_menu/rss.php?11.2.".e_QUERY."'><img src='".e_PLUGIN."rss_menu/images/rss2.png' alt='".LAN_432."' style='vertical-align: middle; border: 0;' /></a>
|
||||
// <a href='".e_PLUGIN."rss_menu/rss.php?11.3.".e_QUERY."'><img src='".e_PLUGIN."rss_menu/images/rss3.png' alt='".LAN_433."' style='vertical-align: middle; border: 0;' /></a>
|
||||
// </div>
|
||||
//
|
||||
$FORUM_VIEW_END .= "
|
||||
<div class='nforumdisclaimer' style='text-align:center'>Powered by <b>e107 Forum System</b></div>
|
||||
</div>
|
||||
@@ -254,6 +256,12 @@ if (!$FORUM_NORMAL_ROW) {
|
||||
$FORUM_NORMAL_ROW = "<tr><td class='forumheader'> </td><td colspan='5' class='forumheader'><span class='mediumtext'><b>".LAN_412."</b></span></td></tr>";
|
||||
}
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
$FORUM_CRUMB['sitename']['value'] = "<a class='forumlink' href='{SITENAME_HREF}'>{SITENAME}</a>";
|
||||
$FORUM_CRUMB['sitename']['sep'] = " :: ";
|
||||
|
||||
|
@@ -351,7 +351,7 @@ $FORUMTOPIC_TEMPLATE['thread'] ="
|
||||
<tr>
|
||||
<td class='forumheader' style='vertical-align:middle'>{NEWFLAG} {USERCOMBO}{ANON_IP}</td>
|
||||
<td class='smallblacktext'>{THREADDATESTAMP}</td>
|
||||
<td style='text-align:right'>{EMAILITEM} {PRINTITEM} {REPORTIMG}{EDITIMG}{QUOTEIMG} </td>
|
||||
<td style='text-align:right'>{POSTOPTIONS}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
@@ -365,28 +365,27 @@ $FORUMTOPIC_TEMPLATE['thread'] ="
|
||||
<td colspan='2' class='forumheader3' style='vertical-align:top'>
|
||||
{POLL}
|
||||
{POST}
|
||||
{ATTACHMENTS}
|
||||
{LASTEDIT}{LASTEDITBY=link}
|
||||
{SIGNATURE}
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class='finfobar'>
|
||||
<span class='smallblacktext'>
|
||||
{TOP}
|
||||
</span>
|
||||
<div class='dropup'>
|
||||
{TOP=caret}
|
||||
</div>
|
||||
</td>
|
||||
<td class='finfobar' style='vertical-align:top'>
|
||||
|
||||
|
||||
{ATTACHMENTS}
|
||||
{LASTEDIT}{LASTEDITBY=link}
|
||||
{SIGNATURE}
|
||||
</td>
|
||||
|
||||
<td style='text-align:right'>
|
||||
{MODOPTIONS}
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan='3'>
|
||||
</td>
|
||||
|
Reference in New Issue
Block a user