- /* Print the row for each option. */
- foreach ($options as $option) {
- if ($option->type != SMOPT_TYPE_HIDDEN) {
- echo "<TR>\n";
- echo ' <TD ALIGN="RIGHT" VALIGN="MIDDLE" NOWRAP><font color=red><b>'
- . $option->caption . "</b></font>:</TD>\n";
- echo ' <TD>' . $option->createHTMLWidget() . "</TD>\n";
- echo "</TR>\n";
- } else {
- echo $option->createHTMLWidget();
+ $optvals[SMOPT_GRP_MESSAGE][] = array(
+ 'name' => 'attachment_common_show_images',
+ 'caption' => _("Display Attached Images with Message"),
+ 'type' => SMOPT_TYPE_BOOLEAN,
+ 'refresh' => SMOPT_REFRESH_NONE
+ );
+
+ $optvals[SMOPT_GRP_MESSAGE][] = array(
+ 'name' => 'pf_subtle_link',
+ 'caption' => _("Enable Subtle Printer Friendly Link"),
+ 'type' => SMOPT_TYPE_BOOLEAN,
+ 'refresh' => SMOPT_REFRESH_NONE
+ );
+
+ $optvals[SMOPT_GRP_MESSAGE][] = array(
+ 'name' => 'pf_cleandisplay',
+ 'caption' => _("Enable Printer Friendly Clean Display"),
+ 'type' => SMOPT_TYPE_BOOLEAN,
+ 'refresh' => SMOPT_REFRESH_NONE
+ );
+
+ /* Assemble all this together and return it as our result. */
+ $result = array(
+ 'grps' => $optgrps,
+ 'vals' => $optvals
+ );
+ return ($result);
+}
+
+/******************************************************************/
+/** Define any specialized save functions for this option page. ***/
+/******************************************************************/
+
+function save_option_theme($option) {
+ global $theme;
+
+ /* Do checking to make sure $new_theme is in the array. */
+ $theme_in_array = false;
+ for ($i = 0; $i < count($theme); ++$i) {
+ if ($theme[$i]['PATH'] == $option->new_value) {
+ $theme_in_array = true;
+ break;