Hello guys,
i'm editing a theme in which quote and multiquote don't work. I fixed quote problem with this guide:
http://community.mybb.com/thread-138388.html
But Multiquote doesn't work:
my multiquote code:
<a href="javascript:Thread.multiQuote({$post['pid']});" style="display: none;" id="multiquote_link_{$post['pid']}" class="button postbit-button">Multi Quote</a>
<script type="text/javascript">
//<!--
$('multiquote_link_{$post['pid']}').style.display = '';
// -->
</script>
As I said - follow instructions in 2nd post. So yes, should apply changes mentioned in that thread for multiquote.
Did but doesn't work.
Can I post my postbit or some templates so you can see if there are errors?
<a class="postbit" href="javascript:Thread.multiQuote({$post['pid']});" style="display: none;" id="multiquote_link_{$post['pid']}"><img id="multiquote_{$post['pid']}" />Mlutiquote</a>
<script type="text/javascript">
//<!--
$('multiquote_link_{$post['pid']}').style.display = '';
// -->
</script>
This worked for me.
As I said, my problem is a jscripts problem.
This is my headerinclude:
<link rel="alternate" type="application/rss+xml" title="{$lang->latest_threads} (RSS 2.0)" href="{$mybb->settings['bburl']}/syndication.php" />
<link rel="alternate" type="application/atom+xml" title="{$lang->latest_threads} (Atom 1.0)" href="{$mybb->settings['bburl']}/syndication.php?type=atom1.0" />
<meta http-equiv="Content-Type" content="text/html; charset={$charset}" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/prototype.js?ver=1603"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/general.js?ver=1603"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/popup_menu.js?ver=1600"></script>
{$stylesheets}
<!--[if IE 7]>
<link type="text/css" rel="stylesheet" href="{$mybb->settings['bburl']}/images/intox/ie.css" />
<![endif]-->
<script type="text/javascript">
<!--
var cookieDomain = "{$mybb->settings['cookiedomain']}";
var cookiePath = "{$mybb->settings['cookiepath']}";
var cookiePrefix = "{$mybb->settings['cookieprefix']}";
var deleteevent_confirm = "{$lang->deleteevent_confirm}";
var removeattach_confirm = "{$lang->removeattach_confirm}";
var loading_text = '{$lang->ajax_loading}';
var saving_changes = '{$lang->saving_changes}';
var use_xmlhttprequest = "{$mybb->settings['use_xmlhttprequest']}";
var my_post_key = "{$mybb->post_code}";
var imagepath = "{$theme['imgdir']}";
// -->
</script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/images/tema/fancyCollapses.js"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/images/tema/tipTip.js"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/images/tema/jquery.cookie.js"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/images/tema/theme-js.js"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
if( $.cookie('multiquote') !== null ) {
var quoted = $.cookie("multiquote");
var quoted_split = quoted.split('|');
jQuery.each(quoted_split, function() {
$('#multiquote_link_' + this).addClass('multiquote_on');
});
}
$('a.multiquote').click(function() {
if($(this).hasClass('multiquote_on')) {
$(this).removeClass('multiquote_on');
} else {
$(this).addClass('multiquote_on');
}
});
});
</script>
{$newpmmsg}
Anything strange or to add?
Change to:
<link rel="alternate" type="application/rss+xml" title="{$lang->latest_threads} (RSS 2.0)" href="{$mybb->settings['bburl']}/syndication.php" />
<link rel="alternate" type="application/atom+xml" title="{$lang->latest_threads} (Atom 1.0)" href="{$mybb->settings['bburl']}/syndication.php?type=atom1.0" />
<meta http-equiv="Content-Type" content="text/html; charset={$charset}" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/prototype.js?ver=1603"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/general.js?ver=1603"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/popup_menu.js?ver=1600"></script>
{$stylesheets}
<!--[if IE 7]>
<link type="text/css" rel="stylesheet" href="{$mybb->settings['bburl']}/images/intox/ie.css" />
<![endif]-->
<script type="text/javascript">
<!--
var cookieDomain = "{$mybb->settings['cookiedomain']}";
var cookiePath = "{$mybb->settings['cookiepath']}";
var cookiePrefix = "{$mybb->settings['cookieprefix']}";
var deleteevent_confirm = "{$lang->deleteevent_confirm}";
var removeattach_confirm = "{$lang->removeattach_confirm}";
var loading_text = '{$lang->ajax_loading}';
var saving_changes = '{$lang->saving_changes}';
var use_xmlhttprequest = "{$mybb->settings['use_xmlhttprequest']}";
var my_post_key = "{$mybb->post_code}";
var imagepath = "{$theme['imgdir']}";
// -->
</script>
{$newpmmsg}
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script type="text/javascript">jQuery.noConflict();</script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/images/tema/fancyCollapses.js"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/images/tema/tipTip.js"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/images/tema/jquery.cookie.js"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/images/tema/theme-js.js"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
if( $.cookie('multiquote') !== null ) {
var quoted = $.cookie("multiquote");
var quoted_split = quoted.split('|');
jQuery.each(quoted_split, function() {
$('#multiquote_link_' + this).addClass('multiquote_on');
});
}
$('a.multiquote').click(function() {
if($(this).hasClass('multiquote_on')) {
$(this).removeClass('multiquote_on');
} else {
$(this).addClass('multiquote_on');
}
});
});
</script>
Changed but nothing happened