Recent Tutorials
Who is online?
In total there are 6 users online :: 2 Registered, 0 Hidden and 4 Guests

djblah, SLGray

[ View the whole list ]


Most users ever online was 172 on Fri 19 Feb 2016, 05:17

Display similar topics on creation of a new topic

View previous topic View next topic Go down

avatar
Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 21
Posts : 4675
Points : 9689
Reputation : 2331
Location : Macungie, PA
Language : EN10, FR5
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile https://github.com/SethClydesdale https://twitter.com/sethc1995

PostAnge Tuteur on Thu 20 Nov 2014, 19:46

Hello dear members,

This small script is to display topics with similar keywords while creating a new topic.

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
avatar
Van-Helsing

Title :
Coding Expert.
I.T Manager.
Web Developer.
Gender : Male
Age : 42
Posts : 830
Points : 2362
Reputation : 78
Location : Somewhere out there!
Language : English, Greek
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : punBB
Awards :
View all awards
View user profile http://itexperts.forumgreek.com/

PostVan-Helsing on Fri 21 Nov 2014, 21:08

Hello Ange,
I was test it in my forum and it seems working perfect.

--------

avatar
Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 21
Posts : 4675
Points : 9689
Reputation : 2331
Location : Macungie, PA
Language : EN10, FR5
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile https://github.com/SethClydesdale https://twitter.com/sethc1995

PostAnge Tuteur on Sat 22 Nov 2014, 02:12

Super, thanks ! Very Happy
avatar
Van-Helsing

Title :
Coding Expert.
I.T Manager.
Web Developer.
Gender : Male
Age : 42
Posts : 830
Points : 2362
Reputation : 78
Location : Somewhere out there!
Language : English, Greek
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : punBB
Awards :
View all awards
View user profile http://itexperts.forumgreek.com/

PostVan-Helsing on 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?

--------

avatar
Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 21
Posts : 4675
Points : 9689
Reputation : 2331
Location : Macungie, PA
Language : EN10, FR5
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile https://github.com/SethClydesdale https://twitter.com/sethc1995

PostAnge Tuteur on Sun 23 Nov 2014, 21:18

I will try to see if I can figure something out.
avatar
Michael_vx

Title :
Gender : Male
Age : 25
Posts : 301
Points : 1654
Reputation : 75
Language : Arabic
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other
Awards :
View all awards
View user profile http://miccsoft.net https://www.facebook.com/Michaelvx2008

PostMichael_vx on 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
avatar
Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 21
Posts : 4675
Points : 9689
Reputation : 2331
Location : Macungie, PA
Language : EN10, FR5
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile https://github.com/SethClydesdale https://twitter.com/sethc1995

PostAnge Tuteur on 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 ?
avatar
J0k3R^
Member
Title :
Gender : Unspecified
Posts : 17
Points : 1207
Reputation : 6
Location : Greece
Language : Greek, English, Chienese,
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other
Awards :
View all awards
View user profile http://fmplanet.forumgreek.com

PostJ0k3R^ on Sat 06 Dec 2014, 02:33

nice one, thanks
avatar
Niko!

Title :
Cookies-eater
Gender : Male
Age : 20
Posts : 97
Points : 1582
Reputation : 51
Location : Milan, Italy
Language : Italian, English, French,
Browser : Browser : Google Chrome Forum Version : Forum Version : punBB
Awards :
View all awards
View user profile https://www.translationscloud.com https://www.facebook.com/TranslationsCloud https://twitter.com/TranslaCloud https://pinterest.com/translacloud

PostNiko! on Mon 06 Apr 2015, 17:30

wow Very Happy Very Happy

you should suggest this for forumotion's forums Wink

--------

avatar
Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 21
Posts : 4675
Points : 9689
Reputation : 2331
Location : Macungie, PA
Language : EN10, FR5
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile https://github.com/SethClydesdale https://twitter.com/sethc1995

PostAnge Tuteur on 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
avatar
brandon_g

Title :
Gender : Unspecified
Age : 19
Posts : 447
Points : 1602
Reputation : 63
Location : USA
Language : English
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB2
Awards :
View all awards
View user profile http://broadcastingduo.forumotion.com

Postbrandon_g on 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.
avatar
fascicularia
New Member
Title :
Gender : Unspecified
Posts : 8
Points : 901
Reputation : 3
Language : french and english
Browser : Browser : Opera Forum Version : Forum Version : Other
Awards :
View all awards
View user profile

Postfascicularia on Wed 22 Apr 2015, 04:49

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

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