Latest topics
» Forumactif Edge - Releases
by Ange Tuteur Tue 03 Sep 2019, 11:49
» GIFActif - Giphy Button for the Editor
by Ange Tuteur Wed 08 May 2019, 17:21
» Forum Closure
by Ange Tuteur Mon 01 Jan 2018, 01:28
» Chit Chat Thread
by Valoish Sun 31 Dec 2017, 19:15
» Font/Text background color.
by Valoish Sun 31 Dec 2017, 19:11
» Forumactif Messenger - Instant Message Application for Forumotion
by Wolfuryo Sun 31 Dec 2017, 18:24
» [GAME] Count to One Million!
by brandon_g Fri 29 Dec 2017, 18:58
» Post Cards
by manikbiradar Wed 20 Dec 2017, 07:50
» [GAME] Countdown from 200,000
by Valoish Wed 13 Dec 2017, 23:22
» GeekPolice Tech Support Forums - GeekPolice.net
by Dr Jay Mon 11 Dec 2017, 19:12
» Asking about some plugin for Forumotion
by Dr Jay Mon 11 Dec 2017, 19:10
» [GAME] What are you thinking right now?
by Van-Helsing Sat 09 Dec 2017, 14:51
» Widget : Similar topics
by ranbac Wed 06 Dec 2017, 18:11
» Change the Background of the Forum and put an image and how to make prefixs?
by Clement Wed 06 Dec 2017, 15:19
» Hello from Western Australia
by SarkZKalie Wed 06 Dec 2017, 05:34
by Ange Tuteur Tue 03 Sep 2019, 11:49
» GIFActif - Giphy Button for the Editor
by Ange Tuteur Wed 08 May 2019, 17:21
» Forum Closure
by Ange Tuteur Mon 01 Jan 2018, 01:28
» Chit Chat Thread
by Valoish Sun 31 Dec 2017, 19:15
» Font/Text background color.
by Valoish Sun 31 Dec 2017, 19:11
» Forumactif Messenger - Instant Message Application for Forumotion
by Wolfuryo Sun 31 Dec 2017, 18:24
» [GAME] Count to One Million!
by brandon_g Fri 29 Dec 2017, 18:58
» Post Cards
by manikbiradar Wed 20 Dec 2017, 07:50
» [GAME] Countdown from 200,000
by Valoish Wed 13 Dec 2017, 23:22
» GeekPolice Tech Support Forums - GeekPolice.net
by Dr Jay Mon 11 Dec 2017, 19:12
» Asking about some plugin for Forumotion
by Dr Jay Mon 11 Dec 2017, 19:10
» [GAME] What are you thinking right now?
by Van-Helsing Sat 09 Dec 2017, 14:51
» Widget : Similar topics
by ranbac Wed 06 Dec 2017, 18:11
» Change the Background of the Forum and put an image and how to make prefixs?
by Clement Wed 06 Dec 2017, 15:19
» Hello from Western Australia
by SarkZKalie Wed 06 Dec 2017, 05:34
Recent Tutorials
Top posting users this month
Top Achievers
Who is online?
In total there is 1 user online :: 0 Registered, 0 Hidden and 1 Guest :: 2 Bots
None
Most users ever online was 515 on Tue 14 Sep 2021, 15:24
None
Most users ever online was 515 on Tue 14 Sep 2021, 15:24
Widget : Similar topics
Page 1 of 1 • Share
This widget will display topics that contain similar keywords based on the topic you're currently viewing.

This widget should work on any forum version.
To install this widget go to Modules > Forum widgets management and create a new widget with the following settings.
Widget name : Similar topics
Use a table type : Yes
Widget title : Similar topics
Widget source :
Example
When everything is setup correctly make sure to click "save" and drag the completed widget into the column you want it to show. After that the widget will show up while you're viewing a topic if there are any topics similar to it.
1. The widget will only show up while viewing topics and if there are any topics similar to it, otherwise it will remain hidden.
2. The topics are found by performing a search of the topic title keywords, and show the most recently updated topics.
3. By default 5 ( or less than 5 ) similar topics are displayed. You can change this by finding
and changing the "5" to any number you want.
If there are any problems or questions feel free to leave a response below. Enjoy !

Click to view demo |
This widget should work on any forum version.
Installation
To install this widget go to Modules > Forum widgets management and create a new widget with the following settings.
Widget name : Similar topics
Use a table type : Yes
Widget title : Similar topics
Widget source :
- 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>

When everything is setup correctly make sure to click "save" and drag the completed widget into the column you want it to show. After that the widget will show up while you're viewing a topic if there are any topics similar to it.
Notes
1. The widget will only show up while viewing topics and if there are any topics similar to it, otherwise it will remain hidden.
2. The topics are found by performing a search of the topic title keywords, and show the most recently updated topics.
3. By default 5 ( or less than 5 ) similar topics are displayed. You can change this by finding
|
If there are any problems or questions feel free to leave a response below. Enjoy !

Notice |
Tutorial written by Ange Tuteur. Reproduction not permitted without consent from the author. |
Last edited by Ange Tuteur on Wed 20 Apr 2016, 12:33; edited 4 times in total
- mist3r0us_b0y
- Gender :
Posts : 68
Points : 3851
Reputation : 16
Language : English
Browser :Forum Version :
this is what we need thanks for sharing @Ange Tuteur
- ddr3New Member
- Gender :
Posts : 4
Points : 3314
Reputation : 1
Language : English
Browser :Forum Version :
In template (html) not working.
They can be added and the image of the subject?
They can be added and the image of the subject?
Which template are you adding it to ?ddr3 wrote:In template (html) not working.
I'm sorry, I did not comprehend. Could you try to explain this better ?ddr3 wrote:They can be added and the image of the subject?
- ddr3New Member
- Gender :
Posts : 4
Points : 3314
Reputation : 1
Language : English
Browser :Forum Version :
I'm sorry, I did not comprehend. Could you try to explain this better ?
example:

Which template are you adding it to ?
viewcomments_body instead widget
example:

Which template are you adding it to ?
viewcomments_body instead widget
I see what you mean. It's possible, however it'll require an unnecessary amount of AJAX to get the images for each topic. As for the template, I'm not sure why it isn't working. I'll have to look into it.

- ddr3New Member
- Gender :
Posts : 4
Points : 3314
Reputation : 1
Language : English
Browser :Forum Version :
Check to see what you can do.
Thank you.
Thank you.
I didn't think about that !SLGray wrote:I notice that the topic you are viewing is included in the similar topics widget. Is there a way to stop that?
Try replacing your widget with this updated one to see if it fixes that problem :
- 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:lt(' + amount + ')', d);
node.innerHTML = '';
if (topics[0]) {
for (var i = 0, j = topics.length; i < j; i++) {
if (!new RegExp(window.location.href.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).test(topics[i].href)) {
topics[i].href = topics[i].href.replace(/\?.*/, '');
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>
I found the problem ; I checked the URL before it was modified. I think I fixed it now, give this a try :SLGray wrote:The topic is still appearing in the widget.
- 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>
- ranbacNew Member
- Gender :
Posts : 1
Points : 2194
Reputation : 0
Language : Vietnamese
Browser :Forum Version :
My forum is: http://www.ranbac.xyz.
I want to show "Similar topics" under topic, above "Quick reply".
And font size 10 px , very small, i want increase to 14 px
I need code paste to viewtopic_body template
I want to show "Similar topics" under topic, above "Quick reply".
And font size 10 px , very small, i want increase to 14 px
I need code paste to viewtopic_body template
- Sponsored content
Similar topics
Create an account or log in to leave a reply
You need to be a member in order to leave a reply.
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|