2018-05-29, 01:26 AM
I have a problem.. my mybb theme was created when I was on mybb 1.8.2 and now I've upgraded to mybb 1.8.15 inline moderation stopped working... I was playing around with the code below and found out there was a problem in the script.
Any chance of fixing it and yes I do need that script so some of my functions work in the theme.
<script>
jQuery(document).ready(function($) {
$('ul.menu li')
.mouseenter(function() {
$(this).children('ul').fadeIn(200);
})
.mouseleave(function() {
$(this).children('ul').fadeOut(200);
});
$('.welcome')
.mouseenter(function() {
$('ul.user_ddm').fadeIn(200);
})
.mouseleave(function() {
$('ul.user_ddm').fadeOut(200);
});
$('#qsearch input.textbox')
.focus(function() {
$('#qsearch').addClass('focused');
})
.blur(function() {
$('#qsearch').removeClass('focused');
});
currentPage = $(document).find(".navigation").text();
if (currentPage.indexOf('Portal') != -1)
{
$('.menu li a.portal').addClass('active');
}
else if (currentPage.indexOf('Search') != -1)
{
$('.menu li a.search').addClass('active');
}
else if (currentPage.indexOf('Member List') != -1)
{
$('.menu li a.memberlist').addClass('active');
}
else if (currentPage.indexOf('Calendar') != -1)
{
$('.menu li a.calendar').addClass('active');
}
else if (currentPage.indexOf('Help Documents') != -1)
{
$('.menu li a.help').addClass('active');
}
else if (currentPage.indexOf('NonEx') == -1)
{
$('.menu li a.forum').addClass('active');
}
if ( $('ul.navigation').height() > 40 )
{
$('ul.navigation li').not(':first, :last').children('a').html('...');
}
$( window ).resize(function() {
if ( $('ul.navigation').height() > 40 )
{
$('ul.navigation li').not(':first, :last').children('a').html('...');
}
});
// SIDEBAR TOGGLE
if ($.cookie('sidebar_cookie') == null) {
$.cookie('sidebar_cookie', 'expanded', { expires: 7 });
}
else if ($.cookie('sidebar_cookie') == 'collapsed') {
collapseSidebar(0);
}
$('.sidebar_toggle').click(function() {
if ($.cookie('sidebar_cookie') == 'expanded') {
collapseSidebar(200);
$.cookie('sidebar_cookie', 'collapsed', { expires: 7 });
}
else if ($.cookie('sidebar_cookie') == 'collapsed') {
expandSidebar();
$.cookie('sidebar_cookie', 'expanded', { expires: 7 });
}
});
function collapseSidebar(time) {
$('#sidebar').stop(true, true).fadeOut(time);
$('#constraint').stop(true, true).delay(time).animate({marginRight: "0px"}, time);
}
function expandSidebar() {
$('#constraint').stop(true, true).animate({marginRight: "320px"}, 200);
$('#sidebar').stop(true, true).delay(200).fadeIn(200);
}
$('.thread_sub_toggle').click(function() {
if ($('.thread_sub').hasClass('toggled'))
{
$('.thread_sub').stop(true, true).slideUp(200);
$('.thread_sub').removeClass('toggled');
}
else
{
$('.thread_sub').stop(true, true).fadeIn(200);
$('.thread_sub').addClass('toggled');
}
});
$('.onlinetoday_toggle').click(function(){
if ($('.onlinetoday').is(':visible')) {
$('.onlinetoday').hide();
}
else {
$('.onlinetoday').show();
}
});
});
</script>
Any chance of fixing it and yes I do need that script so some of my functions work in the theme.