################################################################### Mod Title]http://www.talun.de[/url] for Updates## Description: Add Titel categories to you Forums. You can see it in the viewforums.php## and viewtopic.php. You can edit it for each post. ## For each forum you can select you own categories with a CP in the Mod CP ## The Optional Filterinstall for the Forumoverview is found after the primary Install## Installation Level: Medium## Installation Time: 30 Minutes / Addon 15 Minutes## Files To Edit: ## ## language/lang_english/lang_main.php## includes/constants.php## includes/functions_post.php## includes/functions_topic_list.php## modcp.php## posting.php## viewforum.php## viewtopic.php#### modcp.tpl## posting_body.tpl## topics_list_box.tpl## viewtopic_body.tpl## viewforum_body.tpl###### DEMO [url=http://www.talun.de]http://www.talun.de[/url] ->Kontakt->Board ## ## ## APPEAL: If you have a Forum with this mod you can send me a Mail with your Forum URL for a## List of Forums who use it. I ´m pleased about####################################################################### Security Disclaimer: This MOD Cannot Be Posted To Or Added At Any Non-Official phpBB Sites######################################################################################################################################## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD#################################################################### Revision History:## v1.1.1(2006/04/18)## Run under PHPBB 2.0.20 ## Add Filter Addon for the viewforum## v1.1.0(2005/11/27)## Bugfix in the Viewtopic.php## Revision History:## v1.0.9(2005/11/14)## Added post Subject in viewtopic## Added Searchresults## Revision History:## v1.0.8(2005/11/10)## Run under PHPBB 2.0.18## v1.0.7(2005/10/22)## Run under PHPBB 2.0.17##NEW: If on delete from a Prefix/cat all Topics with this Prefix will reset to "without a Prefix"##Bugfix: Topic-Preview has loose the Prefix so that you must choose it again. Now it not loose it.## v1.0.6(2005/03/09)## Topic-Preview loose the Prefix so that you must choose it again## Run under PHPBB 2.0.13## v1.0.5 (2003/07/31)## Run under Phpbb 2.0.5 small bug fixes (Preview, Change the Categorie to Null in Polls etc.)## v1.0.3 (2003/03/07)## Add Categories in List of Modcp (thanks to dookie for the idea)## Works under phpbb Version 2.0.4## v1.0.2 (2002/05/10) ## Some Bugfixes like ## - If No Categorie you cant Post## - You can choose no Kategories## v1.0.0## - First Release and Final.################################################################### --------Add Table in your Mysql DB---------- CREATE TABLE `phpbb_topic_cat` (`k_id` INT(11) AUTO_INCREMENT PRIMARY KEY, `forum_id` INT(11), `kategorie` TEXT); ALTER TABLE `phpbb_topics` ADD `k_id` INT(10) DEFAULT '0'; (Change the name if you want. Then you must change the entries in the constans.php) --------------------------- ##########################################################################################open your lang_main.php (Change it for every Language you have. German and Englisch included) ###----Find---- //// That's all Folks! ##---Add before German---- //KATEGORIEN$lang['akt_kat']="Kategorie(n) erfolgreich Aktualisiert.";$lang['new_kat']="Neue Kategorie hinzufügen:";$lang['kat']="Kategorien Controlpanel"; ##---Add before English---- //KATEGORIEN$lang['akt_kat']="Categorie(s) Updated";$lang['new_kat']="Add New Categorie:";$lang['kat']="Categories Controlpanel"; ##------------------------------------------Save and Close lang_main.php########################################################################################## Open includes/constants.php ##----Find----define('VOTE_DESC_TABLE', $table_prefix.'vote_desc');define('VOTE_RESULTS_TABLE', $table_prefix.'vote_results');define('VOTE_USERS_TABLE', $table_prefix.'vote_voters');##-----After Add----- //kategoriendefine('TOPIC_KAT', $table_prefix.'topic_cat');//kategorien ##--------------------------- Save and close the constans.php########################################################################################## open includes/function_post.php ##------Find----function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id, &$topic_type, &$bbcode_on, &$html_on, &$smilies_on, &$attach_sig, &$bbcode_uid, $post_username, $post_subject, $post_message, $poll_title, &$poll_options, &$poll_length ##------inline, Find----$post_icon = 0, $topic_calendar_repeat ##------inline, After, Add----, &$k_id##----------------------------- ##----FIND in function submit_post------ $sql = ($mode != "editpost") ? "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_desc, topic_poster, topic_time, forum_id, news_id, topic_status, topic_type, topic_icon, topic_calendar_time, topic_calendar_duration, topic_announce_duration, topic_calendar_repeat, topic_vote) VALUES ('$post_subject', '$topic_desc', " . $userdata['user_id'] . ", $forcetime, $forum_id, $news_id, " . TOPIC_UNLOCKED . ", $topic_type, $post_icon, $topic_calendar_time, $topic_calendar_duration, " . intval($topic_announce_duration) . ", '$topic_calendar_repeat', $topic_vote)" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_desc = '$topic_desc', news_id = $news_id, topic_type = $topic_type, topic_icon=$post_icon, topic_calendar_time = $topic_calendar_time, topic_calendar_duration = $topic_calendar_duration, topic_announce_duration = " . intval($topic_announce_duration) . "$extra, topic_calendar_repeat = '$topic_calendar_repeat' " . (($post_data['edit_vote'] || !empty($poll_title)) ? ", topic_vote = " . $topic_vote : "") . " WHERE topic_id = $topic_id";##----Replace with---- $sql = ($mode != "editpost") ? "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_desc, topic_poster, topic_time, forum_id, news_id, topic_status, topic_type, topic_icon, topic_calendar_time, topic_calendar_duration, topic_announce_duration, topic_calendar_repeat, topic_vote) VALUES ('$post_subject', '$topic_desc', " . $userdata['user_id'] . ", $forcetime, $forum_id, $news_id, " . TOPIC_UNLOCKED . ", $topic_type, $post_icon, $topic_calendar_time, $topic_calendar_duration, " . intval($topic_announce_duration) . ", '$topic_calendar_repeat', $topic_vote)" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_desc = '$topic_desc', news_id = $news_id, topic_type = $topic_type, topic_icon=$post_icon, topic_calendar_time = $topic_calendar_time, topic_calendar_duration = $topic_calendar_duration, topic_announce_duration = " . intval($topic_announce_duration) . "$extra, topic_calendar_repeat = '$topic_calendar_repeat' " . (($post_data['edit_vote'] || !empty($poll_title)) ? ", topic_vote = " . $topic_vote : "") . ", k_id = $k_id WHERE topic_id = $topic_id"; ##-------------------- Save an close the function_post.php##########################################################################################open /search.php ##------Find---- if ( $show_results == 'posts' ) { $sql = "SELECT pt.post_text, pt.bbcode_uid, pt.post_subject, p.*, f.forum_id, f.forum_name, t.*, u.username, u.user_id, u.user_sig, u.user_sig_bbcode_uid FROM " . FORUMS_TABLE . " f, " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TEXT_TABLE . " pt WHERE p.post_id IN ($search_results) AND pt.post_id = p.post_id AND f.forum_id = p.forum_id AND p.topic_id = t.topic_id AND p.poster_id = u.user_id"; } else { $sql = "SELECT t.*, f.forum_id, f.forum_name, 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, " . FORUMS_TABLE . " f, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2 WHERE t.topic_id IN ($search_results) AND t.topic_poster = u.user_id AND f.forum_id = t.forum_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"; } ##----Replace With----- //Kategorien if ( $show_results == 'posts' ) { $sql = "SELECT pt.post_text,k.kategorie, pt.bbcode_uid, pt.post_subject, p.*, f.forum_id, f.forum_name, t.*, u.username, u.user_id, u.user_sig, u.user_sig_bbcode_uid FROM " . FORUMS_TABLE . " f, " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TEXT_TABLE . " pt LEFt JOIN " .TOPIC_KAT. " as k ON t.k_id=k.k_id WHERE p.post_id IN ($search_results) AND pt.post_id = p.post_id AND f.forum_id = p.forum_id AND p.topic_id = t.topic_id AND p.poster_id = u.user_id"; } else { $sql = "SELECT t.*, f.forum_id, f.forum_name, 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, k.kategorie FROM " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2 LEFT JOIN ". TOPIC_KAT. " as k ON t.k_id=k.k_id WHERE t.topic_id IN ($search_results) AND t.topic_poster = u.user_id AND f.forum_id = t.forum_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"; }//Kategorien ##----FIND------ $topic_title = $searchset[$i]['topic_title']; ##----Add After---- //KATEGORIEN if($searchset[$i]['kategorie'] !=""){ $topic_cat ="[".$searchset[$i]['kategorie']."] "; }else{ $topic_cat=""; } //KATEGORIEN ##----FIND------ $template->assign_block_vars("searchresults", array( 'TOPIC_TITLE' => $topic_title, ##----Replace With---- $template->assign_block_vars("searchresults", array( //Kategorien 'TOPIC_CAT' => $topic_cat, //Kategorien 'TOPIC_TITLE' => $topic_title, ##----FIND------ $template->assign_block_vars('searchresults', array( //-- mod : categories hierarchy --------------------------------------------------------------------//-- delete// 'FORUM_NAME' => $searchset[$i]['forum_name'],//-- add 'FORUM_NAME' => get_object_lang(POST_FORUM_URL . $searchset[$i]['forum_id'], 'name'),//-- fin mod : categories hierarchy ---------------------------------------------------------------- 'FORUM_ID' => $forum_id, ##----Replace With---- $template->assign_block_vars('searchresults', array( //-- mod : categories hierarchy --------------------------------------------------------------------//-- delete// 'FORUM_NAME' => $searchset[$i]['forum_name'],//-- add 'FORUM_NAME' => get_object_lang(POST_FORUM_URL . $searchset[$i]['forum_id'], 'name'),//-- fin mod : categories hierarchy ---------------------------------------------------------------- 'FORUM_ID' => $forum_id, //Kategorien 'TOPIC_CAT' => $topic_cat, //Kategorien##-------------------- Save an close the search.php########################################################################################## Open viewtopic.php ##----Find---- $post_subject = ( $postrow[$i]['post_subject'] != '' ) ? $postrow[$i]['post_subject'] : ''; ##---Replace with----//kategorien if($postrow[$i]['kategorie'] !=""){$postka= "[" .$postrow[$i]['kategorie']. "] "; }else{ $postka= "";} if ($postrow[$i]['post_id'] ==$forum_topic_data['topic_first_post_id']){ $post_subject = ( $postrow[$i]['post_subject'] != '' ) ? $postka.$postrow[$i]['post_subject'] : '';}else{ $post_subject = ( $postrow[$i]['post_subject'] != '' ) ? $postrow[$i]['post_subject'] : '';}$template->assign_vars(array( 'TOPIC_CAT' => $postka )); //kategorien ##----Find-----$sql = "SELECT u.*, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . POSTS_TEXT_TABLE . " pt WHERE p.topic_id = $topic_id $limit_posts_time AND pt.post_id = p.post_id AND u.user_id = p.poster_id ORDER BY p.post_time $post_time_order, p.post_id LIMIT $start, ".(isset($finish)? ((($finish - $start) > 0)? ($finish - $start): -$finish): $board_config['posts_per_page']); ##----Replace with---$sql = "SELECT u.*, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid, k.kategorie FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . POSTS_TEXT_TABLE . " pt, " . TOPICS_TABLE. " t LEFT Join " .TOPIC_KAT. " as k ON t.k_id=k.k_id WHERE p.topic_id = $topic_id $limit_posts_time AND pt.post_id = p.post_id AND u.user_id = p.poster_id AND t.topic_id = $topic_id ORDER BY p.post_time $post_time_order, p.post_id LIMIT $start, ".(isset($finish)? ((($finish - $start) > 0)? ($finish - $start): -$finish): $board_config['posts_per_page']); ##----------------- Save an Close viewtopic.php##########################################################################################Open includes/functions_topics_list.php##---Find---- if( ( $replies + 1 ) > $board_config['posts_per_page'] ) { ##----Add Before-----//kategorien if($topic_rowset[$i]['k_id'] !=0) { $sql="select kategorie FROM " . TOPIC_KAT ." where k_id=" . $topic_rowset[$i]['k_id']; if ( $result = $db->sql_query($sql) ) { $kat = $db->sql_fetchrow($result); $topic_kat="[" .$kat['kategorie'] . "]"; } }else{ $topic_kat=""; }//kategorien ##----Find---- 'TOPIC_TITLE' => $topic_title, 'TOPIC_ANNOUNCES_DATES' => $topic_announces_dates, 'TOPIC_CALENDAR_DATES' => $topic_calendar_dates, ##---After, Add----- 'TOPIC_KAT' => $topic_kat,##-------------------- Save an Close functions_topics_list.php##########################################################################################Open viewforum.php ##---Find---- if( ( $replies + 1 ) > $board_config['posts_per_page'] ) { ##----Add Before-----//kategorien if($topic_rowset[$i]['k_id'] !=0) { $sql="select kategorie FROM " . TOPIC_KAT ." where k_id=" . $topic_rowset[$i]['k_id']; if ( $result = $db->sql_query($sql) ) { $kat = $db->sql_fetchrow($result); $topic_kat="[" .$kat['kategorie'] . "]"; } }else{ $topic_kat=""; }//kategorien ##------------ ##----Find---- $template->assign_block_vars('topicrow', array( 'ROW_COLOR' => $row_color, ##---Replace with----- $template->assign_block_vars('topicrow', array( 'TOPIC_KAT' => $topic_kat, 'ROW_COLOR' => $row_color,##-------------------- Save and Close viewforum.php ########################################################################################## Open modcp.php ##----Find---- else if ( $unlock ) { $mode = 'unlock'; }##---Add after--- //kategorien EDIT else if ( $edit ) { $mode = 'edit'; }//Kategorien EDIT ##--------- ##---Find----//// Obtain relevant data//if ( !empty($topic_id) ){ $sql = "SELECT f.forum_id, f.forum_name, f.forum_topics##---Replace with----//// Obtain relevant data//if ( !empty($topic_id) ){ $sql = "SELECT f.forum_id, f.forum_name, f.forum_topics, t.k_id##------------------- ##----Find---ATTETION there are three very close $template->assign_vars(array( 'META' => '<meta>') ); message_die(GENERAL_MESSAGE, $lang['Topics_Locked'] . '<br><br>' . $message); break;##---Add After------ //kategorien case 'edit': $page_title = $lang['Mod_CP']; include($phpbb_root_path . 'includes/page_header.'.$phpEx); //Values auslesen $kategorie = ( !empty($HTTP_POST_VARS['kategorie']) ) ? $HTTP_POST_VARS['kategorie'] : array($kategorie); $kat_old = ( isset($HTTP_POST_VARS['kat_old']) ) ? $HTTP_POST_VARS['kat_old'] : array($kat_old); $add_cat = ( isset($HTTP_POST_VARS['add_cat']) ) ? $HTTP_POST_VARS['add_cat'] : ''; $kat_del = ( isset($HTTP_POST_VARS['kat_del']) ) ? $HTTP_POST_VARS['kat_del'] : array($kat_del); //Kategorien Updaten $total_kat= count($kategorie); $j=0; $i=0; if($total_kat>1) { while($j <total_kat>sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not update Category table', '', __LINE__, __FILE__, $sql); } } } //Kategorie hinzufügen if(!empty($add_cat)) { $add_cat= addslashes($add_cat); $sql_k_u="INSERT INTO " . TOPIC_KAT ." (k_id, forum_id, kategorie) VALUES ('', $forum_id, '$add_cat')"; if (!($result = $db->sql_query($sql_k_u))) { message_die(GENERAL_ERROR, 'Could not Insert Category table', '', __LINE__, __FILE__, $sql_k_u); } } //Kategorie Löschen $c_del_k= count($kat_del); if($c_del_k >1){ $j=0; $i=0; while($j <c_del_k>sql_query($sql_del)) ) { message_die(GENERAL_ERROR, 'Could not Del Category in Kat Table ', '', __LINE__, __FILE__, $sql_del); } if ( !($result = $db->sql_query($sql_del_t)) ) { message_die(GENERAL_ERROR, 'Could not Del Category in Topic Table ', '', __LINE__, __FILE__, $sql_del); } } } $redirect_page = "modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&sid=" . $userdata['session_id']; //$message = sprintf($lang['akt_kat'], '<a>', '</a>'); $message= $lang['akt_kat']; $message.="<br>"; $message.="<a>" . $lang['Previous'] . "</a>"; message_die(GENERAL_MESSAGE, $message); break; //kategorien ##-------------- ##---Find----- 'L_MESSAGE' => $lang['Message'], 'L_SELECT' => $lang['Select'], ##----Add after----- //kategorien 'L_ADD_KAT' => $lang['new_kat'], 'L_KAT' => $lang['Category'], 'L_KATE' => $lang['kat'], 'L_DEL_KATE' => $lang['Delete'], //kategorien ##-------- ##----Find---- $topic_title = ''; if ( $row['topic_status'] == TOPIC_LOCKED ) { $folder_img = $images['folder_locked']; $folder_alt = $lang['Topic_locked']; }##---Add before ----- //kategorien if($row['k_id'] !=0){ $sql2="select kategorie FROM " . TOPIC_KAT ." where k_id=".$row['k_id']; if ( $result2 = $db->sql_query($sql2) ) { $kat = $db->sql_fetchrow($result2); $topic_kat="[" .$kat['kategorie'] . "]"; } }else{ $topic_kat=""; } //kategorien ##-------------- ##----Find----- 'TOPIC_ID' => $topic_id, 'TOPIC_ATTACHMENT_IMG' => topic_attachment_image($row['topic_attachment']), 'L_TOPIC_FOLDER_ALT' => $folder_alt)##----Before ADD----- 'TOPIC_KAT' => $topic_kat, ##----Find ----- $template->assign_vars(array( 'PAGINATION' => generate_pagination("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&sid=" . $userdata['session_id'], $forum_topics, $board_config['topics_per_page'], $start),##----Add Before---- //kategorien $sql_forum_k="select kategorie,k_id FROM " . TOPIC_KAT ." where forum_id=".$forum_id; if ( $result_f = $db->sql_query($sql_forum_k) ) { while($kat2 = $db->sql_fetchrow($result_f)) { $template->assign_block_vars('forum_katrow', array( 'FORUM_KAT' => $kat2['kategorie'], 'K_ID' => $kat2['k_id']) ); } } //kategorien ##--------------- ##-----Find---- $lock = ( isset($HTTP_POST_VARS['lock']) ) ? TRUE : FALSE;$unlock = ( isset($HTTP_POST_VARS['unlock']) ) ? TRUE : FALSE; ##----Add after---- $edit = ( isset($HTTP_POST_VARS['edit']) ) ? TRUE : FALSE; ##--------- Save and close modcp.php ########################################################################################## open posting.php ##-----Find---- case 'newtopic': if ( empty($forum_id) || !(empty($row['forum_link']))) { message_die(GENERAL_MESSAGE, $lang['Forum_not_exist']); } $sql = "SELECT * FROM " . FORUMS_TABLE . " WHERE forum_id = $forum_id"; ##----Add after---- //kategorien $sql_kat="select * FROM " . TOPIC_KAT . " where forum_id=" .$forum_id. " ORDER BY kategorie" ; if ( $result = $db->sql_query($sql_kat) ){ $result2 = $db->sql_query($sql_kat); $kat33 = $db->sql_fetchrow($result2); $to_result=count($kat33); if($to_result >=2){ $first= "<select>"; $first.="<option>$kat[kategorie]</option>"; while($kat = $db->sql_fetchrow($result)){ $first.="<option>$kat[kategorie]</option>"; } $first.="</select> "; $kat=$first; }else{ $kat="<input>"; } $template->assign_vars(array( 'TOPIC_CAT' => $kat, )); }//kategorien##--------- ##----find---- $post_icon = ( $post_data['first_post'] ) ? $post_info['topic_icon'] : $post_info['post_icon'];//-- fin mod : post icon --------------------------------------------------------------------------- if ( $mode == 'editpost' ) { ##----Add After----//kategorien if($post_id ==$post_info['topic_first_post_id']) { $sql_kat2="select * FROM " . TOPIC_KAT . " where forum_id=" .$forum_id. " ORDER BY kategorie" ; if ($result = $db->sql_query($sql_kat2)){ $result2 = $db->sql_query($sql_kat2); $kat33 = $db->sql_fetchrow($result2); $to_cat=count($kat33); if($to_cat >1){ $first= "<select>"; $first.="<option>$kat[kategorie]</option>"; while($kat = $db->sql_fetchrow($result)){ if(($post_info['k_id'])==$kat['k_id']) { $s="selected"; }else { $s=""; } $first.="<option>$kat[kategorie]</option>"; } $first.="</select>"; $kat=$first; }else{ $kat="<input>"; } $template->assign_vars(array( 'TOPIC_CAT' => $kat, )); } }//kategorien ##-------- ##------Find---- $username = ( !empty($HTTP_POST_VARS['username']) ) ? $HTTP_POST_VARS['username'] : ''; $subject = ( !empty($HTTP_POST_VARS['subject']) ) ? trim($HTTP_POST_VARS['subject']) : ''; ##----Add before---- $k_id = $HTTP_POST_VARS['k_id'];##---- ##------Find---- submit_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id, $topic_type, $bbcode_on, $html_on, $smilies_on, $attach_sig, $bbcode_uid, str_replace("'", "''", $username), str_replace("'", "''", $subject), str_replace("'", "''", $message), str_replace("'", "''", $poll_title), $poll_options, $poll_length, $max_vote, $hide_vote, $tothide_vote, $forcetime, str_replace("'", "''", $topic_desc), $news_category, $topic_announce_duration, $topic_calendar_time, $topic_calendar_duration, $post_icon, $topic_calendar_repeat);##---Replace with---- submit_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id, $topic_type, $bbcode_on, $html_on, $smilies_on, $attach_sig, $bbcode_uid, str_replace("'", "''", $username), str_replace("'", "''", $subject), str_replace("'", "''", $message), str_replace("'", "''", $poll_title), $poll_options, $poll_length, $max_vote, $hide_vote, $tothide_vote, $forcetime, str_replace("'", "''", $topic_desc), $news_category, $topic_announce_duration, $topic_calendar_time, $topic_calendar_duration, $post_icon, $topic_calendar_repeat, $k_id); ##---- ##----Find--- $select_sql = (!$submit) ? ', t.topic_title, t.topic_desc, t.topic_icon, t.topic_calendar_time, t.topic_calendar_duration, t.topic_calendar_repeat, t.topic_announce_duration, t.news_id, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, pt.post_subject, p.post_icon, pt.post_text, pt.bbcode_uid, u.username, u.user_id, u.user_sig, u.user_sig_bbcode_uid' : ''; ##---Replace with---- $select_sql = (!$submit) ? ', t.topic_title, t.k_id, t.topic_desc, t.topic_icon, t.topic_calendar_time, t.topic_calendar_duration, t.topic_calendar_repeat, t.topic_announce_duration, t.news_id, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, pt.post_subject, p.post_icon, pt.post_text, pt.bbcode_uid, u.username, u.user_id, u.user_sig, u.user_sig_bbcode_uid' : ''; ##-------- ##----Find--- $preview_subject = $subject; $preview_username = $username; ##----Add After----//kategorien $k_id = $HTTP_POST_VARS['k_id'];//kategorien##-------- ##----Find--- $template->assign_vars(array( 'ERROR_MESSAGE' => $error_msg) ); $template->assign_var_from_handle('ERROR_BOX', 'reg_header'); }##----Add After---- //kategorien if($k_id>=0) { $sql_kat2="select * FROM " . TOPIC_KAT . " where forum_id=" .$forum_id. " ORDER BY kategorie" ; if ($result = $db->sql_query($sql_kat2)){ $result2 = $db->sql_query($sql_kat2); $kat33 = $db->sql_fetchrow($result2); $to_cat=count($kat33); if($to_cat >1){ $first= "<select>"; $first.="<option></option>"; while($kat = $db->sql_fetchrow($result)){ if(($k_id)==$kat['k_id']) { $s="selected"; }else { $s=""; } $first.="<option>$kat[kategorie]</option>"; } $first.="</select>"; $kat=$first; }else{ $kat="<input>"; } $template->assign_vars(array( 'TOPIC_CAT' => $kat, )); } }//kategorien ##-------- Save and Close Posting.php ########################################################################################## open posting_body.tpl ##----find---<input>##----Add Before----{TOPIC_CAT} ##------- Save and Close posting_body.tpl########################################################################################## Open modcp_body.tpl ##----Find----<a>{topicrow.TOPIC_TITLE}</a></span></td> ##----Inline, Add before----<b>{topicrow.TOPIC_KAT}</b> ##----Find---- <input></td></tr></table>##----Add After---- <table> <tr> <th><span><b>{L_KAT}</b></span> </th> <th><span><b>{L_DEL_KAT}</b></span> </th> </tr> <input> <BEGIN> <tr> <td><span>{L_KAT}:</span> </td> <td><span><input></span> <td><span><input></span> </td> <input> </td> </tr> <END> <tr> <td><span>{L_NEW_KAT}</span> </td> <td><span><input></span></td> <td><span></span> </td> </tr> <tr> <td> {S_HIDDEN_FIELDS} <input> </td> </tr></table>##----------------------------------- Save and Close modcp_body.tpl ########################################################################################## open viewtopic_body.tpl ##---Find--- <tr> <td>{TOPIC_TITLE}</td></tr> ##----Replace with----- <tr> <td>{TOPIC_CAT} {TOPIC_TITLE}</td></tr> Save and close viewtopic_body.tpl ########################################################################################## Open topics_list_box.tpl ##----Find in the topicrow---- <span>{topics_list_box.row.MINICLOCK}{topics_list_box.row.NEWEST_POST_IMG}{topics_list_box.row.TOPIC_ATTACHMENT_IMG}{topics_list_box.row.L_NEWS}{topics_list_box.row.TOPIC_TYPE}</span><span>{topics_list_box.row.TOPIC_INFO}</span><span><a>{topics_list_box.row.TOPIC_TITLE}</a></span> <span>{topics_list_box.row.RATING}</span><span> {topics_list_box.row.TOPIC_ANNOUNCES_DATES}##---Replace with---- <span>{topics_list_box.row.MINICLOCK}{topics_list_box.row.NEWEST_POST_IMG}{topics_list_box.row.TOPIC_ATTACHMENT_IMG}{topics_list_box.row.L_NEWS}{topics_list_box.row.TOPIC_TYPE}</span><span>{topics_list_box.row.TOPIC_INFO}</span><span>{topics_list_box.row.TOPIC_KAT} <a>{topics_list_box.row.TOPIC_TITLE}</a></span> <span>{topics_list_box.row.RATING}</span><span> {topics_list_box.row.TOPIC_ANNOUNCES_DATES} ##------------Save and close viewforum_body.tpl ########################################################################################## Open search_result_posts.tpl ##----Find in the topicrow---- <td>{L_TOPIC}: <a>{searchresults.TOPIC_TITLE}</a></td> ##---Replace with---- <td>{L_TOPIC}: {searchresults.TOPIC_CAT} <a>{searchresults.TOPIC_TITLE}</a></td> ##------------Save and close search_result_posts.tpl ########################################################################################## Open search_result_topics.tpl ##----Find in the topicrow---- <td><span>{searchresults.MINICLOCK}{searchresults.NEWEST_POST_IMG}{searchresults.TOPIC_TYPE}<a>{searchresults.TOPIC_TITLE}</a></span><br> ##---Replace with---- <td><span>{searchresults.MINICLOCK}{searchresults.NEWEST_POST_IMG}{searchresults.TOPIC_TYPE}} {searchresults.TOPIC_CAT}<a>{searchresults.TOPIC_TITLE}</a></span><br> ##------------Save and close search_result_topics.tpl ########################################################################################## Done with the primary Instal have Fun