diff --git a/modules/announcements.php b/modules/announcements.php
index 556c301b..09ad54df 100644
--- a/modules/announcements.php
+++ b/modules/announcements.php
@@ -457,7 +457,7 @@ class announcements extends module_base
'board3_number_of_announcements_' . $module_id => array('lang' => 'PORTAL_NUMBER_OF_ANNOUNCEMENTS' , 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
'board3_announcements_day_' . $module_id => array('lang' => 'PORTAL_ANNOUNCEMENTS_DAY' , 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
'board3_announcements_length_' . $module_id => array('lang' => 'PORTAL_ANNOUNCEMENTS_LENGTH' , 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
- 'board3_global_announcements_forum_' . $module_id => array('lang' => 'PORTAL_GLOBAL_ANNOUNCEMENTS_FORUM' , 'validate' => 'string', 'type' => 'custom', 'explain' => true, 'method' => 'select_forums', 'submit' => 'store_selected_forums'),
+ 'board3_global_announcements_forum_' . $module_id => array('lang' => 'PORTAL_GLOBAL_ANNOUNCEMENTS_FORUM' , 'validate' => 'string', 'type' => 'custom', 'explain' => true, 'method' => array('board3.portal.modules_helper', 'generate_forum_select'), 'submit' => 'store_selected_forums'),
'board3_announcements_forum_exclude_' . $module_id => array('lang' => 'PORTAL_ANNOUNCEMENTS_FORUM_EXCLUDE', 'validate' => 'string', 'type' => 'radio:yes_no', 'explain' => true),
'board3_announcements_archive_' . $module_id => array('lang' => 'PORTAL_ANNOUNCEMENTS_ARCHIVE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'board3_announcements_permissions_' . $module_id => array('lang' => 'PORTAL_ANNOUNCEMENTS_PERMISSIONS' , 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
@@ -505,36 +505,6 @@ class announcements extends module_base
return $db->sql_query($sql);
}
- /**
- * Create forum select box
- *
- * @param mixed $value Value of input
- * @param string $key Key name
- * @param int $module_id Module ID
- *
- * @return string Forum select box HTML
- */
- public function select_forums($value, $key, $module_id)
- {
- $forum_list = make_forum_select(false, false, true, true, true, false, true);
-
- $selected = array();
- if(isset($this->config[$key]) && strlen($this->config[$key]) > 0)
- {
- $selected = explode(',', $this->config[$key]);
- }
- // Build forum options
- $s_forum_options = '';
-
- return $s_forum_options;
-
- }
-
/**
* Store selected forums
*
diff --git a/modules/attachments.php b/modules/attachments.php
index 95b0f23d..1c0d2057 100644
--- a/modules/attachments.php
+++ b/modules/attachments.php
@@ -212,36 +212,6 @@ class attachments extends module_base
}
- /**
- * Create forum select box
- *
- * @param mixed $value Value of input
- * @param string $key Key name
- * @param int $module_id Module ID
- *
- * @return string Forum select box HTML
- */
- public function select_forums($value, $key)
- {
- $forum_list = make_forum_select(false, false, true, true, true, false, true);
-
- $selected = array();
- if(isset($this->config[$key]) && strlen($this->config[$key]) > 0)
- {
- $selected = explode(',', $this->config[$key]);
- }
- // Build forum options
- $s_forum_options = '';
-
- return $s_forum_options;
-
- }
-
/**
* Store selected forums
*
diff --git a/modules/news.php b/modules/news.php
index 47a81fc2..13d9c95a 100644
--- a/modules/news.php
+++ b/modules/news.php
@@ -436,7 +436,7 @@ class news extends module_base
'board3_show_all_news_' . $module_id => array('lang' => 'PORTAL_SHOW_ALL_NEWS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'board3_number_of_news_' . $module_id => array('lang' => 'PORTAL_NUMBER_OF_NEWS', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
'board3_news_length_' . $module_id => array('lang' => 'PORTAL_NEWS_LENGTH', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
- 'board3_news_forum_' . $module_id => array('lang' => 'PORTAL_NEWS_FORUM', 'validate' => 'string', 'type' => 'custom', 'explain' => true, 'method' => 'select_forums', 'submit' => 'store_selected_forums'),
+ 'board3_news_forum_' . $module_id => array('lang' => 'PORTAL_NEWS_FORUM', 'validate' => 'string', 'type' => 'custom', 'explain' => true, 'method' => array('board3.portal.modules_helper', 'generate_forum_select'), 'submit' => 'store_selected_forums'),
'board3_news_exclude_' . $module_id => array('lang' => 'PORTAL_NEWS_EXCLUDE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'board3_news_show_last_' . $module_id => array('lang' => 'PORTAL_NEWS_SHOW_LAST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'board3_news_archive_' . $module_id => array('lang' => 'PORTAL_NEWS_ARCHIVE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
@@ -486,36 +486,6 @@ class news extends module_base
return $db->sql_query($sql);
}
- /**
- * Create forum select box
- *
- * @param mixed $value Value of input
- * @param string $key Key name
- * @param int $module_id Module ID
- *
- * @return null
- */
- public function select_forums($value, $key, $module_id)
- {
- $forum_list = make_forum_select(false, false, true, true, true, false, true);
-
- $selected = array();
- if(isset($this->config[$key]) && strlen($this->config[$key]) > 0)
- {
- $selected = explode(',', $this->config[$key]);
- }
- // Build forum options
- $s_forum_options = '';
-
- return $s_forum_options;
-
- }
-
/**
* Store selected forums
*
diff --git a/modules/poll.php b/modules/poll.php
index e6534a8a..2e09f126 100644
--- a/modules/poll.php
+++ b/modules/poll.php
@@ -120,7 +120,7 @@ class poll extends module_base
'title' => 'ACP_PORTAL_POLLS_SETTINGS',
'vars' => array(
'legend1' => 'ACP_PORTAL_POLLS_SETTINGS',
- 'board3_poll_topic_id_' . $module_id => array('lang' => 'PORTAL_POLL_TOPIC_ID' , 'validate' => 'string', 'type' => 'custom', 'explain' => true, 'method' => 'select_forums', 'submit' => 'store_selected_forums'),
+ 'board3_poll_topic_id_' . $module_id => array('lang' => 'PORTAL_POLL_TOPIC_ID' , 'validate' => 'string', 'type' => 'custom', 'explain' => true, 'method' => array('board3.portal.modules_helper', 'generate_forum_select'), 'submit' => 'store_selected_forums'),
'board3_poll_exclude_id_' . $module_id => array('lang' => 'PORTAL_POLL_EXCLUDE_ID' , 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'board3_poll_limit_' . $module_id => array('lang' => 'PORTAL_POLL_LIMIT' , 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
'board3_poll_allow_vote_' . $module_id => array('lang' => 'PORTAL_POLL_ALLOW_VOTE' , 'validate' => 'ibool', 'type' => 'radio:yes_no', 'explain' => true),
@@ -159,35 +159,6 @@ class poll extends module_base
return $db->sql_query($sql);
}
- /**
- * Create forum select box
- *
- * @param mixed $value Value of input
- * @param string $key Key name
- * @param int $module_id Module ID
- *
- * @return null
- */
- public function select_forums($value, $key, $module_id)
- {
- $forum_list = make_forum_select(false, false, true, true, true, false, true);
-
- $selected = array();
- if(isset($this->config[$key]) && strlen($this->config[$key]) > 0)
- {
- $selected = explode(',', $this->config[$key]);
- }
- // Build forum options
- $s_forum_options = '';
-
- return $s_forum_options;
- }
-
/**
* Store selected forums
*
diff --git a/modules/recent.php b/modules/recent.php
index 81d7f379..ebad0736 100644
--- a/modules/recent.php
+++ b/modules/recent.php
@@ -219,7 +219,7 @@ class recent extends module_base
'legend1' => 'ACP_PORTAL_RECENT_SETTINGS',
'board3_max_topics_' . $module_id => array('lang' => 'PORTAL_MAX_TOPIC', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
'board3_recent_title_limit_' . $module_id => array('lang' => 'PORTAL_RECENT_TITLE_LIMIT', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
- 'board3_recent_forum_' . $module_id => array('lang' => 'PORTAL_RECENT_FORUM', 'validate' => 'string', 'type' => 'custom', 'explain' => true, 'method' => 'select_forums', 'submit' => 'store_selected_forums'),
+ 'board3_recent_forum_' . $module_id => array('lang' => 'PORTAL_RECENT_FORUM', 'validate' => 'string', 'type' => 'custom', 'explain' => true, 'method' => array('board3.portal.modules_helper', 'generate_forum_select'), 'submit' => 'store_selected_forums'),
'board3_recent_exclude_forums_' . $module_id => array('lang' => 'PORTAL_EXCLUDE_FORUM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
)
);
@@ -253,36 +253,6 @@ class recent extends module_base
return $db->sql_query($sql);
}
- /**
- * Create forum select box
- *
- * @param mixed $value Value of input
- * @param string $key Key name
- * @param int $module_id Module ID
- *
- * @return null
- */
- public function select_forums($value, $key, $module_id)
- {
- $forum_list = make_forum_select(false, false, true, true, true, false, true);
-
- $selected = array();
- if(isset($this->config[$key]) && strlen($this->config[$key]) > 0)
- {
- $selected = explode(',', $this->config[$key]);
- }
- // Build forum options
- $s_forum_options = '';
-
- return $s_forum_options;
-
- }
-
/**
* Store selected forums
*