Project

General

Profile

« Previous | Next » 

Revision 1157

Added by Dietmar over 14 years ago

Ticket #770, #785, #792, #807, #809, fixes and recoded the news module

View differences:

modify_settings.php
61 61
// include the button to edit the optional module CSS files (function added with WB 2.7)
62 62
// Note: CSS styles for the button are defined in backend.css (div class="mod_moduledirectory_edit_css")
63 63
// Place this call outside of any <form></form> construct!!!
64
if(function_exists('edit_module_css')) {
64
if(function_exists('edit_module_css'))
65
{
65 66
	edit_module_css('news');
66 67
}
67 68
?>
68 69

  
69 70
<form name="modify" action="<?php echo WB_URL; ?>/modules/news/save_settings.php" method="post" style="margin: 0;">
70 71

  
71
	<input type="hidden" name="section_id" value="<?php echo $section_id; ?>">
72
	<input type="hidden" name="page_id" value="<?php echo $page_id; ?>">
72
	<input type="hidden" name="section_id" value="<?php echo $section_id; ?>" />
73
	<input type="hidden" name="page_id" value="<?php echo $page_id; ?>" />
73 74

  
74
	<table class="row_a" cellpadding="2" cellspacing="0" border="0" width="100%">
75
	<table class="row_a" cellpadding="2" cellspacing="0" width="100%">
75 76
		<tr>
76 77
			<td colspan="2"><strong><?php echo $HEADING['GENERAL_SETTINGS']; ?></strong></td>
78
		</tr>
77 79
		<tr>
78 80
			<td class="setting_name"><?php echo $TEXT['HEADER']; ?>:</td>
79 81
			<td class="setting_value">
......
111 113
					<option value=""><?php echo $TEXT['UNLIMITED']; ?></option>
112 114
					<?php
113 115
					for($i = 1; $i <= 20; $i++) {
114
						if($fetch_content['posts_per_page'] == ($i*5)) { $selected = ' selected'; } else { $selected = ''; }
116
						if($fetch_content['posts_per_page'] == ($i*5)) { $selected = ' selected="selected"'; } else { $selected = ''; }
115 117
						echo '<option value="'.($i*5).'"'.$selected.'>'.($i*5).'</option>';
116 118
					}
117 119
					?>
......
119 121
			</td>
120 122
		</tr>
121 123
	</table>
122
	<table class="row_a" cellpadding="2" cellspacing="0" border="0" width="100%" style="margin-top: 3px;">
124
	<table class="row_a" cellpadding="2" cellspacing="0" width="100%" style="margin-top: 3px;">
123 125
		<tr>
124 126
			<td colspan="2"><strong><?php echo $TEXT['COMMENTS']; ?></strong></td>
125 127
		</tr>
......
128 130
			<td class="setting_value">
129 131
				<select name="commenting" style="width: 98%;">
130 132
					<option value="none"><?php echo $TEXT['DISABLED']; ?></option>
131
					<option value="public" <?php if($fetch_content['commenting'] == 'public') { echo 'selected'; } ?>><?php echo $TEXT['PUBLIC']; ?></option>
132
					<option value="private" <?php if($fetch_content['commenting'] == 'private') { echo 'selected'; } ?>><?php echo $TEXT['PRIVATE']; ?></option>
133
					<option value="public" <?php if($fetch_content['commenting'] == 'public') { echo ' selected="selected"'; } ?>><?php echo $TEXT['PUBLIC']; ?></option>
134
					<option value="private" <?php if($fetch_content['commenting'] == 'private') { echo 'selected="selected"'; } ?>><?php echo $TEXT['PRIVATE']; ?></option>
133 135
				</select>
134 136
			</td>
135 137
		</tr>
......
155 157
					$SIZES['125'] = '125x125px';
156 158
					$SIZES['150'] = '150x150px';
157 159
					foreach($SIZES AS $size => $size_name) {
158
						if($fetch_content['resize'] == $size) { $selected = ' selected'; } else { $selected = ''; }
160
						if($fetch_content['resize'] == $size) { $selected = ' selected="selected"'; } else { $selected = ''; }
159 161
						echo '<option value="'.$size.'"'.$selected.'>'.$size_name.'</option>';
160 162
					}
161 163
					?>

Also available in: Unified diff