1
0
mirror of https://github.com/e107inc/e107.git synced 2025-05-16 00:49:41 +02:00

Issue - Forum dropdown-menu fixes for Bootstrap 4/5.

This commit is contained in:
Cameron 2021-02-19 16:09:47 -08:00
parent 46b6927447
commit e03f7a34e2
3 changed files with 26 additions and 28 deletions
e107_core/templates
e107_plugins/forum/shortcodes/batch

@ -146,11 +146,9 @@ $NEXTPREV_TEMPLATE['admin_separator'] = ' ';
$NEXTPREV_TEMPLATE['dropdown_start'] = '
<!-- Start of Next/Prev -->
<div class="nextprev form-group form-inline">
';
<div class="nextprev form-group form-inline input-group">';
$NEXTPREV_TEMPLATE['dropdown_end'] = '
</div>
$NEXTPREV_TEMPLATE['dropdown_end'] = '</div>
<!-- End of Next/Prev -->
';

@ -870,13 +870,13 @@ class plugin_forum_view_shortcodes extends e_shortcode
<ul class="dropdown-menu left">
';
$text .= "<li><a href='#'>" . $this->sc_level('userid') . "</a></li>";
$text .= "<li><a href='#'>" . $this->sc_joined() . "</a></li>";
$text .= "<li class='dropdown-item'><a href='#'>" . $this->sc_level('userid') . "</a></li>";
$text .= "<li class='dropdown-item'><a href='#'>" . $this->sc_joined() . "</a></li>";
if($ue)
{
$text .= "<li><a hre='#'>" . $ue . "</a></li>";
$text .= "<li class='dropdown-item'><a hre='#'>" . $ue . "</a></li>";
}
$text .= "<li><a href='#'>" . $this->sc_posts() . "</a></li>";
$text .= "<li class='dropdown-item'><a href='#'>" . $this->sc_posts() . "</a></li>";
if(e107::isInstalled('pm') && ($this->postInfo['post_user'] > 0))
@ -884,7 +884,7 @@ class plugin_forum_view_shortcodes extends e_shortcode
if($pmButton = $tp->parseTemplate("{SENDPM: user=" . $this->postInfo['post_user'] . "&glyph=envelope&class=pm-send}", true))
{
$text .= "<li class='divider'></li>";
$text .= "<li>" . $pmButton . "</li>";
$text .= "<li class='dropdown-item'>" . $pmButton . "</li>";
}
// $text .= "<li><a href='".e_PLUGIN_ABS."pm/pm.php?send.{$this->postInfo['post_user']}'>".$tp->toGlyph('envelope')." ".LAN_FORUM_2036." </a></li>";
@ -892,7 +892,7 @@ class plugin_forum_view_shortcodes extends e_shortcode
if($website = $this->sc_website())
{
$text .= "<li>" . $website . "</li>";
$text .= "<li class='dropdown-item'>" . $website . "</li>";
}
// {EMAILIMG}
@ -926,17 +926,17 @@ class plugin_forum_view_shortcodes extends e_shortcode
$text .= '
</button>
<ul class="dropdown-menu pull-right dropdown-menu-end float-right text-right">';
<ul class="dropdown-menu pull-right dropdown-menu-end float-right text-right text-end">';
$text .= "<li class='text-right float-right float-right'><a href='" . e_HTTP . "email.php?plugin:forum." . $threadID . "'>" . LAN_FORUM_2044 . " " . $tp->toGlyph('fa-envelope') . "</a></li>";
$text .= "<li class='text-right float-right'><a href='" . e_HTTP . "print.php?plugin:forum." . $threadID . "'>" . LAN_FORUM_2045 . " " . $tp->toGlyph('fa-print') . "</a></li>"; // FIXME
$text .= "<li class='dropdown-item text-right text-end float-right float-right'><a href='" . e_HTTP . "email.php?plugin:forum." . $threadID . "'>" . LAN_FORUM_2044 . " " . $tp->toGlyph('fa-envelope') . "</a></li>";
$text .= "<li class='dropdown-item text-right text-end float-right'><a href='" . e_HTTP . "print.php?plugin:forum." . $threadID . "'>" . LAN_FORUM_2045 . " " . $tp->toGlyph('fa-print') . "</a></li>"; // FIXME
if(USER) // Report
{
$urlReport = e107::url('forum', 'post') . "?f=report&amp;id=" . $threadID . "&amp;post=" . $postID;
// $urlReport = $this->e107->url->create('forum/thread/report', "id={$threadID}&post={$postID}");
$text .= "<li class='text-right float-right'><a href='" . $urlReport . "'>" . LAN_FORUM_2046 . " " . $tp->toGlyph('fa-flag') . "</a></li>";
$text .= "<li class='dropdown-item text-right text-end float-right'><a href='" . $urlReport . "'>" . LAN_FORUM_2046 . " " . $tp->toGlyph('fa-flag') . "</a></li>";
}
// Edit
@ -946,7 +946,7 @@ class plugin_forum_view_shortcodes extends e_shortcode
$url = e107::url('forum', 'post') . "?f=edit&amp;id=" . $threadID . "&amp;post=" . $postID;
//$url = e107::getUrl()->create('forum/thread/edit', array('id' => $threadID, 'post'=>$postID));
$text .= "<li class='text-right float-right'><a href='" . $url . "'>" . LAN_EDIT . " " . $tp->toGlyph('fa-edit') . "</a></li>";
$text .= "<li class='dropdown-item text-right text-end float-right'><a href='" . $url . "'>" . LAN_EDIT . " " . $tp->toGlyph('fa-edit') . "</a></li>";
}
@ -957,7 +957,7 @@ class plugin_forum_view_shortcodes extends e_shortcode
* AND if this post is the last post in the thread */
if($this->var['thread_active'] && empty($this->postInfo['thread_start']))
{
$text .= "<li class='text-right float-right'><a href='" . e_REQUEST_URI . "' data-forum-action='deletepost' data-confirm='" . LAN_JSCONFIRM . "' data-forum-post='" . $postID . "'>" . LAN_DELETE . " " . $tp->toGlyph('fa-trash') . "</a></li>";
$text .= "<li class='dropdown-item text-right text-end float-right'><a href='" . e_REQUEST_URI . "' data-forum-action='deletepost' data-confirm='" . LAN_JSCONFIRM . "' data-forum-post='" . $postID . "'>" . LAN_DELETE . " " . $tp->toGlyph('fa-trash') . "</a></li>";
}
}
@ -965,7 +965,7 @@ class plugin_forum_view_shortcodes extends e_shortcode
{
$url = e107::url('forum', 'post') . "?f=quote&amp;id=" . $threadID . "&amp;post=" . $postID;
//$url = e107::getUrl()->create('forum/thread/quote', array('id' => $threadID, 'post'=>$postID));
$text .= "<li class='text-right float-right'><a href='" . $url . "'>" . LAN_FORUM_2041 . " " . $tp->toGlyph('fa-share-alt') . "</a></li>";
$text .= "<li class='dropdown-item text-right text-end float-right'><a href='" . $url . "'>" . LAN_FORUM_2041 . " " . $tp->toGlyph('fa-share-alt') . "</a></li>";
// $text .= "<li class='text-right float-right'><a href='".e107::getUrl()->create('forum/thread/quote', array('id' => $postID))."'>".LAN_FORUM_2041." ".$tp->toGlyph('share-alt')."</a></li>";
}
@ -984,24 +984,24 @@ class plugin_forum_view_shortcodes extends e_shortcode
$url = e107::url('forum', 'post') . "?f=edit&amp;id=" . $threadID . "&amp;post=" . $postID;
// $url = e107::getUrl()->create('forum/thread/edit', array('id' => $threadID, 'post'=>$postID));
$text .= "<li class='text-right float-right'><a href='" . $url . "'>" . LAN_EDIT . " " . $tp->toGlyph('fa-edit') . "</a></li>";
$text .= "<li class='dropdown-item text-right text-end float-right'><a href='" . $url . "'>" . LAN_EDIT . " " . $tp->toGlyph('fa-edit') . "</a></li>";
}
// only show delete button when post is not the initial post of the topic
// if(!$this->forum->threadDetermineInitialPost($postID))
if(empty($this->postInfo['thread_start']))
{
$text .= "<li class='text-right float-right'><a href='" . e_REQUEST_URI . "' data-forum-action='deletepost' data-confirm='" . LAN_JSCONFIRM . "' data-forum-post='" . $postID . "'>" . LAN_DELETE . " " . $tp->toGlyph('fa-trash') . "</a></li>";
$text .= "<li class='dropdown-item text-right text-end float-right'><a href='" . e_REQUEST_URI . "' data-forum-action='deletepost' data-confirm='" . LAN_JSCONFIRM . "' data-forum-post='" . $postID . "'>" . LAN_DELETE . " " . $tp->toGlyph('fa-trash') . "</a></li>";
}
if($type == 'thread')
{
$url = e107::url('forum', 'move', array('thread_id' => $threadID));
$text .= "<li class='text-right float-right'><a href='" . $url . "'>" . LAN_FORUM_2042 . " " . $tp->toGlyph('fa-arrows') . "</a></li>";
$text .= "<li class='dropdown-item text-right text-end float-right'><a href='" . $url . "'>" . LAN_FORUM_2042 . " " . $tp->toGlyph('fa-arrows') . "</a></li>";
}
elseif(e_DEVELOPER === true) //TODO
{
$text .= "<li class='text-right float-right'><a href='" . e107::url('forum', 'split', array('thread_id' => $threadID, 'post_id' => $postID)) . "'>" . LAN_FORUM_2043 . " " . $tp->toGlyph('fa-cut') . "</a></li>";
$text .= "<li class='dropdown-item text-right text-end float-right'><a href='" . e107::url('forum', 'split', array('thread_id' => $threadID, 'post_id' => $postID)) . "'>" . LAN_FORUM_2043 . " " . $tp->toGlyph('fa-cut') . "</a></li>";
}
}
@ -1251,7 +1251,7 @@ class plugin_forum_view_shortcodes extends e_shortcode
foreach($options as $key => $val)
{
$text .= '<li>' . $val . '</li>';
$text .= '<li class="dropdown-item">' . $val . '</li>';
}
$jumpList = $this->forum->forumGetAllowed();
@ -1260,7 +1260,7 @@ class plugin_forum_view_shortcodes extends e_shortcode
foreach($jumpList as $key => $val)
{
$text .= '<li><a href ="' . e107::url('forum', 'forum', $val) . '">' . LAN_FORUM_1017 . " " . $val['forum_name'] . '</a></li>';
$text .= '<li class="dropdown-item"><a href ="' . e107::url('forum', 'forum', $val) . '">' . LAN_FORUM_1017 . " " . $val['forum_name'] . '</a></li>';
}
$text .= '

@ -1157,15 +1157,15 @@
);
$text .= "<li class='text-right'><a class='dropdown-item' href='" . e_REQUEST_URI . "' data-forum-action='delete' data-confirm='".LAN_JSCONFIRM."' data-forum-thread='" . $id . "'>" . LAN_DELETE . " " . $tp->toGlyph('fa-trash') . "</a></li>";
$text .= "<li class='text-right'><a class='dropdown-item' href='" . e_REQUEST_URI . "' data-forum-action='" . $stickUnstick . "' data-forum-thread='" . $id . "'>" . $lan[$stickUnstick] . " " . $icon[$stickUnstick] . "</a></li>";
$text .= "<li class='text-right'><a class='dropdown-item' href='" . e_REQUEST_URI . "' data-forum-action='" . $lockUnlock . "' data-forum-thread='" . $id . "'>" . $lan[$lockUnlock] . " " . $icon[$lockUnlock] . "</a></li>";
$text .= "<li class='dropdown-item text-right text-end'><a class='dropdown-item' href='" . e_REQUEST_URI . "' data-forum-action='delete' data-confirm='".LAN_JSCONFIRM."' data-forum-thread='" . $id . "'>" . LAN_DELETE . " " . $tp->toGlyph('fa-trash') . "</a></li>";
$text .= "<li class='dropdown-item text-right text-end'><a class='dropdown-item' href='" . e_REQUEST_URI . "' data-forum-action='" . $stickUnstick . "' data-forum-thread='" . $id . "'>" . $lan[$stickUnstick] . " " . $icon[$stickUnstick] . "</a></li>";
$text .= "<li class='dropdown-item text-right text-end'><a class='dropdown-item' href='" . e_REQUEST_URI . "' data-forum-action='" . $lockUnlock . "' data-forum-thread='" . $id . "'>" . $lan[$lockUnlock] . " " . $icon[$lockUnlock] . "</a></li>";
$text .= "<li class='text-right'><a class='dropdown-item' href='{$moveUrl}'>" . LAN_FORUM_2042 . " " . $tp->toGlyph('fa-arrows') . "</a></li>";
$text .= "<li class='dropdown-item text-right text-end'><a class='dropdown-item' href='{$moveUrl}'>" . LAN_FORUM_2042 . " " . $tp->toGlyph('fa-arrows') . "</a></li>";
//if(e_DEVELOPER)
// {
// $text .= "<li class='text-right'><a href='{$splitUrl}'>Split ".$tp->toGlyph('scissors')."</i></a></li>";
// $text .= "<li class='text-right text-end'><a href='{$splitUrl}'>Split ".$tp->toGlyph('scissors')."</i></a></li>";
// print_a($thread_info);
// }