ForumD.ru - Design for forums and technical support

Announcement

Design for the guild site WoW Legion

Detailed rpg-design for the guild site on the platform MyBB in the style of World of Warcraft: Legion.
Cost: 45$*
The cost includes customizing the design according to your preferences and adjusting the design.

Learn More

Light design in fantasy style with anime graphics

Layout for light design in fantasy style with anime graphics.
Cost: 2600р*
The design will be sold exclusively (in one hand).

Learn More

Design for the Guild Forum WoW Exodar

Detailed rpg-design for the Guild Forum in Exodar style.
Cost: 35$*
The cost includes customizing the design according to your preferences and adjusting the design.

Learn More

Поддержать проект

Help us to make the project better:
Become a Moderator
ReviewsDonations

Suggestions

User info

Welcome, Guest! Please login or register.


You are here » ForumD.ru - Design for forums and technical support » Script Catalog » Moving the Quick Reply form to selected post (MyBB) [Alex_63]


Moving the Quick Reply form to selected post (MyBB) [Alex_63]

Posts 1 to 2 of 2

1

Moving the Quick Reply form to selected post
Version 2

Adds a "Reply" button by clicking on which Response form appears under the current post.
http://s3.uploads.ru/t/swm68.jpg

Author: Alex_63
Platform: MyBB

The script adds a "Reply" button to the right of the "Quote" button in the post, when clicked, the Quick Reply moves to this post. Moving also occurs when clicking on the "Quote" button and the Pop-up quote button (if it is installed).
When you click on the "Reply" button, the username of the author of the corresponding post in the tags [* b] inserts in reply form.
When you click on the nickname of the post in the mini profile, you go to the author profile page (the page opens in a new tab).
The "Cancel" button next to the "View" button is added to the reply form, when you click on which the Quick reply is returned to its original place, the answer form is cleared from the entered text.

The "Reply" button style - in HTML верх (Admin > Options: 1st form) (or at the end of the second window of styles without tags <style></style>):

Code:
    <!-- Moving the Quick Reply form to selected post © Alex_63 // Prt.1 - Style -->
    <style type="text/css">
    /* "Reply" button */
    li.pl-reply a {
      font-size: 14px;
      color: #428bca !important;
      padding-top: 3px !important;
      padding-left: 21px !important;
      padding-right: 3px !important;
      padding-bottom: 3px !important;
      background: url(http://forumfiles.ru/files/0014/ef/99/64816.png) 1px 3px no-repeat;
      border-radius: 4px;
      transition: background 0.5s ease;
      text-decoration: none !important;
    }
    /* on hover */
    li.pl-reply a:hover {
      background-color: #ececec;
    }
    </style>
    <!-- //End//-Moving the Quick Reply form to selected post // Prt.1 -->

Script code - in the end of HTML низ (Admin > Options: 2nd form):

Code:
    <!-- Moving the Quick Reply form to selected post © Alex_63 // Prt.2 в HTML низ -->
    <style>.button.cancel{display:none;}</style>
    <script type="text/javascript">
if($('#pun-viewtopic').length) { 
  var prevElem = $('#post-form').prev();
  $('.post').hover(function(){ 
    $('.post').removeClass('selected');
    $(this).addClass('selected'); 
  });
  function MReplyForm(){ 
    $('#post-form').find('script').remove(); 
    $('#post-form').insertAfter('.post.selected'); 
    $('.button.cancel').show(); 
  };
  $('.post').each(function(){ 
    $(this).find('.pl-quote').after('<li class="pl-reply"><a href="#" onclick="MReplyForm()">Reply</a></li>'); 
    $(this).find('li.pl-reply>a').attr('href',($(this).find('.pa-author>a').attr('href'))).attr('rel','nofollow');
    $(this).find('.pa-author>a').attr('href',($(this).find('.pl-email>a[href*="/profile.php?id="]').attr('href'))).attr('target','_blank');
  });
  $('#post-form input[name="preview"]').each(function(){ 
    $(this).after('<input style="margin-left:4px;" class="button cancel" type="reset" value="Cancel" />'); });
  $('.button.cancel').click(function(){ 
    $('#post-form').insertAfter(prevElem); 
    $(this).hide(); 
  });
  $('#Bubble span').click(MReplyForm);
  $('li.pl-quote>a').each(function(){ 
    $(this).attr('onClick','MReplyForm()'); 
  });
};
</script>
    <!-- //End//-Moving the Quick Reply form to selected post // Prt.2 -->

Version without adding a "Reply" button
Moving A quick reply form occurs by clicking on the "Quote" button, the author's nickname of the post and the Pop-up quote button (if it is installed).

Script code - in the end of HTML низ (Admin > Options: 2nd form):

Code:
    <!-- Moving the Quick Reply form to selected post © Alex_63 -->
    <style>.button.cancel{display:none;}</style>
    <script type="text/javascript">
if($('#pun-viewtopic').length) { 
  var prevElem = $('#post-form').prev();
  $('.post').hover(function(){ 
    $('.post').removeClass('selected');
    $(this).addClass('selected'); 
  });
  function MReplyForm(){ 
    $('#post-form').find('script').remove(); 
    $('#post-form').insertAfter('.post.selected'); 
    $('.button.cancel').show(); 
  };
  $('#post-form input[name="preview"]').each(function(){ 
    $(this).after('<input style="margin-left:4px;" class="button cancel" type="reset" value="Cancel" />'); });
  $('.button.cancel').click(function(){ 
    $('#post-form').insertAfter(prevElem);
    $(this).hide(); 
  });
  $('.pa-author>a').click(MReplyForm);
  $('li.pl-quote>a').each(function(){ 
    $(this).attr('onClick','MReplyForm()'); 
  });
};
</script>
    <!-- //End//-Moving the Quick Reply form to selected post -->

If the Quotation with BB-codes script is installed, we put after it such script:

Code:
<script type="text/javascript">
$('li.pl-BBquote>a').each(function(){
  $(this).attr('onClick','MReplyForm();MyfuncBB_tagCopy(this);return false;');
});
</script>

0

2

Moving Quick Reply to the answered post
(by double click on it)

http://uploads.ru/i/S/A/q/SAqjC.png

Author: Deff
Platform: MyBB

HTML низ (Admin > Options: 2nd form):

Code:
<script type="text/javascript">
$("#pun-viewtopic .post").dblclick(function () {
      $("#post-form").find('script').remove();
      $("#post-form").insertAfter(this)
    });
</script>

0


You are here » ForumD.ru - Design for forums and technical support » Script Catalog » Moving the Quick Reply form to selected post (MyBB) [Alex_63]