Post your improvements and modifications to forum index.php here.
Add Jump to Forum dropdownlist in forum index.php
Fusioneer
Posted on 19-08-2014 11:34
Super Admin
Posts: 64
Joined: 20-10-2011
Missing a Jump to Forum dropdownlist in the forum index.php file.
Here is how to add a Jump to Forum dropdownlist:
Find in /forum/index.php:
GeSHi: PHP echo "<!--pre_forum_idx--><table cellpadding='0' cellspacing='1' width='100%' c lass='tbl-border forum_idx_table'>\n " ;
Parsed in 0.053 seconds, using GeSHi 1.0.8.10
Add directly above:
GeSHi: PHP // mod Wanabo, make forum jump list
if ( dbrows( $result ) != 0 ) {
$forum_list .= "<option value='" . $locale [ '550' ] . "'>" . $locale [ '550' ] . "</option>\n " ;
while ( $data = dbarray( $result ) ) {
if ( $data [ 'forum_cat_name' ] != $current_cat ) {
if ( $current_cat != "" ) { $forum_list .= "</optgroup>\n " ; }
$current_cat = $data [ 'forum_cat_name' ] ;
$forum_list .= "<optgroup label='" . $data [ 'forum_cat_name' ] . "'>\n " ;
}
$sel = ( $data [ 'forum_id' ] != $data [ 'forum_id' ] ? " selected='selected'" : "" ) ;
$forum_list .= "<option value='" . $data [ 'forum_id' ] . "'$sel >" . $data [ 'forum_name' ] . "</option>\n " ;
}
$forum_list .= "</optgroup>\n " ;
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n <tr>\n " ;
echo "<td style='padding-top:5px'>" . $locale [ '540' ] . "\n " ;
echo "<select name='jump_id' class='textbox' onchange=\" jumpforum(this.options[this.selectedIndex].value);\" >\n " ;
echo $forum_list . "</select></td>\n " ;
echo "</tr>\n </table>\n " ;
} // end mod
Parsed in 0.026 seconds, using GeSHi 1.0.8.10
We also need the java script to enable this feature.
Find:
GeSHi: PHP require_once THEMES. "templates/footer.php" ;
Parsed in 0.031 seconds, using GeSHi 1.0.8.10
And add directly above it:
GeSHi: PHP // mod Wanabo, js for forum dropdownlist
$viewthread_js = "<script type='text/javascript'>" ;
$viewthread_js .= "/*<![CDATA[*/" ;
// below functions could be made more unobtrusive thanks to jQuery, giving a more accessible cms
$viewthread_js .= "function jumpforum(forum_id){" ;
$viewthread_js .= "document.location.href='" . FORUM. "viewforum.php?forum_id='+forum_id;" ;
$viewthread_js .= "}" ;
$viewthread_js .= "/*]]>*/" ;
$viewthread_js .= "</script>" ;
add_to_footer( $viewthread_js ) ; //unset($viewthread_js);
// end mod
Parsed in 0.019 seconds, using GeSHi 1.0.8.10
Warning about ParkingCrew.com! Case: ParkingCrew.com acquires NameDrive.com but earnings are not transferred despite assurances and promises. Inquiries about this are ignored! It's just a con compagny. Don't do business with them!
Jump to Forum
PHP-Fusion installation
PHP-Fusion usage
Modifications to maincore.php
Modifications to forum_threads_list_panel.php
Modifications to header.php
Modifications to BBcodes
Modifications to messages.php
Modifications to sendmail_include.php
Modifications to viewthread.php
Modifications to viewforum.php
Modifications to forum index.php
Panels, share youre code
Panels/infusions (add ons)
Modifications to protect your website
includes\jscript.js
Locale issues