Revision 892
Added by Matthias almost 16 years ago
view.php | ||
---|---|---|
33 | 33 |
echo "\n</style>\n"; |
34 | 34 |
} |
35 | 35 |
|
36 |
//overwrite php.ini on Apache servers for valid SESSION ID Separator |
|
37 |
if(function_exists('ini_set')) { |
|
38 |
ini_set('arg_separator.output', '&'); |
|
39 |
} |
|
40 |
|
|
36 | 41 |
// Check if there is a start point defined |
37 | 42 |
if(isset($_GET['p']) AND is_numeric($_GET['p']) AND $_GET['p'] >= 0) { |
38 | 43 |
$position = $_GET['p']; |
... | ... | |
122 | 127 |
if($setting_posts_per_page != 0) { |
123 | 128 |
if($position > 0) { |
124 | 129 |
if(isset($_GET['g']) AND is_numeric($_GET['g'])) { |
125 |
$pl_prepend = '<a href="?p='.($position-$setting_posts_per_page).'&g='.$_GET['g'].'"><< ';
|
|
130 |
$pl_prepend = '<a href="?p='.($position-$setting_posts_per_page).'&g='.$_GET['g'].'"><< ';
|
|
126 | 131 |
} else { |
127 |
$pl_prepend = '<a href="?p='.($position-$setting_posts_per_page).'"><< ';
|
|
132 |
$pl_prepend = '<a href="?p='.($position-$setting_posts_per_page).'"><< ';
|
|
128 | 133 |
} |
129 | 134 |
$pl_append = '</a>'; |
130 | 135 |
$previous_link = $pl_prepend.$TEXT['PREVIOUS'].$pl_append; |
... | ... | |
138 | 143 |
$next_page_link = ''; |
139 | 144 |
} else { |
140 | 145 |
if(isset($_GET['g']) AND is_numeric($_GET['g'])) { |
141 |
$nl_prepend = '<a href="?p='.($position+$setting_posts_per_page).'&g='.$_GET['g'].'"> '; |
|
146 |
$nl_prepend = '<a href="?p='.($position+$setting_posts_per_page).'&g='.$_GET['g'].'"> ';
|
|
142 | 147 |
} else { |
143 | 148 |
$nl_prepend = '<a href="?p='.($position+$setting_posts_per_page).'"> '; |
144 | 149 |
} |
145 |
$nl_append = ' >></a>';
|
|
150 |
$nl_append = ' >></a>';
|
|
146 | 151 |
$next_link = $nl_prepend.$TEXT['NEXT'].$nl_append; |
147 | 152 |
$next_page_link = $nl_prepend.$TEXT['NEXT_PAGE'].$nl_append; |
148 | 153 |
} |
... | ... | |
169 | 174 |
if($query_extra != '') { |
170 | 175 |
?> |
171 | 176 |
<div class="selected_group_title"> |
172 |
<?php echo '<a href="'.htmlspecialchars(strip_tags($_SERVER['PHP_SELF'])).'">'.PAGE_TITLE.'</a> >> '.$groups[$_GET['g']]['title']; ?>
|
|
177 |
<?php echo '<a href="'.htmlspecialchars(strip_tags($_SERVER['PHP_SELF'])).'">'.PAGE_TITLE.'</a> >> '.$groups[$_GET['g']]['title']; ?>
|
|
173 | 178 |
</div> |
174 | 179 |
<?php |
175 | 180 |
} |
... | ... | |
187 | 192 |
$post_link .= '?p='.$position; |
188 | 193 |
} |
189 | 194 |
if(isset($_GET['g']) AND is_numeric($_GET['g'])) { |
190 |
if(isset($_GET['p']) AND $position > 0) { $post_link .= '&'; } else { $post_link .= '?'; } |
|
195 |
if(isset($_GET['p']) AND $position > 0) { $post_link .= '&'; } else { $post_link .= '?'; }
|
|
191 | 196 |
$post_link .= 'g='.$_GET['g']; |
192 | 197 |
} |
193 | 198 |
// Get group id, title, and image |
... | ... | |
255 | 260 |
$page_link .= '?p='.$_GET['p']; |
256 | 261 |
} |
257 | 262 |
if(isset($_GET['g']) AND is_numeric($_GET['g'])) { |
258 |
if(isset($_GET['p']) AND $position > 0) { $page_link .= '&'; } else { $page_link .= '?'; } |
|
263 |
if(isset($_GET['p']) AND $position > 0) { $page_link .= '&'; } else { $page_link .= '?'; }
|
|
259 | 264 |
$page_link .= 'g='.$_GET['g']; |
260 | 265 |
} |
261 | 266 |
} else { |
... | ... | |
313 | 318 |
if(($post['commenting'] == 'private' AND isset($wb) AND $wb->is_authenticated() == true) OR $post['commenting'] == 'public') { |
314 | 319 |
|
315 | 320 |
// Print comments header |
316 |
echo str_replace('[ADD_COMMENT_URL]', WB_URL.'/modules/news/comment.php?id='.POST_ID.'&sid='.$section_id, $setting_comments_header); |
|
321 |
echo str_replace('[ADD_COMMENT_URL]', WB_URL.'/modules/news/comment.php?id='.POST_ID.'&sid='.$section_id, $setting_comments_header);
|
|
317 | 322 |
|
318 | 323 |
// Query for comments |
319 | 324 |
$query_comments = $database->query("SELECT title,comment,commented_when,commented_by FROM ".TABLE_PREFIX."mod_news_comments WHERE post_id = '".POST_ID."' ORDER BY commented_when ASC"); |
... | ... | |
344 | 349 |
} |
345 | 350 |
|
346 | 351 |
// Print comments footer |
347 |
echo str_replace('[ADD_COMMENT_URL]', WB_URL.'/modules/news/comment.php?id='.POST_ID.'&sid='.$section_id, $setting_comments_footer);
|
|
352 |
echo str_replace('[ADD_COMMENT_URL]', WB_URL.'/modules/news/comment.php&id='.POST_ID.'&sid='.$section_id, $setting_comments_footer);
|
|
348 | 353 |
} |
349 | 354 |
if(ENABLED_ASP) { |
350 | 355 |
$_SESSION['comes_from_view'] = POST_ID; |
Also available in: Unified diff
replaced in news modul special chars with entities to get valid output;
changed SESSION ID Separator from '&' to '&' to get valid output
Removed the <p> tag around the news as it is added from the editor
set version to 2.8 BETA