April 18, 2024, 10:47:08 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 310 times)
0 Members and 1 Guest are viewing this topic.
Exilis
Optimistic & Creative
Global Moderator
Global Moderator
Offline Offline

Posts: 929


View Profile
Badges: (View All)
Tenth year Anniversary Linux User Combination
« 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

Share on Facebook Share on Twitter



Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum

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