Similar Topics in New Topic Creation
2 posters
Page 1 of 1
Similar Topics in New Topic Creation
Similar Topics in New Topic Creation |
This code allows the users to see a list of similar topics while they are writing the title. It is ideal for support forums in which almost all answers are already solved. Here's an example of how it looks like: Everyone can adapt the code according to his/her forum. It can also be possible to adapt the code to any other version, although this would be up to the user, and this adaptation is not supported. By default the code works for phpBB3 InstallationACP(Admin Control Panel) > Modules > HTML & JAVASCRIPT > Javascript codes management > Javascript codes management Position: All pages
Now add this CSS code to your forum
At the beginning of the code there are several lines between brackets in the const settings definition. This is where you will be able to add several configuration lines (the lines that are already in the code are ones by default I have added). Next I will add a bit of a documentation to know what settings can you add. DocumentationHere are all the settings you can add to the script. Please note all the options have the same format:
That means if you wanna add several options, the beginning of the script should look (more or less) like this:
WARNING: To add an option with its default value it's the same as not to add it. The options are the following:
Default value:
searchInThe forum or category where the search will be done. To identify which forum or category will be done, an ID will be used which is added after a "c" for categories or a "f" for forums (between quote marks). For example, to search in the category with id 3, it would be:
There are special values: Value by default:
maxTopicsNumber of topics what will show. The minimum value is 3: Example:
Value by default:
autocompleteDefault value: Turn on or off the autocomplete of the field of the title (the suggestions of the browser). That is, to put the attribute autocomplete of the element input to on or off You can use the value "true" to be on, or "false" to not be. Example:
Default value:
wordMinLengthA minimum number of characters of a word to be taken into account in the search. Please note that because of the Forumotions limitations, it isn't possible to put less than 3. The value is a full number that can be between 4 to the maximum numbers of characters allowed by Forumotion. Example:
Default value:
There also exists options for advanced users. To use them it is neccesary to have JS and HTML knowledge.
|
Originally posted on the Spanish Support Forum and translated by mpelmmc for Forumotion. |
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 in New Topic Creation
The tutorial has been updated, included some new feature below :
Added
1) Add this to your CSS
2) Host yourself a new one and you should let it works on the all page OR put this script in Admin Control Panel -> Display -> Templates -> Post & PMs -> posting_body template, before {SCEDITOR}.
Enjoy
This tutorial was created by Flerex
Special thank to Sr.Smith from the Spanish Support Forum - who helped to convert this great script to PhpBB2 and Invision.
Added
- PhpBB2, PhpBB3, PunBB, Invision and ModernBB as supported versions.
- Latest version 1.1.2 by Flerex
- Search topics in the whole forum
- Max topics increased up to 50, from 5
- Vertical scroll bar
- Note:
- It may not work on Microsoft Edge.
Make sure you didn't modify search_results_topics template too heavily.
1) Add this to your CSS
- Code:
#similarTopics{height:150px;width:600px;background:#E1EBF2;padding:5px 10px;border-radius:2px;margin:5px auto;overflow-x:hidden}
#similarTopics,#similarTopics .spinner,#similarTopics .topic-container,#similarTopics .similarTopics-title{display:none}
#similarTopics.visible,#similarTopics .spinner.visible,#similarTopics .similarTopics-title.visible,#similarTopics .topic-container.visible{display:block}
#similarTopics .topic{display:flex;border-bottom:1px solid #fff;padding:5px 0;margin:5px 0}
#similarTopics .topic:last-child{border-bottom:none}
#similarTopics .topic-data{flex:1}
#similarTopics .topic-flags{align-items:center;margin-right:10px;position:relative}
#similarTopics .topic-icon{position:absolute;top:0;left:0;bottom:0;right:0;background:transparent 50% 50% no-repeat}
#similarTopics .similarTopics-title{border-bottom:1px solid #0076b1;color:#0076b1;font-size:.9em;margin:.5em 0;text-transform:uppercase;display:block}
#similarTopics .topic-status{width:27px;height:27px;background:transparent top center no-repeat}
#similarTopics .topic-title{display: inline-block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;width:500px}
2) Host yourself a new one and you should let it works on the all page OR put this script in Admin Control Panel -> Display -> Templates -> Post & PMs -> posting_body template, before {SCEDITOR}.
- Code:
<!-- Similar topics for Forumotion version PhpBB2 -->
<script src="//rotaxvn.forumotion.com/10670.js" type="text/javascript"></script>
- Code:
<!-- Similar topics for Forumotion version PhpBB3 -->
<script src="//rotaxvn.forumotion.com/11026.js" type="text/javascript"></script>
- Code:
<!-- Similar topics for Forumotion version PunBB -->
<script src="//rotaxvn.forumotion.com/12820.js" type="text/javascript"></script>
- Code:
<!-- Similar topics for Forumotion version Invision -->
<script src="//rotaxvn.forumotion.com/13870.js" type="text/javascript"></script>
- Code:
<!-- Similar topics for Forumotion version ModernBB -->
<script src="//rotaxvn.forumotion.com/14908.js" type="text/javascript"></script>
Enjoy
This tutorial was created by Flerex
Special thank to Sr.Smith from the Spanish Support Forum - who helped to convert this great script to PhpBB2 and Invision.
Similar topics
» Similare topics in new topic creation problem
» Similar topics?
» Similar Topics
» Similar topics
» [HELP] similar topics
» Similar topics?
» Similar Topics
» Similar topics
» [HELP] similar topics
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum