FM Design
Would you like to react to this message? Create an account in a few clicks or log in to continue.

IMPORTANT

FM Design is in read-only mode, please click here for more information.

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

Recent Tutorials
Top posting users this month

Who is online?
In total there are 43 users online :: 0 Registered, 0 Hidden and 43 Guests :: 2 Bots

None

[ View the whole list ]


Most users ever online was 515 on Tue 14 Sep 2021, 15:24

Display similar topics on creation of a new topic

View previous topic View next topic Go down

Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12252
Reputation : 2376
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur Thu 20 Nov 2014, 19:46

Hello dear members,

This small script is to display topics with similar keywords while creating a new topic.
Display similar topics on creation of a new topic  Captur71

To test, go to Administration Panel > Modules > JavaScript codes management > Create a new script

Title : Your choice
Placement : In all the pages
Paste the code below and submit :
Code:
/\?f=\d+&mode=newtopic/.test(window.location.search) && $(function() {
  var s = document.getElementsByTagName('INPUT'),i;
  for (i=0; i<s.length; i++) {
    if (/subject/.test(s[i].name)) {
      var d = document.createElement('DIV');
      d.innerHTML = '<div class="h3">Similar Topics</div><div id="topicSimilar">No similar topics..</div>';
      s[i].parentNode.appendChild(d);
      s[i].onkeyup = function() {
        if (this.value.length > 3) $('#topicSimilar').load('/search?search_keywords='+encodeURIComponent(this.value)+' a.topictitle', function() {
          $(this).find('a').attr({'target' : '_blank', 'style' : 'display:block'});
        });
        else $('#topicSimilar').html('No similar topics..');
      }
    }
  }
});

This will only work if your topic title is longer than three characters. It should work on all forum versions.

If you have any problems or comments, you may leave them below. Smile
Van-Helsing
Van-Helsing

Gender : Male
Age : 50
Posts : 853
Points : 5041
Reputation : 84
Location : Somewhere out there!
Language : English, Greek
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : punBB
http://itexperts.forumgreek.com/

PostVan-Helsing Fri 21 Nov 2014, 21:08

Hello Ange,
I was test it in my forum and it seems working perfect.
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12252
Reputation : 2376
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur Sat 22 Nov 2014, 02:12

Super, thanks ! Very Happy
Van-Helsing
Van-Helsing

Gender : Male
Age : 50
Posts : 853
Points : 5041
Reputation : 84
Location : Somewhere out there!
Language : English, Greek
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : punBB
http://itexperts.forumgreek.com/

PostVan-Helsing Sun 23 Nov 2014, 18:40

Hello Ange,
Its seems sometimes dont working correctly with the prefixes and lightbox javascripts. Something conflicts those javascripts. Can you check it please?
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12252
Reputation : 2376
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur Sun 23 Nov 2014, 21:18

I will try to see if I can figure something out.
Michael_vx
Michael_vx

Gender : Male
Age : 32
Posts : 302
Points : 4304
Reputation : 76
Language : Arabic
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other
http://miccsoft.net https://www.facebook.com/Michaelvx2008

PostMichael_vx Sat 29 Nov 2014, 13:25

confused confused confused confused confused confused confused confused 
seems not working on my testing forum to test codes
i wonder if there something missing
confused confused confused confused confused confused confused
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12252
Reputation : 2376
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur Tue 02 Dec 2014, 04:09

Michael_vx wrote:confused confused confused confused confused confused confused confused 
seems not working on my testing forum to test codes
i wonder if there something missing
confused confused confused confused confused confused confused
What charcters are you using ?
J0k3R^
J0k3R^
Member
Gender : Unspecified
Posts : 17
Points : 3855
Reputation : 6
Location : Greece
Language : Greek, English, Chienese,
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other
http://fmplanet.forumgreek.com

PostJ0k3R^ Sat 06 Dec 2014, 02:33

nice one, thanks
Niko!
Niko!

Gender : Male
Age : 28
Posts : 98
Points : 4233
Reputation : 51
Location : Milan, Italy
Language : Italian, English, French,
Browser : Browser : Google Chrome Forum Version : Forum Version : punBB
https://www.openstudio.one https://www.facebook.com/TranslationsCloud https://twitter.com/TranslaCloud https://pinterest.com/translacloud

PostNiko! Mon 06 Apr 2015, 17:30

wow Very Happy Very Happy

you should suggest this for forumotion's forums Wink
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12252
Reputation : 2376
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur Tue 07 Apr 2015, 17:07

I doubt it would take, but it's a neat idea. You can do the same with search and show results as you type. Razz

I think someone did that before with the search though. reflect
brandon_g
brandon_g

Gender : Unspecified
Age : 27
Posts : 458
Points : 4285
Reputation : 67
Location : USA
Language : English
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB2
http://broadcastingduo.forumotion.com

Postbrandon_g Tue 07 Apr 2015, 22:34

Ange Tuteur wrote:I doubt it would take, but it's a neat idea. You can do the same with search and show results as you type. Razz

I think someone did that before with the search though. reflect

Next to nothing takes anymore... I took a look at the french support forum (through google translate) and was sad to discover that while the suggestions there seemed to be more often times accepted, there are very little ones! No wonder nothing ever gets implemented... the french users don't suggest enough Razz.
fascicularia
fascicularia
New Member
Gender : Unspecified
Posts : 9
Points : 3551
Reputation : 4
Language : french and english
Browser : Browser : Opera Forum Version : Forum Version : Other

Postfascicularia Wed 22 Apr 2015, 04:49

Hi Ange tuteur, the script work very well in PHpbb2 Thumb right
Sponsored content

PostSponsored content

View previous topic View next topic Back to top

Create an account or log in to leave a reply

You need to be a member in order to leave a reply.

Create an account

Join our community by creating a new account. It's easy!


Create a new account

Log in

Already have an account? No problem, log in here.


Log in

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