obey-robots.txt
View Thread
Post your improvements and modifications to forum index.php here.
 Print Thread
Add Jump to Forum dropdownlist in forum index.php
Fusioneer
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:
Download source  GeSHi: PHP
  1. echo "<!--pre_forum_idx--><table cellpadding='0' cellspacing='1' width='100%' class='tbl-border forum_idx_table'>\n";
  2.  
Parsed in 0.053 seconds, using GeSHi 1.0.8.10


Add directly above:
Download source  GeSHi: PHP
  1. // mod Wanabo, make forum jump list
  2. if (dbrows($result) != 0) {
  3. $forum_list .= "<option value='".$locale['550']."'>".$locale['550']."</option>\n";
  4. while ($data = dbarray($result)) {
  5. if ($data['forum_cat_name'] != $current_cat) {
  6. if ($current_cat != "") { $forum_list .= "</optgroup>\n"; }
  7. $current_cat = $data['forum_cat_name'];
  8. $forum_list .= "<optgroup label='".$data['forum_cat_name']."'>\n";
  9. }
  10. $sel = ($data['forum_id'] != $data['forum_id'] ? " selected='selected'" : "");
  11. $forum_list .= "<option value='".$data['forum_id']."'$sel>".$data['forum_name']."</option>\n";
  12. }
  13. $forum_list .= "</optgroup>\n";
  14. echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
  15. echo "<td style='padding-top:5px'>".$locale['540']."\n";
  16. echo "<select name='jump_id' class='textbox' onchange=\"jumpforum(this.options[this.selectedIndex].value);\">\n";
  17. echo $forum_list."</select></td>\n";
  18. echo "</tr>\n</table>\n";
  19. } // end mod
  20.  
Parsed in 0.026 seconds, using GeSHi 1.0.8.10


We also need the java script to enable this feature.
Find:
Download source  GeSHi: PHP
  1. require_once THEMES."templates/footer.php";
Parsed in 0.031 seconds, using GeSHi 1.0.8.10


And add directly above it:
Download source  GeSHi: PHP
  1. // mod Wanabo, js for forum dropdownlist
  2. $viewthread_js = "<script type='text/javascript'>";
  3. $viewthread_js .= "/*<![CDATA[*/";
  4. // below functions could be made more unobtrusive thanks to jQuery, giving a more accessible cms
  5. $viewthread_js .= "function jumpforum(forum_id){";
  6. $viewthread_js .= "document.location.href='".FORUM."viewforum.php?forum_id='+forum_id;";
  7. $viewthread_js .= "}";
  8. $viewthread_js .= "/*]]>*/";
  9. $viewthread_js .= "</script>";
  10. add_to_footer($viewthread_js); //unset($viewthread_js);
  11. // 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
New Thread Post Reply
Use BBcode or HTML to refer to; 'Add Jump to Forum dropdownlist in forum index.php'
BBcode:
HTML:
Simular threads
Subject Discussion Forum         Last Post
Insert an advertisement panel between forum posts Panels, share youre code : 2 16-12-2014
Trio forum threads panel (as on this site) Panels/infusions (add ons) : 8 18-02-2013