The forum of the forums

Would you like to react to this message? Create an account in a few clicks or log in to continue.
The forum of the forums
4 posters

    scrolling to the topic list in bottom

    poesia-verses
    poesia-verses
    Forumember


    Male Posts : 571
    Reputation : 22
    Language : and small english

    Solved scrolling to the topic list in bottom

    Post by poesia-verses September 18th 2024, 3:00 pm

    Code:
    <div id="nisuk"></div>
     
     <script type="text/javascript">
      $(document).ready(function(fdf_EN) {
      var numb_limit = 5;
      var globalTopic = 'Общее объявление';
      var colorGlobalTopic = '#b1b7a3';
      var fixTopic = 'Важно!';
      var colorfixTopic = '#afafaf';
      var announcementTopics = 'Объявление';
      var colorannouncementTopics = '#649958';
      $.ajax({
          type: "GET",
          url: $('ul#navstrip li:last-child a[href*="f"]').attr('href'),
          dataType: "html",
          success: function(crowleys) {
      $("#nisuk").before('<div id="shekTraff" class="row1"><div class="clearfix"><div align="center" class="maintitle floated"><font size="6">темы из раздела</font><img src="https://i.servimg.com/u/f10/20/33/56/10/aaaa11.gif"></div></div><div id="topiclist" align="center"></div></div>');
            $(crowleys).find('table.ipbtable:not(:last-child) tbody tr td.row1:nth-child(3)').each(function(fdf,shek) {
                $('#topiclist').append('? &nbsp;<a id="'+ fdf +'" href="' + $(this).find('a.topictitle').attr('href') + '" title="'+ $(this).text() +'">'+ $(this).text() +'</a><br><br>');
                $('#topiclist a:contains("'+ globalTopic +'")').css('color',colorGlobalTopic);
                $('#topiclist a:contains("'+ fixTopic +'")').css('color',colorfixTopic);
                $('#topiclist a:contains("'+ announcementTopics +'")').css('color',colorannouncementTopics);
                if(fdf == numb_limit) {return false;}
            });
          }
      });
    });
        </script>




    scrolling to the topic list in bottom Clipbo45

    Code:
    <div class="next-prev">
               &laquo; <a href="#shekTraff">Посмотреть темы раздела</a> &middot; <a href="{U_VIEW_NEWER_TOPIC}">Тема ниже</a> &raquo;
          </div>

    Hello. I want this script not to immediately move to the list of topics, but to scroll smoothly. When you click on this link at the bottom of the topic, it moves under the quick reply form where the topics are from this forum. threads from this forum are shown by this script. you need to move slowly like "down or up" like a page. and it’s not clear where I ended up


    Last edited by poesia-verses on September 29th 2024, 5:02 am; edited 1 time in total

    aisha0786 likes this post

    كونان2000
    كونان2000
    Forumember


    Male Posts : 284
    Reputation : 120
    Language : Arabic

    Solved Re: scrolling to the topic list in bottom

    Post by كونان2000 September 18th 2024, 4:02 pm

    hi @poesia-verses
    Do you want the screen to scroll down after clicking the "Посмотреть темы раздела" button?

    poesia-verses and كونان2000 like this post

    poesia-verses
    poesia-verses
    Forumember


    Male Posts : 571
    Reputation : 22
    Language : and small english

    Solved Re: scrolling to the topic list in bottom

    Post by poesia-verses September 18th 2024, 4:07 pm

    @كونان2000 yes
    to the topic list in bottom theme - -<div id="nisuk"></div> to this div

    كونان2000
    كونان2000
    Forumember


    Male Posts : 284
    Reputation : 120
    Language : Arabic

    Solved Re: scrolling to the topic list in bottom

    Post by كونان2000 September 18th 2024, 4:25 pm

    Code:
     <div class="next-prev">
              &laquo;  <a href="#nisuk" onclick="smoothScroll(event)">Посмотреть темы раздела</a> &middot; <a href="{U_VIEW_NEWER_TOPIC}">Тема ниже</a> &raquo;
          </div>

    <script>
    function smoothScroll(event) {
        event.preventDefault();
        const target = document.querySelector('#nisuk');
        if (target) {
            target.scrollIntoView({
                behavior: 'smooth'
            });
        }
    }
    </script>

    poesia-verses likes this post

    poesia-verses
    poesia-verses
    Forumember


    Male Posts : 571
    Reputation : 22
    Language : and small english

    Solved Re: scrolling to the topic list in bottom

    Post by poesia-verses September 18th 2024, 4:33 pm

    @كونان2000

    For some reason scrolling to the bottom of the page, and not to the "nisuk" block

    كونان2000 likes this post

    كونان2000
    كونان2000
    Forumember


    Male Posts : 284
    Reputation : 120
    Language : Arabic

    Solved Re: scrolling to the topic list in bottom

    Post by كونان2000 September 18th 2024, 4:42 pm

    Modified
    Code:
    <div class="next-prev">
              &laquo;  <a href="#nisuk" onclick="smoothScroll(event)">Посмотреть темы раздела</a> &middot; <a href="{U_VIEW_NEWER_TOPIC}">Тема ниже</a> &raquo;
          </div>
    <script>
    function smoothScroll(event) {
        event.preventDefault();
        const target = document.querySelector('#nisuk');
        if (target) {
            const topPos = target.getBoundingClientRect().top + window.scrollY;
            window.scrollTo({
                top: topPos,
                behavior: 'smooth'
            });
        }
    }
    </script>
    poesia-verses
    poesia-verses
    Forumember


    Male Posts : 571
    Reputation : 22
    Language : and small english

    Solved Re: scrolling to the topic list in bottom

    Post by poesia-verses September 18th 2024, 4:47 pm

    @كونان2000 still moves to the bottom of the page
    كونان2000
    كونان2000
    Forumember


    Male Posts : 284
    Reputation : 120
    Language : Arabic

    Solved Re: scrolling to the topic list in bottom

    Post by كونان2000 September 18th 2024, 4:58 pm

    hi @poesia-verses

    A number is placed in the code. The higher the number, the more it scrolls down. The lower the number, the less it scrolls down.
    Code:
    <a href="#nisuk" onclick="smoothScroll(event, 100)">Посмотреть темы раздела</a>

    Choose the right number for your forum
    Code:
     <div class="next-prev">
              &laquo;  <a href="#nisuk" onclick="smoothScroll(event, 100)">Посмотреть темы раздела</a> &middot; <a href="{U_VIEW_NEWER_TOPIC}">Тема ниже</a> &raquo;
          </div>
    <script>
    function smoothScroll(event, offset) {
        event.preventDefault(); 
        const target = document.querySelector('#nisuk');
        if (target) {
            const topPos = target.getBoundingClientRect().top + window.scrollY + offset;
            window.scrollTo({
                top: topPos,
                behavior: 'smooth'
            });
        }
    }
    </script>

    poesia-verses likes this post

    poesia-verses
    poesia-verses
    Forumember


    Male Posts : 571
    Reputation : 22
    Language : and small english

    Solved Re: scrolling to the topic list in bottom

    Post by poesia-verses September 18th 2024, 5:06 pm

    @كونان2000 still moves to the bottom of the page

    bwi
    كونان2000
    كونان2000
    Forumember


    Male Posts : 284
    Reputation : 120
    Language : Arabic

    Solved Re: scrolling to the topic list in bottom

    Post by كونان2000 September 18th 2024, 5:10 pm

    poesia-verses wrote:@كونان2000 still moves to the bottom of the page

    bwi

    But the code works fine in my forum.

    scrolling to the topic list in bottom 84296510
    poesia-verses
    poesia-verses
    Forumember


    Male Posts : 571
    Reputation : 22
    Language : and small english

    Solved Re: scrolling to the topic list in bottom

    Post by poesia-verses September 18th 2024, 5:12 pm

    @كونان2000

    Code:
    <style type="text/css">
      #content-container div#right, #footer_widgets, #top00002 {
      display: none;
      }
    </style>

    <!-- BEGIN switch_plus_menu -->
     
    <script type="text/javascript">
       //<![CDATA[
       var multiquote_img_off = '{JS_MULTIQUOTE_IMG_OFF}', multiquote_img_on = '{JS_MULTIQUOTE_IMG_ON}';
    </script>
    <!-- END switch_plus_menu -->
    <script type="text/javascript">

    var hiddenMsgLabel = { visible:'{JS_HIDE_HIDDEN_MESSAGE}', hidden:'{JS_SHOW_HIDDEN_MESSAGE}' };
    showHiddenMessage = function(id)
    {
        try
        {
            var regId = parseInt(id, 10);
            if( isNaN(regId) ) { regId = 0; }
           
            if( regId > 0)
            {
                $('.post--' + id).toggle(0, function()
             {
                if( $(this).is(":visible") )
                {
                   $('#hidden-title--' + id).html(hiddenMsgLabel.visible);
                }
                else
                {
                   $('#hidden-title--' + id).html(hiddenMsgLabel.hidden);
                }
             });
            }
        }
        catch(e) { }
       
       return false;
    };

    //]]>
    </script>





    <style>
    .post-content .spoiler-box > div {background:url('https://i.servimg.com/u/f10/20/33/56/10/110.png') no-repeat left center; cursor:pointer; padding-left:18px}
    .post-content .spoiler-box > div.visible {background-image:url('https://i.servimg.com/u/f10/20/33/56/10/1----10.png')}
    .post-content .spoiler-box > blockqute {padding-top:1.4em; display:none}
    .post-content .spoiler-box > blockqute.visible {display:block; overflow:auto}
     
    .post-content .qute-box{
      margin: 0.4em 1.8em 1.4em 1em;
      padding: 1em 1em 0.2em 0em;
      border-style: solid;
      border-width: 1px;
      }
     
    .punbb .qute-box.spoiler-box {
      padding: 1em;
      }
    .qute-box cite {
      display: block;
      padding-bottom: 0.7em;
      font-size: 2em;
      font-weight: bold;
      font-style: normal;
      margin: 0;
      }
    </style>
    <script>
    function toggleSpoiler(element) {
      var noscript = $(element).siblings('script'), blockqute = $(element).next('blockqute');
      if (noscript.length) {
    blockqute.html(noscript.text());
    noscript.remove();
    $(element).parent('.spoiler-box').trigger($.Event('spoiler.firstOpen', {'sender': element}));
      }
      $(element).toggleClass('visible');
      blockqute.toggleClass('visible');
      $(element).parent('.spoiler-box').trigger($.Event('spoiler.toggle', {'sender': element}));
    }
    </script>
    <div class="post-content">
    <div class="qute-box spoiler-box media-box">
      <div onclick="toggleSpoiler(this);" title="Тут текст при наведении"><font size="5" color=red>Показать инструкцию, картинки</font></div>
    <blockqute></blockqute><script type="text">
    .........<iframe width="700" height="520" src="https://stihi-podval.forumotion.com/h1-page"></iframe>
    </script></div></div>






    <ul id="navstrip" class="clearfix">
      <li class="begin"><a href="{U_INDEX}"><span>{L_INDEX}</span></a></li><br />
      <img src="https://i.servimg.com/u/f10/20/33/56/10/21212112.gif" /><br />
        {NAV_CAT_DESC}
    </ul>
     
    {POSTERS_LIST}
    <!-- BEGIN topicpagination -->
    <div class="pagination topic-options">
       {PAGINATION}
    </div>
    <!-- END topicpagination -->

    <table><tr>
      <td><img style="margin-left:55px;" src="https://i.servimg.com/u/f55/17/24/83/60/nf5wpc10.png" />
      </td>
      <td>
    <div class="posting-options topic-options">
       <ul class="posting-buttons clearfix">
          <!-- BEGIN switch_user_authpost -->
             <li class="post-icon"><a href="{U_POST_NEW_TOPIC}" accesskey="n" rel="nofollow"><img src="{POST_IMG}" class="{POST_IMG_ID}" alt="{L_POST_NEW_TOPIC}" /></a></li>
          <!-- END switch_user_authpost -->
          <!-- BEGIN switch_user_authreply -->
             <li class="post-icon"><a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" class="i_reply" alt="{L_POST_REPLY_TOPIC}" /></a></li>
          <!-- END switch_user_authreply -->
          <!-- BEGIN switch_fb_likebtn -->
          <li class="post-icon">
             <div id="fb-root"></div>
             <script>(function(d, s, id) {
               var js, fjs = d.getElementsByTagName(s)[0];
               if (d.getElementById(id)) return;
               js = d.createElement(s); js.id = id;
               js.src = "https://connect.facebook.net/{LANGUAGE}/all.js#xfbml=1";
               fjs.parentNode.insertBefore(js, fjs);
             }(document, 'script', 'facebook-jssdk'));</script>   
             <div class="fb-like" data-href="{FORUM_URL}{TOPIC_URL}" data-layout="button_count" data-action="like" data-show-faces="false" data-share="false" style="top:5px"></div>
          </li>   
          <!-- END switch_fb_likebtn -->
          
          <!-- BEGIN switch_twitter_btn -->
          <li class="post-icon" style="padding-top:5px">
                <a href="https://twitter.com/share" class="twitter-share-button" data-via="{TWITTER}">Tweet</a>
                <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
            </li>
          <!-- END switch_twitter_btn -->
       </ul>
    </div>
      </td>
      </tr></table>

    <div class="clearfix empty-clear"></div>

    <div class="borderwrap">
       <div class="maintitle floated">
          <h1>{TOPIC_TITLE}</h1>
          <div id="topicmenu-options" class="popmenubutton">
             <!-- BEGIN switch_plus_menu -->
             <div id="addthis-toolbar" style="display: inline-block; margin-right:5px;">
                <div class="btn-floating-left" tabindex="100">
                        {L_SHARE}
                </div>
                <div class="addthis-toolbar-btn" style="display:none;">
                        {switch_plus_menu.SOCIAL_BUTTONS}
                </div>
             </div>
                {switch_plus_menu.JS_SOCIAL_BUTTONS}
             <script type="text/javascript">//<![CDATA[

                var url_favourite = '{U_FAVOURITE_JS_PLUS_MENU}';
                var url_newposts = '{U_NEWPOSTS_JS_PLUS_MENU}';
                var url_egosearch = '{U_EGOSEARCH_JS_PLUS_MENU}';
                var url_unanswered = '{U_UNANSWERED_JS_PLUS_MENU}';
                var url_watchsearch = '{U_WATCHSEARCH_JS_PLUS_MENU}';
                insert_plus_menu_new('f{FORUM_ID}&amp;t={TOPIC_ID}','{JS_SESSION_ID}', {JS_AUTH_FAVOURITES}, '{JS_WATCH_TOPIC}');
             //]]>
             </script>
             <!-- END switch_plus_menu -->
          </div>
       </div>
      <div style="background-color: #cbd89e; color: yellow; padding-top: 20px; padding-left: 360px;">
        ............. . . . . . . .....<a href="?view=newest">==> <font size="5" color="#91910e">перейти к последнему посту темы</font></a>
      </div>
       {POLL_DISPLAY}

       <!-- BEGIN postrow -->
       
       <!-- BEGIN hidden -->
       <div class="postdetails {postrow.hidden.ROW_CLASS}" colspan="2" align="center">{postrow.hidden.MESSAGE}</div>
       <!-- END hidden -->
       
       <!-- BEGIN first_post_br -->
    </div>
    <hr id="first-post-br" />
     
    <div class="borderwrap">
       <!-- END first_post_br -->
       
       <!-- BEGIN displayed -->
       <div id="p{postrow.displayed.U_POST_ID}" class="post {postrow.displayed.ONLINE_IMG_NEW} clearfix post--{postrow.displayed.U_POST_ID}"{postrow.displayed.THANK_BGCOLOR} style="{postrow.displayed.DISPLAYABLE_STATE}">
          <div class="post-container"{postrow.displayed.THANK_BGCOLOR}>
             <div class="postbody clearfix">
                <div class="postprofile" id="profile{postrow.displayed.U_POST_ID}">

                   <div class="postprofile-head post-header"{postrow.displayed.THANK_BGCOLOR}>
                      <div class="popmenubutton-new-out popmenubutton">
                         <a href="javascript:void(0);"{postrow.displayed.ONCLICK}>{postrow.displayed.ONLINE_IMG_INV}{postrow.displayed.POSTER_NAME_INV}</a>
                      </div>
                      <!-- BEGIN user_logged_in -->
                      <div id="pm{postrow.displayed.U_POST_ID}" class="popupmenu clearfix" style="display:none;">
                         <div class="avatar">
                            {postrow.displayed.POSTER_AVATAR}
                         </div>
                         <ul>
                            <li class="popupmenu-item">{postrow.displayed.PROFILE_IMG}&nbsp;</li>
                            
                                                             
                            <!-- BEGIN switch_user_email -->
                            <li class="popupmenu-item">{postrow.displayed.EMAIL_IMG}&nbsp;</li>
                            <!-- END switch_user_email -->
                            <!-- BEGIN switch_contact_row -->
                            <li class="popupmenu-item">
                               <!-- BEGIN contact_field -->
                               {postrow.displayed.user_logged_in.switch_contact_row.contact_field.CONTENT}&nbsp;
                               <!-- END contact_field -->&nbsp;
                            </li>
                            <!-- END switch_contact_row -->
                            <!-- BEGIN switch_user_posts -->
                            <li class="popupmenu-item last">{postrow.displayed.USER_POSTS_IMG}&nbsp;</li>
                            <!-- END switch_user_posts -->
                         </ul>
                      </div>
                      <!-- END user_logged_in -->
                   </div>

                   <dl class="postprofile-details postdetails">
                      <dt>
                         {postrow.displayed.POSTER_AVATAR}<br />
                         {postrow.displayed.POSTER_NAME}
                      </dt>
                      <dd>{postrow.displayed.POSTER_RANK_NEW}{postrow.displayed.RANK_IMAGE}</dd>
                                     <dd {postrow.displayed.AWARDS_SHOW} class="dd_award {postrow.displayed.PROFILE_POSITION}">
                                {postrow.displayed.AWARDS}
                      </dd>
                      <dd class="award_more"></dd><br>   
                                              <dd><br /></dd>
                                         
     <div class="award_more"></div>
                                              <br/>
                      <dd>
                         <!-- BEGIN profile_field -->
                         {postrow.displayed.profile_field.LABEL}{postrow.displayed.profile_field.CONTENT}{postrow.displayed.profile_field.SEPARATOR}
                         <!-- END profile_field -->
                         {postrow.displayed.POSTER_RPG}
                      </dd>
       
                                                <div>{postrow.displayed.PM_IMG}</div>
                                             
     
                   </dl>
                </div>

             <div class="postbody-head postdetails post-header"{postrow.displayed.THANK_BGCOLOR}>
                <ul class="post-info">
                   <li>{postrow.displayed.IP_IMG}</li>
                   <li>{L_POST_NUMBER}{postrow.displayed.COUNT_POSTS_NUMBER}</li>
                </ul>
                    <div style="position: relative; top: -30px; width: 1px;" id="{postrow.displayed.U_POST_ID}"></div>
                <h3>{postrow.displayed.ICON} <a href="{postrow.displayed.POST_URL}">{postrow.displayed.POST_SUBJECT}</a></h3>
                <p class="author"><img src="{postrow.displayed.MINI_POST_IMG}" alt="{postrow.displayed.L_MINI_POST_ALT}" title="{postrow.displayed.L_MINI_POST_ALT}" />&nbsp;{L_TOPIC_BY}&nbsp;{postrow.displayed.POSTER_NAME} {postrow.displayed.POST_DATE_NEW}</p>
             </div>

             <div class="post-entry">
                <!-- BEGIN switch_vote_active -->
                <div class="vote gensmall">
                   <!-- BEGIN switch_vote -->
                   <div class="vote-button"><a href="{postrow.displayed.switch_vote_active.switch_vote.U_VOTE_PLUS}">+</a></div>
                   <!-- END switch_vote -->

                   <!-- BEGIN switch_bar -->
                   <div class="vote-bar" title="{postrow.displayed.switch_vote_active.L_VOTE_TITLE}">
                      <!-- BEGIN switch_vote_plus -->
                      <div class="vote-bar-plus" style="height:{postrow.displayed.switch_vote_active.switch_bar.switch_vote_plus.HEIGHT_PLUS}px;"></div>
                      <!-- END switch_vote_plus -->

                      <!-- BEGIN switch_vote_minus -->
                      <div class="vote-bar-minus" style="height:{postrow.displayed.switch_vote_active.switch_bar.switch_vote_minus.HEIGHT_MINUS}px;"></div>
                      <!-- END switch_vote_minus -->
                   </div>
                   <!-- END switch_bar -->

                   <!-- BEGIN switch_no_bar -->
                   <div title="{postrow.displayed.switch_vote_active.L_VOTE_TITLE}" class="vote-no-bar">----</div>
                   <!-- END switch_no_bar -->

                   <!-- BEGIN switch_vote -->
                   <div class="vote-button"><a href="{postrow.displayed.switch_vote_active.switch_vote.U_VOTE_MINUS}">-</a></div>
                   <!-- END switch_vote -->
                </div>
                <!-- END switch_vote_active -->
                            <div class="table-tr-td" style="border-left: solid 1px #6D6D6D;padding-left: 36px;padding-top: 70px;padding-bottom: 35px; margin-left: 10px;">
                                  <div>{postrow.displayed.MESSAGE}</div></div>

                <!-- BEGIN switch_attachments -->
                <dl class="attachbox">
                   <dt>{postrow.displayed.switch_attachments.L_ATTACHMENTS}</dt>
                   <dd>
                      <!-- BEGIN switch_post_attachments -->
                      <dl class="file">
                         <dt>
                            <img src="{postrow.displayed.switch_attachments.switch_post_attachments.U_IMG}" alt="" />

                            <!-- BEGIN switch_dl_att -->
                            <a class="postlink" href="{postrow.displayed.switch_attachments.switch_post_attachments.switch_dl_att.U_ATTACHMENT}">{postrow.displayed.switch_attachments.switch_post_attachments.switch_dl_att.ATTACHMENT}</a> {postrow.displayed.switch_attachments.switch_post_attachments.switch_dl_att.ATTACHMENT_DEL}
                            <!-- END switch_dl_att -->

                            <!-- BEGIN switch_no_dl_att -->
                            {postrow.displayed.switch_attachments.switch_post_attachments.switch_no_dl_att.ATTACHMENT} {postrow.displayed.switch_attachments.switch_post_attachments.switch_no_dl_att.ATTACHMENT_DEL}
                            <!-- END switch_no_dl_att -->
                         </dt>

                         <!-- BEGIN switch_no_comment -->
                         <dd>
                            <em>{postrow.displayed.switch_attachments.switch_post_attachments.switch_no_comment.ATTACHMENT_COMMENT}</em>
                         </dd>
                         <!-- END switch_no_comment -->

                         <!-- BEGIN switch_no_dl_att -->
                         <dd>
                            <em><strong>{postrow.displayed.switch_attachments.switch_post_attachments.switch_no_dl_att.TEXT_NO_DL}</strong></em>
                         </dd>
                         <!-- END switch_no_dl_att -->

                         <dd>({postrow.displayed.switch_attachments.switch_post_attachments.FILE_SIZE}) {postrow.displayed.switch_attachments.switch_post_attachments.NB_DL}</dd>
                      </dl>
                      <!-- END switch_post_attachments -->
                   </dd>
                </dl>
                <!-- END switch_attachments -->
                <div class="clear"></div>
                              <div style="font-size:12px; margin:0;padding:0;">
                {postrow.displayed.EDITED_MESSAGE}
                              </div>
             </div>


             <!-- BEGIN switch_signature -->
             <div id="sig{postrow.displayed.U_POST_ID}" class="signature_div">{postrow.displayed.SIGNATURE_NEW}</div>
             <!-- END switch_signature -->
             <!-- BEGIN switch_likes_active -->
             <div class="fa_like_div">
                <button class="rep-button {postrow.displayed.switch_likes_active.C_VOTE_LIKE}"  data-href="{postrow.displayed.switch_likes_active.U_VOTE_LIKE}" data-href-rm="{postrow.displayed.switch_likes_active.U_VOTE_RM_LIKE}">
                   <svg width="17px" height="17px" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M320 1344q0-26-19-45t-45-19q-27 0-45.5 19t-18.5 45q0 27 18.5 45.5t45.5 18.5q26 0 45-18.5t19-45.5zm160-512v640q0 26-19 45t-45 19h-288q-26 0-45-19t-19-45v-640q0-26 19-45t45-19h288q26 0 45 19t19 45zm1184 0q0 86-55 149 15 44 15 76 3 76-43 137 17 56 0 117-15 57-54 94 9 112-49 181-64 76-197 78h-129q-66 0-144-15.5t-121.5-29-120.5-39.5q-123-43-158-44-26-1-45-19.5t-19-44.5v-641q0-25 18-43.5t43-20.5q24-2 76-59t101-121q68-87 101-120 18-18 31-48t17.5-48.5 13.5-60.5q7-39 12.5-61t19.5-52 34-50q19-19 45-19 46 0 82.5 10.5t60 26 40 40.5 24 45 12 50 5 45 .5 39q0 38-9.5 76t-19 60-27.5 56q-3 6-10 18t-11 22-8 24h277q78 0 135 57t57 135z" fill="#fff"></path></svg>
                   <span>{postrow.displayed.switch_likes_active.L_LIKE}</span>{postrow.displayed.switch_likes_active.COUNT_VOTE_LIKE}
                </button>
                <!-- BEGIN switch_dislike_button -->
                <button class="rep-button {postrow.displayed.switch_likes_active.switch_dislike_button.C_VOTE_DISLIKE}" data-href="{postrow.displayed.switch_likes_active.switch_dislike_button.U_VOTE_DISLIKE}" data-href-rm="{postrow.displayed.switch_likes_active.switch_dislike_button.U_VOTE_RM_LIKE}">
                   <svg width="17px" height="17px" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M320 576q0 26-19 45t-45 19q-27 0-45.5-19t-18.5-45q0-27 18.5-45.5t45.5-18.5q26 0 45 18.5t19 45.5zm160 512v-640q0-26-19-45t-45-19h-288q-26 0-45 19t-19 45v640q0 26 19 45t45 19h288q26 0 45-19t19-45zm1129-149q55 61 55 149-1 78-57.5 135t-134.5 57h-277q4 14 8 24t11 22 10 18q18 37 27 57t19 58.5 10 76.5q0 24-.5 39t-5 45-12 50-24 45-40 40.5-60 26-82.5 10.5q-26 0-45-19-20-20-34-50t-19.5-52-12.5-61q-9-42-13.5-60.5t-17.5-48.5-31-48q-33-33-101-120-49-64-101-121t-76-59q-25-2-43-20.5t-18-43.5v-641q0-26 19-44.5t45-19.5q35-1 158-44 77-26 120.5-39.5t121.5-29 144-15.5h129q133 2 197 78 58 69 49 181 39 37 54 94 17 61 0 117 46 61 43 137 0 32-15 76z" fill="#fff"/></svg>
                   <span>{postrow.displayed.switch_likes_active.switch_dislike_button.L_DISLIKE}</span>{postrow.displayed.switch_likes_active.switch_dislike_button.COUNT_VOTE_DISLIKE}
                </button>
                <!-- END switch_dislike_button -->
                <!-- BEGIN switch_like_list -->
                {postrow.displayed.switch_likes_active.switch_like_list.D_LIKE_LIST}
                <!-- END switch_like_list -->
                <!-- BEGIN switch_dislike_list -->
                {postrow.displayed.switch_likes_active.switch_dislike_list.D_DISLIKE_LIST}
                <!-- END switch_dislike_list -->
             </div>
             <!-- END switch_likes_active -->
          </div>

       </div>

          <div class="post-footer clearfix"{postrow.displayed.THANK_BGCOLOR}>
             <ul class="misc-icons">
                <li><a href="#top">{L_BACK_TO_TOP}</a></li>
                <li>{postrow.displayed.REPORT_IMG_NEW}</li>
             </ul>
             <ul class="posting-icons">
                <li>{postrow.displayed.THANK_IMG}</li>
                <li>{postrow.displayed.MULTIQUOTE_IMG}</li>
                <li>{postrow.displayed.QUOTE_IMG}</li>
                <li>{postrow.displayed.EDIT_IMG}</li>
                <li>{postrow.displayed.DELETE_IMG}</li>
             </ul>
                      . . . .. . .<a href="#qpost">==> <font size="3" color="#91910e"> к форме ответа</font></a>
          </div>
       </div> <!-- closing tag post -->
       <!-- END displayed -->
       <!-- END postrow -->
       <div class="topic-footer clearfix">
          <!-- BEGIN minisearch -->
          <div class="search-footer-box">
             <form method="get" id="forum-search" action="{S_SEARCHBOX_ACTION}">
                <fieldset>
                   <input type="text" name="search_keywords" id="search_keywords" size="20" value="{L_SEARCH}" onclick="if (this.value == '{L_SEARCH}') this.value = '';" onblur="if (this.value == '') this.value = '{L_SEARCH}';" />
                   &nbsp;<input class="button" type="submit" value="{L_SEARCH}" />
                   <input type="hidden" value="{SEARCH_WHERE}" name="search_where" />
                   <input type="hidden" value="{SEARCH_TOPIC}" name="search_topic" />
                   <input type="hidden" value="posts" name="show_results" />
                </fieldset>
             </form>
          </div>
          <!-- END minisearch -->
            <!-- BEGIN switch_isconnect -->
          <div class="next-prev">
              &laquo;  <a href="#nisuk" onclick="smoothScroll(event, 50)">Посмотреть темы раздела</a> &middot; <a href="{U_VIEW_NEWER_TOPIC}">Тема ниже</a> &raquo;
          </div>
    <script>
    function smoothScroll(event, offset) {
        event.preventDefault();
        const target = document.querySelector('#nisuk');
        if (target) {
            const topPos = target.getBoundingClientRect().top + window.scrollY + offset;
            window.scrollTo({
                top: topPos,
                behavior: 'smooth'
            });
        }
    }
    </script>
            <!-- END switch_isconnect -->
       </div>
    </div>

    <!-- BEGIN viewtopic_bottom -->
    <br />
    <div class="borderwrap">
       <div class="bar clearfix">
          <div class="left rtl-inversion-left">
             <input type="hidden" name="t" value="{TOPIC_ID}" />

             <!-- <input type="hidden" name="sid" value="{S_SID}" /> -->
             <input type="hidden" name="{SECURE_ID_NAME}" value="{SECURE_ID_VALUE}" />

             {S_TOPIC_ADMIN}
          </div>
          <div class="right rtl-inversion-right">
             {L_TABS_PERMISSIONS} <br />{S_AUTH_LIST}
          </div>
       </div>
    </div>
    <!-- END viewtopic_bottom -->

    <!-- BEGIN topicpagination -->
    <div class="pagination topic-options">
       {PAGINATION}
    </div>
    <!-- END topicpagination -->


     
    <div class="posting-options topic-options">
       <ul class="posting-buttons clearfix">
          <!-- BEGIN switch_user_authpost -->
          <li class="post-icon">
             <a href="{U_POST_NEW_TOPIC}" accesskey="n" rel="nofollow"><img src="{POST_IMG}" class="{POST_IMG_ID}" alt="{L_POST_NEW_TOPIC}" /></a>
          </li>
          <!-- END switch_user_authpost -->
          <!-- BEGIN switch_user_authreply -->
          <li class="post-icon">
             <a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" class="i_reply" alt="{L_POST_REPLY_TOPIC}" /></a>
          </li>
          <!-- END switch_user_authreply -->
       </ul>
    </div>

    <div class="clearfix empty-clear"></div>

    <!-- BEGIN promot_trafic -->
    <div class="row2">
       <div id="ptrafic_close" class="clearfix" style="display:none">
          <div class="maintitle floated">
             <h3>{PROMOT_TRAFIC_TITLE}</h3>
             <div class="right rtl-inversion-right">
                <a href="javascript:ShowHideLayer('ptrafic_open','ptrafic_close');"><img src="{TABS_MORE_IMG}" alt="+" align="" border="0" /></a>
             </div>
          </div>
       </div>
       <div id="ptrafic_open" class="clearfix" style="display:''">
          <div class="maintitle floated">
             <h3>{PROMOT_TRAFIC_TITLE}</h3>
             <div class="right rtl-inversion-right">
                <a href="javascript:ShowHideLayer('ptrafic_open','ptrafic_close');"><img src="{TABS_LESS_IMG}" alt="-" align="" border="0" /></a>
             </div>
          </div>
          <div>
             <!-- BEGIN link -->
             &raquo;&nbsp;<a href="{promot_trafic.link.U_HREF}" title="{promot_trafic.link.TITLE}" rel="nofollow">{promot_trafic.link.TITLE}</a><br />
             <!-- END link -->
          </div>
       </div>
    </div>
    <!-- END promot_trafic -->

    <!-- BEGIN switch_forum_rules -->
    <div class="row1" id="forum_rules">
       <div class="maintitle">
          <h3>{L_FORUM_RULES}</h3>
       </div>
       <table>
          <tr>
             <!-- BEGIN switch_forum_rule_image -->
             <td class="logo">
                <img src="{RULE_IMG_URL}" alt=""/>
             </td>
             <!-- END switch_forum_rule_image -->
             <td class="rules post-entry">
                {RULE_MSG}
             </td>
          </tr>
       </table>
    </div>
    <!-- END switch_forum_rules -->

    <!-- BEGIN switch_user_logged_in -->
     
     

     
     
     
    <a name="quickreply"></a>
    {QUICK_REPLY_FORM}
    <!-- END switch_user_logged_in -->
     

       

     
     
     
     
     
     
     
    <!-- BEGIN switch_image_resize -->
    <script type="text/javascript">
    //<![CDATA[
    $(resize_images({ 'selector' : '.postbody .post-entry', 'max_width' : {switch_image_resize.IMG_RESIZE_WIDTH}, 'max_height' : {switch_image_resize.IMG_RESIZE_HEIGHT} }));
    //]]>
    </script>
    <!-- END switch_image_resize -->
             
             
      <script>
     
      window.onload = function() {
     
        if(pageYOffset < 1000) {
     
      let ele = document.getElementById('navstrip');
      ele.scrollIntoView();
     };
      };
     
      </script>
       
       
       
       
        <br /><br />
      <div id="nisuk"></div>
     
     <script type="text/javascript">
      $(document).ready(function(fdf_EN) {
      var numb_limit = 5;
      var globalTopic = 'Общее объявление';
      var colorGlobalTopic = '#b1b7a3';
      var fixTopic = 'Важно!';
      var colorfixTopic = '#afafaf';
      var announcementTopics = 'Объявление';
      var colorannouncementTopics = '#649958';
      $.ajax({
          type: "GET",
          url: $('ul#navstrip li:last-child a[href*="f"]').attr('href'),
          dataType: "html",
          success: function(crowleys) {
      $("#nisuk").before('<div id="shekTraff" class="row1"><div class="clearfix"><div align="center" class="maintitle floated"><font size="6">темы из раздела</font><img src="https://i.servimg.com/u/f10/20/33/56/10/aaaa11.gif"></div></div><div id="topiclist" align="center"></div></div>');
            $(crowleys).find('table.ipbtable:not(:last-child) tbody tr td.row1:nth-child(3)').each(function(fdf,shek) {
                $('#topiclist').append('» &nbsp;<a id="'+ fdf +'" href="' + $(this).find('a.topictitle').attr('href') + '" title="'+ $(this).text() +'">'+ $(this).text() +'</a><br><br>');
                $('#topiclist a:contains("'+ globalTopic +'")').css('color',colorGlobalTopic);
                $('#topiclist a:contains("'+ fixTopic +'")').css('color',colorfixTopic);
                $('#topiclist a:contains("'+ announcementTopics +'")').css('color',colorannouncementTopics);
                if(fdf == numb_limit) {return false;}
            });
          }
      });
    });
        </script>
    كونان2000
    كونان2000
    Forumember


    Male Posts : 284
    Reputation : 120
    Language : Arabic

    Solved Re: scrolling to the topic list in bottom

    Post by كونان2000 September 18th 2024, 5:22 pm

    The code has been modified
    When using the number 10 in smoothScroll(event, 10), it will scroll 3 centimeters (30 pixels).
    If you use a lower number, like 6, it will scroll less than 3 centimeters and so on.

    Code:
     <div class="next-prev">
              &laquo;  <a href="#nisuk" onclick="smoothScroll(event, 6)">Посмотреть темы раздела</a> &middot; <a href="{U_VIEW_NEWER_TOPIC}">Тема ниже</a> &raquo;
          </div>

        <script>
    function smoothScroll(event, number) {
        event.preventDefault();
        const target = document.querySelector('#nisuk');
        if (target) {
            const offset = (number - 10) * 30;
            const topPos = target.getBoundingClientRect().top + window.scrollY + offset;
            window.scrollTo({
                top: topPos,
                behavior: 'smooth'
            });
        }
    }
    </script>
    poesia-verses
    poesia-verses
    Forumember


    Male Posts : 571
    Reputation : 22
    Language : and small english

    Solved Re: scrolling to the topic list in bottom

    Post by poesia-verses September 18th 2024, 5:29 pm

    send PM on my forum

    كونان2000 likes this post

    poesia-verses
    poesia-verses
    Forumember


    Male Posts : 571
    Reputation : 22
    Language : and small english

    Solved Re: scrolling to the topic list in bottom

    Post by poesia-verses September 18th 2024, 6:05 pm

    @كونان2000 may be conflict wish these script
    (in end of code)

    Code:
      <script>
     
      window.onload = function() {
     
        if(pageYOffset < 1000) {
     
      let ele = document.getElementById('navstrip');
      ele.scrollIntoView();
     };
      };
     
      </script>

    كونان2000 likes this post

    skouliki
    skouliki
    Manager
    Manager


    Female Posts : 15391
    Reputation : 1709
    Language : English,Greek
    Location : Greece

    Solved Re: scrolling to the topic list in bottom

    Post by skouliki September 29th 2024, 2:56 am

    Hello

    Is this solved?

    Ape
    Ape
    Administrator
    Administrator


    Male Posts : 19432
    Reputation : 2010
    Language : fluent in dork / mumbojumbo & English haha

    Solved Re: scrolling to the topic list in bottom

    Post by Ape September 29th 2024, 1:53 pm

    Problem solved & topic archived.
    Please read our forum rules: ESF General Rules



    scrolling to the topic list in bottom Left1212scrolling to the topic list in bottom Center11scrolling to the topic list in bottom Right112
    scrolling to the topic list in bottom Ape_b110
    scrolling to the topic list in bottom Ape1010

      Current date/time is November 11th 2024, 3:34 pm