Similar topics on bottom (or top)
4 posters
Page 1 of 1
Similar topics on bottom (or top)
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:
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:
It works good, and it shows up only in topics, but i'm not able to move it on bottom (or top)
Thank you!
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:
- 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;
margin-top:3px;
}
</style>
<div id="fa_topics_similar">
</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);
} else {
hideModule(node);
}
});
document.write('<div id="fa_ts_more"><a href="' + url + '">' + lang.see_more + '</a></div>');
} else if (node) {
hideModule(node);
} else {
document.write('<p style="color:#F30;font-size:12px;">' + lang.error_node + '<p>');
}
}());
// par ange tuteur
//]]></script>
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
Re: Similar topics on bottom (or top)
Hello @Simone Boi,
Can you please share a picture of your result to see what the problem is?
Thank you,
TC.
Can you please share a picture of your result to see what the problem is?
Thank you,
TC.
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!
Simone Boi likes this post
Re: Similar topics on bottom (or top)
Hi! @TheCrow, when I use those codes to move the "Similar Topics" widget on top I get this:
Now, i would like have it in bottom, but didn't find any code for that
- Image:
Now, i would like have it in bottom, but didn't find any code for that
Re: Similar topics on bottom (or top)
Try this javascript instead:
- Code:
$(function(){
$('.module:contains("Similar Topics")').insertAfter('#main-content');
});
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!
Simone Boi likes this post
Re: Similar topics on bottom (or top)
I don't see that widget anywhere on your forum.
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!
Re: Similar topics on bottom (or top)
Oh sorry, I didn't know u were watching my forum, i'm testing it on another forum www.gamespledge.forumattivo.com
Re: Similar topics on bottom (or top)
Sorry but I don't see it there either..
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!
Re: Similar topics on bottom (or top)
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
____edit: no ok it happens even if u are not logged @_@ can't understand
TheCrow likes this post
Re: Similar topics on bottom (or top)
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!.
|
Is this done only when you have that script activated? It seems that it removes all your forum.
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!
Re: Similar topics on bottom (or top)
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).
. 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).
Re: Similar topics on bottom (or top)
Can you please deactivate the script to see the forum ?
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!
Simone Boi likes this post
Re: Similar topics on bottom (or top)
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
------- 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;
}
Re: Similar topics on bottom (or top)
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:
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>
skouliki and Simone Boi like this post
Re: Similar topics on bottom (or top)
Dude.
- Don't.:
- I love you.
- Promess:
- I swear, i have only few more questions for you awesome guys, i'm trying to solve what I can, but i'm not good, sorry.
tikky likes this post
Re: Similar topics on bottom (or top)
Is this solved ? If yes please mark it as solved
Simone Boi likes this post
Re: Similar topics on bottom (or top)
Problem solved & topic archived.
|
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum