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.

Similar topics on bottom (or top)

4 posters

Go down

Solved Similar topics on bottom (or top)

Post by Simone Boi December 17th 2020, 8:04 am

Hi guys! First of all thanks for your support, I've almost done with my forum.
Today I would ask you a way to move a widget in bottom (before or after sceditor, idk) or in case it's too hard, would be good on top.

I tried using this code to move the widget on top:

Code:
$(function(){
    var forumname = 'Similar Topics';
    $('.module:contains("' + forumname + '")').css('width', '100%').detach().prependTo('#main-content');
 
});

but it gives me a blank page with only "View all similar topics", how can I solve this?

This is the widget code by ange:

CODE:

It works good, and it shows up only in topics, but i'm not able to move it on bottom (or top)

Thank you!


Last edited by Simone Boi on December 18th 2020, 12:50 pm; edited 1 time in total
avatar
Simone Boi
Forumember

Posts : 90
Reputation : 2
Language : Italian

https://gamespledge.forumattivo.com/

Back to top Go down

Solved Re: Similar topics on bottom (or top)

Post by TheCrow December 17th 2020, 9:42 am

Hello @Simone Boi,

Can you please share a picture of your result to see what the problem is?

Thank you,
TC.


Similar topics on bottom (or top) Thecro10
Forum of the Forums

Forumotion Rules | Tips & Tricks |
FAQ | Did you forget your password?



*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Simone Boi likes this post

Back to top Go down

Solved Re: Similar topics on bottom (or top)

Post by Simone Boi December 17th 2020, 9:56 am

Hi! @TheCrow, when I use those codes to move the "Similar Topics" widget on top I get this:

Image:

Now, i would like have it in bottom, but didn't find any code for that
avatar
Simone Boi
Forumember

Posts : 90
Reputation : 2
Language : Italian

https://gamespledge.forumattivo.com/

Back to top Go down

Solved Re: Similar topics on bottom (or top)

Post by TheCrow December 17th 2020, 10:00 am

Try this javascript instead:
Code:
$(function(){
    $('.module:contains("Similar Topics")').insertAfter('#main-content');
});


Similar topics on bottom (or top) Thecro10
Forum of the Forums

Forumotion Rules | Tips & Tricks |
FAQ | Did you forget your password?



*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Simone Boi likes this post

Back to top Go down

Solved Re: Similar topics on bottom (or top)

Post by Simone Boi December 17th 2020, 10:03 am

Thanks for your help, anyway same issue Sad
avatar
Simone Boi
Forumember

Posts : 90
Reputation : 2
Language : Italian

https://gamespledge.forumattivo.com/

Back to top Go down

Solved Re: Similar topics on bottom (or top)

Post by TheCrow December 17th 2020, 10:06 am

I don't see that widget anywhere on your forum.


Similar topics on bottom (or top) Thecro10
Forum of the Forums

Forumotion Rules | Tips & Tricks |
FAQ | Did you forget your password?



*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

Solved Re: Similar topics on bottom (or top)

Post by Simone Boi December 17th 2020, 10:08 am

Oh sorry, I didn't know u were watching my forum, i'm testing it on another forum www.gamespledge.forumattivo.com
avatar
Simone Boi
Forumember

Posts : 90
Reputation : 2
Language : Italian

https://gamespledge.forumattivo.com/

Back to top Go down

Solved Re: Similar topics on bottom (or top)

Post by TheCrow December 17th 2020, 10:37 am

Sorry but I don't see it there either..


Similar topics on bottom (or top) Thecro10
Forum of the Forums

Forumotion Rules | Tips & Tricks |
FAQ | Did you forget your password?



*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

Solved Re: Similar topics on bottom (or top)

Post by Simone Boi December 17th 2020, 10:53 am

You can't see the widget, it only shows up when u in a topic, and I've just noticed that the issue only happens when ur logged, if u want u can try this test account and enter in a topic:


____edit: no ok it happens even if u are not logged @_@ can't understand
avatar
Simone Boi
Forumember

Posts : 90
Reputation : 2
Language : Italian

https://gamespledge.forumattivo.com/

TheCrow likes this post

Back to top Go down

Solved Re: Similar topics on bottom (or top)

Post by TheCrow December 17th 2020, 10:59 am

Please do not share any information in public sections of the Support Forum.
For security reasons, I have removed your personal information from your post. Thank you!.
Please read our forum rules: ESF General Rules

Is this done only when you have that script activated? It seems that it removes all your forum. scratch


Similar topics on bottom (or top) Thecro10
Forum of the Forums

Forumotion Rules | Tips & Tricks |
FAQ | Did you forget your password?



*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

Solved Re: Similar topics on bottom (or top)

Post by Simone Boi December 17th 2020, 11:03 am

It happens only when I have:

. Widget activated
. the Javascript to move it in top
. When I open a topic

with only the widget on the left/right, it works good, but when I try to move it on top it gives me the issue, anyway it's not a javascript error, cause it works with others widget, I think the "Similar Topic" widget has a code that doesn't work good when u move it on top (idk in bottom).
avatar
Simone Boi
Forumember

Posts : 90
Reputation : 2
Language : Italian

https://gamespledge.forumattivo.com/

Back to top Go down

Solved Re: Similar topics on bottom (or top)

Post by TheCrow December 17th 2020, 11:17 am

Can you please deactivate the script to see the forum ?


Similar topics on bottom (or top) Thecro10
Forum of the Forums

Forumotion Rules | Tips & Tricks |
FAQ | Did you forget your password?



*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Simone Boi likes this post

Back to top Go down

Solved Re: Similar topics on bottom (or top)

Post by Simone Boi December 17th 2020, 11:19 am

Ok I deactivated the javascript, now u can find the widget on the right at the last.

------- edit: now i used this code to move up the widget on the left, and it works, but i prefer to move it bottom

Code:
#left {
  float:none !important;
  width:100% !important;
}
#content-container div#container, #content-container div#content {
  float:none !important;
  margin-left:0 !important;
}
#left div[style="height:6px"] { display:none; }
#left .module {
  vertical-align:top;
  display:inline-block;
  width:1145px;
  margin:3px;
}
avatar
Simone Boi
Forumember

Posts : 90
Reputation : 2
Language : Italian

https://gamespledge.forumattivo.com/

Back to top Go down

Solved Re: Similar topics on bottom (or top)

Post by tikky December 18th 2020, 12:23 pm

Hey @Simone Boi,

You don't need to do that, just remove any edits related to the widget + scripts and change the widget code to:
Code:
<style type="text/css">
#fa_topics_similar a {
  font-size:10px;
  font-weight:normal;
  display:block;
  padding:3px 0;
}
 
#fa_topics_similar a b {
  font-weight:normal;
}
 
#fa_ts_more {
 
  text-align:center;
  font-weight:bold;
}
</style>
<div id="fa_topics_similar">
</div>
<div id="fa_ts_more" class="module-footer">
</div>
 <script type="text/javascript">//<![CDATA[
(function() {
  var amount = 5,
      lang = {
        see_more : 'View all similar topics',
        loading : 'Finding similar topics...',
        error_node : '<code>#fa_topics_similar</code> is null',
        error_version : 'Forum version could not be identified'
      },
 
      url = '/search?search_keywords=',
      node = document.getElementById('fa_topics_similar'),
      temp = document.createElement('DIV'),
      topics,
 
      hideModule = function(node) {
        switch (node.parentNode.tagName) {
          case 'TD' : // phpbb2
            jQuery(node).closest('.forumline').hide();
            break;
 
          case 'DIV' : // phpbb3, punbb, invision
            jQuery(node).closest('.module').hide();
            break;
 
          default :
            document.write('<p style="color:#F30;font-size:12px;">' + lang.error_version + '<p>');
            break;
        }
      };
 
  if (/\/t\d+/.test(window.location.href) && node) {
    url += encodeURIComponent(document.title.replace(/(.*?)(?:\s-\s.*)/, function(M, S) { return S }));
    node.innerHTML = lang.loading;
 
    jQuery.get(url + '&change_version=prosilver', function(d) {
      topics = jQuery('a.topictitle', d);
      node.innerHTML = '';
 
      if (topics[0]) {
 
        for (var i = 0, j = amount + 1; i < j; i++) {
          if (topics[i]) {
            topics[i].href = topics[i].href.replace(/\?.*/, '');
            if (!new RegExp(topics[i].href).test(window.location.href)) {
              jQuery('.coloradmin', topics[i]).removeAttr('style class');
              temp.appendChild(topics[i]);
            }
          }
        }
 
        node.appendChild(temp);
jQuery(node).closest('.module').detach().insertAfter('.post:last');
      } else {
        hideModule(node);
      }
    });
jQuery(node).closest('.module').find('#fa_ts_more').html('<a href="' + url + '">' + lang.see_more + '</a>');
  } else if (node) {
    hideModule(node);
  } else {
    jQuery('#fa_ts_more').html('<p style="color:#F30;font-size:12px;">' + lang.error_node + '<p>');
  }
}());
// par ange tuteur
//]]></script>
tikky
tikky
Forumember

Posts : 922
Reputation : 160
Language : 🇵🇹

https://www.forumotion.com/create-forum/modernbb

skouliki and Simone Boi like this post

Back to top Go down

Solved Re: Similar topics on bottom (or top)

Post by Simone Boi December 18th 2020, 12:41 pm

Dude.

Don't.:

Promess:
avatar
Simone Boi
Forumember

Posts : 90
Reputation : 2
Language : Italian

https://gamespledge.forumattivo.com/

tikky likes this post

Back to top Go down

Solved Re: Similar topics on bottom (or top)

Post by skouliki December 18th 2020, 12:50 pm

Is this solved ? If yes please mark it as solved
skouliki
skouliki
Manager
Manager

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

http://iconskouliki.forumgreek.com

Simone Boi likes this post

Back to top Go down

Solved Re: Similar topics on bottom (or top)

Post by skouliki December 18th 2020, 1:06 pm

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

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

http://iconskouliki.forumgreek.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum