Help me to change this JS to related post Hitskin_logo Hitskin.com

This is a Hitskin.com skin preview
Install the skinReturn to the skin page

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.
3 posters

    Help me to change this JS to related post

    sivastar
    sivastar
    Forumember


    Male Posts : 152
    Reputation : 16
    Language : Tamil
    Location : Malaysia

    Help me to change this JS to related post Empty Help me to change this JS to related post

    Post by sivastar October 3rd 2018, 1:45 am

    Code:
    <div class='show' id='slidebox'><div class='slidebox-title slidebox-www'><span style='float:left;margin:0 15px;'>Maybe you are interested in</span><span><a href='javascript:void(0);' id='slidebox-close' title='close'>×</a></span><span><a href='javascript:void(0);' id='slidebox-minimize' title='minimize'>−</a></span><span><a href='javascript:void(0);' id='slidebox-maximize' title='maximize'>+</a></span></div><div class='slidebox-container'><ul class='related-post-style-2' id='sliding-tab'/></div></div>
    <style>
    /* Widget Recommended Content */
    #slidebox{background:#fff;width:100%;max-width:355px;height:255px;position:fixed;overflow:hidden;border:none;right:-360px;z-index:99;text-align:left;box-shadow:0 1px 0 0 rgba(0,0,0,0.03);transition:all .4s ease-out}
    .slidebox-title{background:#3a5795;color:#fff;display:block;height:45px;line-height:45px;width:100%;font-size:14px;text-transform:capitalize;font-weight:700;letter-spacing:.5px}
    .slidebox-title span a{font-family:initial;float:right;height:40px;margin:0 0 0 15px;text-align:center;color:#fff;font-size:20px}
    a#slidebox-close,a#slidebox-close{margin-right:15px}
    .slidebox-title >span >h2{font-size:20px!important;font-weight:normal!important}
    .slidebox-container{border:none;float:left;width:100%;height:auto;margin:3px}
    .slidebox-container >div{border:none;margin:3px 0;padding:10px 0}
    .slidebox-container >div >span{font-size:14px}
    .show{bottom:84px}
    .hide{bottom:-205px}
    .related-post{font-size:70%}
    .related-post h4{font-size:150%;margin:0 0 .5em}
    .related-post-style-2{padding-top:5px;list-style:none}
    .related-post-style-2 li{padding:0 10px 10px 10px;overflow:hidden}
    .related-post-style-2 li:first-child{border-top:none}
    .related-post-style-2 .related-post-item-thumbnail img {width:45px;height:45px;max-width:none;max-height:none;border:0;padding:0;border-radius:3px;float:left;margin:2px 10px 0 0}
    .related-post-style-2 .related-post-item-title{font-weight:700;font-size:110%;line-height:normal}
    a.related-post-item-title{color:#95a5a6;transition:all .4s ease-out}
    a:hover.related-post-item-title{color:#2ecc71;text-decoration:none}
    .related-post-style-2 .related-post-item-summary{display:block;overflow:hidden}
    </style>
    <script type="text/javascript">
    $(window).scroll(function() {
      $("#slidebox").css($(this).scrollTop() > 700 ? {
        right: "0px"
      } : {
        right: "-360px"
      });
    }), $(document).ready(function() {
      var i = $("#slidebox"),
        s = $("#slidebox-close"),
        o = $("#slidebox-minimize"),
        l = $("#slidebox-maximize");
      l.hide(), s.click(function() {
        i.css({
          right: "-350px"
        }), i.fadeOut("slow")
      }), o.click(function() {
        i.toggleClass("hide"), $(this).hide(), l.show()
      }), l.click(function() {
        i.toggleClass("hide"), $(this).hide(), o.show()
      })
    });
    </script>
    <script type="text/javascript">
      $(function () {
                $.ajax({
                    url: "/feed/?f={FORUM_ID}",
                    success: function (ta) {
                        for (var i = 1; i < 5; i++) {
                            var DL = $(ta).find("link:eq(" + i + ")").text();
                            var title = $(ta).find("title:eq(" + i + ")").text();
    $('<li><div class="news-item"><div><div class="related-post-style-2"><div class="crop"><a href="' + DL + '" class="related-post-item-thumbnail" rel="bookmark"></a></div><span></span><div style="clear: both;"></div></div></div></div></li>').appendTo('#sliding-tab');             
                   
                            $('<a class="related-post-item-title" href="' + DL + '">' + title + '</a>').appendTo('.news-item:eq(' + (i - 2) + ') .related-post-style-2 span');
                            $('<img  src="' + $(".news-item:eq(" + (i - 2) + ") .crop a:eq(0)").load(DL + ".postbody .messageContent img:eq(0)") + '" alt="Loading.." />').appendTo('.news-item:eq(' + (i - 2) + ') .crop a:eq(0)');
                        }
                    }
                });
            });
    </script>

    Help me to change this JS.

    ( url: "/feed/?f={FORUM_ID}",) change this link to ( url: "/search_keywords of topic title) like related post.

    Thank you
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51552
    Reputation : 3523
    Language : English
    Location : United States

    Help me to change this JS to related post Empty Re: Help me to change this JS to related post

    Post by SLGray October 3rd 2018, 1:57 am

    What does the code do?



    Help me to change this JS to related post Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    sivastar
    sivastar
    Forumember


    Male Posts : 152
    Reputation : 16
    Language : Tamil
    Location : Malaysia

    Help me to change this JS to related post Empty Re: Help me to change this JS to related post

    Post by sivastar October 3rd 2018, 3:20 am

    Help me to change this JS to related post 110

    Pop window open for the related post while scrolling the page
    vietkanpy
    vietkanpy
    Forumember


    Male Posts : 89
    Reputation : 33
    Language : vietnam

    Help me to change this JS to related post Empty Re: Help me to change this JS to related post

    Post by vietkanpy October 3rd 2018, 5:57 am

    helllo : you view code http://www.hotrofm.net/t219-code-recommended-content-cung-chuyen-muc ???

    You want code to related-post ? code in viewtopic (code in punbb)

    B1.
    Code:
    <script type="text/javascript">
    $(function () {
      var hotrofm = '{TOPIC_TITLE}';
      var topics = hotrofm.replace(/ /gi, '+');
      $('#sliding-tab').load('/search?mode=searchbox&search_keywords=' + topics + '&show_results=topics .tdtopics:not(".tdtopics:contains(\"Announcement\"), .tdtopics:contains(\"Sticky\"), .tdtopics:contains(\"Global announcement\")") .topic-title a.topictitle:lt(8)', function () {
          $('#sliding-tab a.topictitle').wrap("<li></li>");
      });
    });
    </script>

    B2:
    You can edit css

    sivastar
    sivastar
    Forumember


    Male Posts : 152
    Reputation : 16
    Language : Tamil
    Location : Malaysia

    Help me to change this JS to related post Empty Re: Help me to change this JS to related post

    Post by sivastar October 3rd 2018, 8:42 am

    vietkanpy wrote:helllo : you view code http://www.hotrofm.net/t219-code-recommended-content-cung-chuyen-muc ???

    You want code to related-post ? code in viewtopic (code in punbb)

    B1.
    Code:
    <script type="text/javascript">
    $(function () {
      var hotrofm = '{TOPIC_TITLE}';
      var topics = hotrofm.replace(/ /gi, '+');
      $('#sliding-tab').load('/search?mode=searchbox&search_keywords=' + topics + '&show_results=topics .tdtopics:not(".tdtopics:contains("Announcement"), .tdtopics:contains("Sticky"), .tdtopics:contains("Global announcement")") .topic-title a.topictitle:lt(8)', function () {
          $('#sliding-tab a.topictitle').wrap("<li></li>");
      });
    });
    </script>

    B2:
    You can edit css


    I need this code for PHPBB3.
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51552
    Reputation : 3523
    Language : English
    Location : United States

    Help me to change this JS to related post Empty Re: Help me to change this JS to related post

    Post by SLGray October 3rd 2018, 9:11 am

    vietkanpy wrote:helllo : you view code http://www.hotrofm.net/t219-code-recommended-content-cung-chuyen-muc ???

    You want code to related-post ? code in viewtopic  (code in punbb)

    B1.
    Code:
    <script type="text/javascript">
    $(function () {
       var hotrofm = '{TOPIC_TITLE}';
       var topics = hotrofm.replace(/ /gi, '+');
       $('#sliding-tab').load('/search?mode=searchbox&search_keywords=' + topics + '&show_results=topics .tdtopics:not(".tdtopics:contains("Announcement"), .tdtopics:contains("Sticky"), .tdtopics:contains("Global announcement")") .topic-title a.topictitle:lt(8)', function () {
          $('#sliding-tab a.topictitle').wrap("<li></li>");
       });
    });
    </script>

    B2:
    You can edit css

    Please only post links to tutorials in English as this is the official English support forum.



    Help me to change this JS to related post Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.