Warning: The author of this contribution does not provide support for it anymore.

Precise Similar Topics II

[ADDON] Hide Similar Topics - Precise Similar Topics II

[ADDON] Hide Similar Topics

by FoulFoot » Fri Mar 09, 2012 3:06 am

Users complaining about Similar Topics cluttering up the bottom of the thread? Hide it from them until they click the link. See screenshot below.

Open templates/similar_topics.html

At the top of the file, add:

Code: Select all

<script language="javascript"> 
function toggle() {
   var ele = document.getElementById("toggleText");
   var text = document.getElementById("displayText");
   if(ele.style.display == "block") {
          ele.style.display = "none";
      text.innerHTML = "Similar Topics";
     }
   else {
      ele.style.display = "block";
      text.innerHTML = "hide";
   }
}
</script>
 
<span style="padding-bottom: 2px;"><a id="displayText" href="javascript:toggle();">Similar Topics</a> <== click here</span>

<div id="toggleText" style="display: none">

At the bottom of the file, between </table> and <br clear="all">, add:

Code: Select all

</div>

That's it!

Foul
Attachments
after.jpg
before.jpg
FoulFoot
Registered User
Posts: 262
Joined: Mon Jun 23, 2003 1:04 am
Location: Honolulu, HI
Contact:

Re: [ADDON] Hide Similar Topics

by MattF » Sat Mar 10, 2012 12:31 am

Thanks for that... Kind of inspired me to take it a step further and create this version of the idea, as an add-on to this MOD, using the collapsible categories authored by Christan 2.0. This version is for Prosilver (and Prosilver based styles only, the above post is for subsilver2 styles)).

Expanded screenshot:
Screenshot-Expanded.jpg


Collapsed screenshot:
Screenshot-Collapsed.jpg


Instructions: Now included with the latest release of this MOD.
Formerly known as VSEMy ExtensionsPlease do not PM me for support.
User avatar
MattF
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 5859
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman
Contact:

Re: [ADDON] Hide Similar Topics

by zjhxmjl » Wed Aug 01, 2012 7:49 am

VSE wrote:Thanks for that... Kind of inspired me to take it a step further and create this version of the idea, as an add-on to this MOD, using the collapsible categories authored by Christan 2.0. This version is for Prosilver (and Prosilver based styles only, the above post is for subsilver2 styles)).

Expanded screenshot:
Screenshot-Expanded.jpg


Collapsed screenshot:
Screenshot-Collapsed.jpg


Instructions:
add_on_collapsible_similar_topics.zip

Hello,can you tell me how to install it?thanks.
User avatar
zjhxmjl
Registered User
Posts: 77
Joined: Wed Jul 20, 2011 10:20 pm
Contact:

Re: [ADDON] Hide Similar Topics

by Oyabun1 » Wed Aug 01, 2012 9:19 am

The same as for any MOD, you follow the instructions in the collapsible_similar_topics.xml or use AutoMOD.

However, because there are extraneous Mac files in the zip package, if using AutoMOD you may be better to unzip it, and just upload the whole of the add_on_collapsible_similar_topics folder to your board's store/mods/ folder (the unnecessary .DS_Store files shouldn't cause any problems).
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests
User avatar
Oyabun1
Former Team Member
Posts: 23162
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill
Contact:

Re: [ADDON] Hide Similar Topics

by MattF » Wed Aug 01, 2012 4:06 pm

Or just download the current version of this MOD which has this add on and its instructions included.
Formerly known as VSEMy ExtensionsPlease do not PM me for support.
User avatar
MattF
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 5859
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman
Contact:

Re: [ADDON] Hide Similar Topics

by zjhxmjl » Thu Aug 02, 2012 12:38 am

Oyabun1 wrote:The same as for any MOD, you follow the instructions in the collapsible_similar_topics.xml or use AutoMOD.

However, because there are extraneous Mac files in the zip package, if using AutoMOD you may be better to unzip it, and just upload the whole of the add_on_collapsible_similar_topics folder to your board's store/mods/ folder (the unnecessary .DS_Store files shouldn't cause any problems).

Thank you very much,i had succeed! :mrgreen:
User avatar
zjhxmjl
Registered User
Posts: 77
Joined: Wed Jul 20, 2011 10:20 pm
Contact:

Re: [ADDON] Hide Similar Topics

by zjhxmjl » Thu Aug 02, 2012 12:38 am

VSE wrote:Or just download the current version of this MOD which has this add on and its instructions included.

Thanks too! :D
User avatar
zjhxmjl
Registered User
Posts: 77
Joined: Wed Jul 20, 2011 10:20 pm
Contact:

Re: [ADDON] Hide Similar Topics

by dodusman » Wed Oct 10, 2012 10:54 am

Hi
Thank's for your add on
But, only show is jquery (smooth). Hide doesn't work weel, It hide very fast (no jquery smooth)
What can I do ?
Sorry for my english
dodusman
Registered User
Posts: 8
Joined: Wed Feb 02, 2011 6:03 am
Contact:

Re: [ADDON] Hide Similar Topics

by Kinsman » Thu Jun 26, 2014 11:14 am

Oddly enough I cannot get collapse to work on Prosilver. I say odd because it works just fine on both SE Gamer and SE Gamer Dark.

I am even using all the same files for all three themes, the only difference is for Prosilver the css was added to common.css as per the instructions. For the SE Themes it already existed in their css, so I did not add it.

I see the button, just nothing happens when its clicked. I'm wondering if the footer needs to be a different path or something for Prosilver???

<!-- IF SCRIPT_NAME eq 'viewtopic' -->
<script type="text/javascript">
window.jQuery || document.write(unescape('%3Cscript src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"%3E%3C/script%3E'));
</script>
<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/jquery.cookie.js"></script>
<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/jquery.collapse.js"></script>
<script type="text/javascript">
// <![CDATA[
$("#similartopiclist").collapse({show: function(){
this.animate({
opacity: 'toggle',
height: 'toggle'
}, 300);
},
hide : function() {
this.animate({
opacity: 'toggle',
height: 'toggle'
}, 300);
}
});
// ]]>
</script>
<!-- ENDIF -->
Kinsman
Registered User
Posts: 216
Joined: Sun Jan 02, 2005 6:04 am
Contact:

Re: [ADDON] Hide Similar Topics

by PiperB » Wed Mar 08, 2017 8:57 pm

Excellent Subsilver2 Addon FoulFoot!

I hope no one minds that I modified this, lol. :D

In the FoulFoot Addon edit for templates/similar_topics.html ...in the part that is pasted in the top of the page..

Find:

Code: Select all

<span style="padding-bottom: 2px;"><a id="displayText" href="javascript:toggle();">Similar Topics</a> <== click here</span>
Replace with:

Code: Select all

<span style="padding-bottom: 2px;"><a id="displayText" href="javascript:toggle();"><center><input type="text" style="width: 12%; border-radius: 5px;" value="Click to View Similar Topics" style="width: inherit;" readonly="readonly"></center></a></span>
This will work on Subsilver2 and should work on all Subsilver2 based styles. I did this on X-Treme Purple which is based on Subsilver2. The colors will change according to your theme.

Note: Click on the below images to view full version of each image. Suggest to open in a new tab if possible.

This is how it looks on the X-Treme Purple upon viewing a topic. (showing more prominently to let users know it's there with clear instructions on what it's for. In a read only input box which works, looks, and functions like a show button, Right in the center.)
1.png
This is how it looks after clicking on it.
2.png
Then it returns unobtrusively over to the left once the user has chosen to hide it.
3.png
<!-- IF U_LOVE_NOTEPAD++ -->
[td class=statement]I Notepad++ ![/td]
<!-- ENDNEVER --> <!-- tee hee --> :P
Whoa ooo whoa ooo whoa I'm a Lady!
User avatar
PiperB
Registered User
Posts: 173
Joined: Mon Nov 07, 2016 6:54 pm
Contact: