December 16, 2018, 02:35:38 pm
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to Revolution X, where Coding meets Graphics.
 
  Home Help Search Arcade Affiliates Staff List Calendar Members Login Register  

Automatically sort topics by name V2

Pages: [1]   Go Down
  Print  
Author Topic: Automatically sort topics by name V2  (Read 204 times)
Exilis
Optimistic & Creative
Global Moderator
Global Moderator
Offline Offline

Posts: 929


View Profile
Badges: (View All)
« on: June 13, 2009, 01:08:04 pm »

I only came out with V1 earlier today, but I decided to upgrade it. This is a big enough upgrade to have its own new post, imo.

This sorts topics in a board by name, and allows multiple boards. If you only want 1 board, it is recommended that you use V1, because V1 is faster.
Code:
<script>
var boards_s = new Array();
boards_s[boards_s.length] = "1";

for(var countervar in boards_s){

if(location.href.match("board," + boards_s[countervar] + ".0.html")) {
location.href=smf_scripturl + "/board," + boards_s[countervar] + ".0/sort,subject.html";
}

}
</script>

Change the "1" in boards_s[boards_s.length] = "1"; to the board number. You can find the board number by looking at the URL for the board and looking for "board,n.0" where n is the board number.

To make it work for multiple boards, add more of this line:
boards_s[boards_s.length] = "1";

Questions? Ask me.
Report Spam   Logged

Global Mod, (sort of) at your service.

http://twitter.com/timothyaveni



Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum | Buy traffic for your forum/website

Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy