Быстрый переход по страницам темы и форума
Добавляет на странице топика или странице списка тем срелку, по клику на которую, всплывает блок для ввода заданной страницы топика/раздела.
Автор: Alex_63
Платформа: MyBB
В HTML низ:
<!-- Быстрый переход по страницам темы и форума © Alex_63 -->
<style>
.quickJump {
display: none;
position: absolute;
background: #f7f7f7;
color: #333;
font-size: 11px;
margin-top: 3px;
padding: 5px !important;
border: solid 1px #ccc;
border-radius: 5px;
}
.openQJump { cursor: pointer; margin-right: 1px; }
.openQJump > img { margin-bottom: -2px; margin-right: 2px; opacity: 1.0; }
.openQJump > img:hover { opacity: 0.8; }
</style>
<script type="text/javascript">
var t_fID = $('html').find('link[rel="alternate"]').attr('href').split('id=')[1];if($('#pun-viewtopic').length){var UrlSpl='viewtopic'} if($('#pun-viewforum').length){var UrlSpl='viewforum'}if($('#pun-viewtopic, #pun-viewforum').length){$('div.pagelink:contains("»"), div.pagelink:contains("«")').each(function(){$('<form action="http://'+location.hostname+'/'+UrlSpl+'.php" method="get"><ul class="qJump-ul"><li class="quickJump"><label><input type="hidden" name="id" value="'+t_fID+'" />К странице: <input type="text" name="p" size="4" /></label> <input type="submit" class="button" value="Перейти" /></li></ul></form>').appendTo(this);$('<span class="openQJump"><img src="http://forumstatic.ru/files/0015/92/70/93282.png" /></span>').prependTo(this);});$('.openQJump').click(function(){$(this).parent().find('.quickJump').fadeToggle(160);});}</script>
<!-- //End//-Быстрый переход по страницам темы и форума -->
Красным выделена ссылка на картинку стрелки.
Вариант картинки для форумов с темным фоном:
Ссылка: http://forumstatic.ru/files/0015/92/70/21719.png
Версия скрипта для перехода ТОЛЬКО по страницам топика
<!-- Быстрый переход по страницам темы © Alex_63 --> <style> .quickJump { display: none; position: absolute; background: #f7f7f7; color: #333; font-size: 11px; margin-top: 3px; padding: 5px !important; border: solid 1px #ccc; border-radius: 5px; } .openQJump { cursor: pointer; margin-right: 1px; } .openQJump > img { margin-bottom: -6px; opacity: 1.0; } .openQJump > img:hover { opacity: 0.8; } </style> <script type="text/javascript"> var topicID = $('html').find('link[rel="alternate"]').attr('href').split('tid=')[1]; if($('#pun-viewtopic').length) { $('div.pagelink:contains("»"), div.pagelink:contains("«")').each(function(){ $('<form action="http://'+location.hostname+'/viewtopic.php" method="get"><ul class="qJump-ul"><li class="quickJump"><label><input type="hidden" name="id" value="'+topicID+'" />К странице: <input type="text" name="p" size="4" /></label> <input type="submit" class="button" value="Перейти" /></li></ul></form>').appendTo(this); $('<span class="openQJump"><img src="http://forumstatic.ru/files/0015/c4/3f/53036.png" /></span>').prependTo(this); }); $('.openQJump').click(function(){ $(this).parent().find('.quickJump').fadeToggle(160); }); }; </script> <!-- //End//-Быстрый переход по страницам темы -->