Order topic alphabetcal

Mods etc.

Moderator: Integra Moderator

Order topic alphabetcal

PostAuthor: dave996 » Thu Feb 08, 2007 1:42 pm

Your phpBB Version: 2.0.22
phpBB Type: Integramod 141
MODs: No
Your knowledge: Basic Knowledge
Board URL: [url]http://[/url]

PHP Version:
MySQL Version:


What was done before the problem appeared?



What was done to try to solve the problem?




De.scription and Message

I have installed integramod 1,41 much beautiful one. But I wanted to order to some forumin alphabetical way or for decreasing time. how to make?
Last edited by dave996 on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.

dave996
Newbie
Newbie
 
Posts: 5
Likes: 0 post
Liked in: 0 post
Joined: Tue Jul 18, 2006 2:43 pm
Cash on hand: 0.00

Re: Order topic alphabetcal

PostAuthor: dave996 » Fri Mar 02, 2007 8:39 am

Code: Select all
/////////////////////////////////////////////    Topic Sorting (version 1.0.3)      ////---------------------------------------//// This mod allows admins to set the     //// way topics are sorted for display in  //// each forum.                           ////---------------------------------------//// Written for and tested on phpBB 2.0.3 ////---------------------------------------////   By jordo  - [url=http://www.jordodesigns.com]http://www.jordodesigns.com[/url]    ////---------------------------------------//// Modifies: SQL phpbb_forums table      //// viewforum.php, admin_forums.php,      //// forum_edit_body.tpl, lang_admin.php   /////////////////////////////////////////////      // SQL Changes:    ALTER TABLE `database_name_here`.`phpbb_forums` ADD `forum_sort` TEXT NOT NULL    /////////////////////// in viewforum.php      // replace:  $sql = "SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_username, p2.post_username AS post_username2, p2.post_time     FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2     WHERE t.forum_id = $forum_id         AND t.topic_poster = u.user_id         AND p.post_id = t.topic_first_post_id         AND p2.post_id = t.topic_last_post_id         AND u2.user_id = p2.poster_id         AND t.topic_type </option> $prune_enabled,  // add:                   'S_SORT_ORDER' => $sort_order,  // after:                   'L_DAYS' => $lang['Days'],  // add:                   'L_SORT' => $lang['Sort'],    // replace:               $sql = "INSERT INTO " . FORUMS_TABLE . " (forum_id, forum_name, cat_id, forum_desc, forum_order, forum_status, prune_enable" . $field_sql . ")                 VALUES ('" . $next_id . "', '" . str_replace("'", "''", $HTTP_POST_VARS['forumname']) . "', " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", '" . str_replace("'", "''", $HTTP_POST_VARS['forumdesc']) . "', $next_order, " . intval($HTTP_POST_VARS['forumstatus']) . ", " . intval($HTTP_POST_VARS['prune_enable']) . $value_sql . ")";  // with:               $sql = "INSERT INTO " . FORUMS_TABLE . " (forum_id, forum_name, cat_id, forum_desc, forum_order, forum_status, forum_sort, prune_enable" . $field_sql . ")                 VALUES ('" . $next_id . "', '" . str_replace("'", "''", $HTTP_POST_VARS['forumname']) . "', " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", '" . str_replace("'", "''", $HTTP_POST_VARS['forumdesc']) . "', $next_order, " . intval($HTTP_POST_VARS['forumstatus']) . ",  '" . str_replace("'", "''", $HTTP_POST_VARS['forumsort']) . "', " . intval($HTTP_POST_VARS['prune_enable']) . $value_sql . ")";  // replace:                   SET forum_name = '" . str_replace("'", "''", $HTTP_POST_VARS['forumname']) . "', cat_id = " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", forum_desc = '" . str_replace("'", "''", $HTTP_POST_VARS['forumdesc']) . "', forum_status = " . intval($HTTP_POST_VARS['forumstatus']) . ", prune_enable = " . intval($HTTP_POST_VARS['prune_enable']) . "  // with:                 SET forum_name = '" . str_replace("'", "''", $HTTP_POST_VARS['forumname']) . "', cat_id = " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", forum_desc = '" . str_replace("'", "''", $HTTP_POST_VARS['forumdesc']) . "', forum_status = " . intval($HTTP_POST_VARS['forumstatus']) . ", forum_sort = '" . str_replace("'", "''", $HTTP_POST_VARS['forumsort']) . "', prune_enable = " . intval($HTTP_POST_VARS['prune_enable']) . "    /////////////////////// in forum_edit_body.tpl  // after:       <tr>       <td>{L_FORUM_STATUS}</td>       <td><select>{S_STATUS_LIST}</select></td>     </tr>    // add:       <tr>       <td>{L_SORT}</td>       <td><select>{S_SORT_ORDER}</select></td>     </tr>    /////////////////////// in lang_admin.php  // after:  $lang['Status_unlocked'] = 'Unlocked';  // add:  $lang['Sort_alpha'] = 'Alphabetically';$lang['Sort_fpdate'] = 'Chronologically';$lang['Sort'] = 'Topic Display Sort Method';          ////////////////////////  // Now you are done!        


it can be applied to integramod 1,41 this mod?
Last edited by dave996 on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.

dave996
Newbie
Newbie
 
Posts: 5
Likes: 0 post
Liked in: 0 post
Joined: Tue Jul 18, 2006 2:43 pm
Cash on hand: 0.00

PostAuthor: krillmeed » Sat Mar 03, 2007 2:37 am

These changes are a bit too different from the files in Intergamod. I had a go at it, but could not find half the quotes. I suspect it would not take much to change so it will work with integramod, but it is beyond my abilities. I hope that one of the experts here can take a stab at it, i for one one find it a godsend on my Memory Alpha forum, makes entries easier to find. Any help or advice welcome <img>
Last edited by krillmeed on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.

krillmeed
Sr Integra Member
Sr Integra Member
 
Posts: 301
Likes: 0 post
Liked in: 0 post
Joined: Sat May 27, 2006 12:34 am
Cash on hand: 0.00


Return to IntegraMOD Modifications

Who is online

Registered users: Bing [Bot], Google [Bot], Helter, Majestic-12 [Bot]