Revision 892
Added by Matthias almost 17 years ago
| trunk/CHANGELOG | ||
|---|---|---|
| 10 | 10 |
# = Bugfix |
| 11 | 11 |
! = Update/Change |
| 12 | 12 |
|
| 13 |
------------------------------------- 2.7.1 ------------------------------------- |
|
| 13 |
------------------------------------- 2.8.0 ------------------------------------- |
|
| 14 |
24-Nov-2008 Matthias Gallas |
|
| 15 |
! set version to 2.8 BETA |
|
| 16 |
# replaced in news modul special chars with entities to get valid output |
|
| 17 |
! changed SESSION ID Separator from '&' to '&' to get valid output |
|
| 18 |
- Removed the <p> tag around the news as it is added from the editor |
|
| 14 | 19 |
28-Dec-2008 Dietrich Roland Pehlke (aldus) |
| 15 | 20 |
+ ticket 610: add ip-address to the email-body in the form-modul. |
| 16 | 21 |
+ ticket 607: include the frontend.css in the comment_page.php file of the news-module. |
| trunk/wb/admin/interface/version.php | ||
|---|---|---|
| 37 | 37 |
} |
| 38 | 38 |
|
| 39 | 39 |
// check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled) |
| 40 |
if(!defined('VERSION')) define('VERSION', '2.7');
|
|
| 40 |
if(!defined('VERSION')) define('VERSION', '2.8 BETA');
|
|
| 41 | 41 |
|
| 42 | 42 |
?> |
| trunk/wb/modules/news/comment_page.php | ||
|---|---|---|
| 29 | 29 |
exit(0); |
| 30 | 30 |
} |
| 31 | 31 |
|
| 32 |
//overwrite php.ini on Apache servers for valid SESSION ID Separator |
|
| 33 |
if(function_exists('ini_set')) {
|
|
| 34 |
ini_set('arg_separator.output', '&');
|
|
| 35 |
} |
|
| 36 |
|
|
| 32 | 37 |
// check if frontend.css file needs to be included into the <body></body> of page |
| 33 | 38 |
if ( (!function_exists('register_frontend_modfiles') || !defined('MOD_FRONTEND_CSS_REGISTERED')) && file_exists(WB_PATH .'/modules/news/frontend.css')) {
|
| 34 | 39 |
echo '<style type="text/css">'; |
| ... | ... | |
| 49 | 54 |
// Print comments page |
| 50 | 55 |
echo str_replace('[POST_TITLE]', POST_TITLE, ($settings['comments_page']));
|
| 51 | 56 |
?> |
| 52 |
<form name="comment" action="<?php echo WB_URL.'/modules/news/submit_comment.php?page_id='.PAGE_ID.'§ion_id='.SECTION_ID.'&post_id='.POST_ID; ?>" method="post">
|
|
| 57 |
<form name="comment" action="<?php echo WB_URL.'/modules/news/submit_comment.php?page_id='.PAGE_ID.'&section_id='.SECTION_ID.'&post_id='.POST_ID; ?>" method="post">
|
|
| 53 | 58 |
<?php if(ENABLED_ASP) { // add some honeypot-fields
|
| 54 | 59 |
?> |
| 55 | 60 |
<input type="hidden" name="submitted_when" value="<?php $t=time(); echo $t; $_SESSION['submitted_when']=$t; ?>" /> |
| trunk/wb/modules/news/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; |
| trunk/wb/modules/news/submit_comment.php | ||
|---|---|---|
| 26 | 26 |
// Include config file |
| 27 | 27 |
require('../../config.php');
|
| 28 | 28 |
|
| 29 |
//overwrite php.ini on Apache servers for valid SESSION ID Separator |
|
| 30 |
if(function_exists('ini_set')) {
|
|
| 31 |
ini_set('arg_separator.output', '&');
|
|
| 32 |
} |
|
| 33 |
|
|
| 29 | 34 |
require_once(WB_PATH.'/framework/class.wb.php'); |
| 30 | 35 |
$wb = new wb; |
| 31 | 36 |
|
| ... | ... | |
| 74 | 79 |
$_SESSION['captcha_error'] = $MESSAGE['MOD_FORM']['INCORRECT_CAPTCHA']; |
| 75 | 80 |
$_SESSION['comment_title'] = $title; |
| 76 | 81 |
$_SESSION['comment_body'] = $comment; |
| 77 |
exit(header('Location: '.WB_URL."/modules/news/comment.php?id=$post_id&sid=$section_id"));
|
|
| 82 |
exit(header('Location: '.WB_URL."/modules/news/comment.php?id=$post_id&sid=$section_id"));
|
|
| 78 | 83 |
} |
| 79 | 84 |
} else {
|
| 80 | 85 |
$_SESSION['captcha_error'] = $MESSAGE['MOD_FORM']['INCORRECT_CAPTCHA']; |
| 81 | 86 |
$_SESSION['comment_title'] = $title; |
| 82 | 87 |
$_SESSION['comment_body'] = $comment; |
| 83 |
exit(header('Location: '.WB_URL."/modules/news/comment.php?id=$post_id&sid=$section_id"));
|
|
| 88 |
exit(header('Location: '.WB_URL."/modules/news/comment.php?id=$post_id&sid=$section_id"));
|
|
| 84 | 89 |
} |
| 85 | 90 |
} |
| 86 | 91 |
} |
| ... | ... | |
| 105 | 110 |
header('Location: '.$wb->page_link($page['link']).'?id='.$post_id);
|
| 106 | 111 |
} else {
|
| 107 | 112 |
if(isset($_GET['post_id']) AND is_numeric($_GET['post_id']) AND isset($_GET['section_id']) AND is_numeric($_GET['section_id'])) |
| 108 |
header('Location: '.WB_URL."/modules/news/comment.php?id={$_GET['post_id']}&sid={$_GET['section_id']}");
|
|
| 113 |
header('Location: '.WB_URL."/modules/news/comment.php?id={$_GET['post_id']}&sid={$_GET['section_id']}");
|
|
| 109 | 114 |
else |
| 110 | 115 |
exit(header("Location: ".WB_URL.PAGES_DIRECTORY.""));
|
| 111 | 116 |
} |
| trunk/wb/modules/news/add.php | ||
|---|---|---|
| 56 | 56 |
<tr style="display: [DISPLAY_GROUP]"> |
| 57 | 57 |
<td valign="top"><a href="[BACK]">[PAGE_TITLE]</a> >> <a href="[BACK]?g=[GROUP_ID]">[GROUP_TITLE]</a></td> |
| 58 | 58 |
</tr> |
| 59 |
</table> |
|
| 60 |
<p style="text-align: justify;">'); |
|
| 61 |
$post_footer = '</p><p>Last changed: [MODI_DATE] at [MODI_TIME]</p> |
|
| 59 |
</table>'); |
|
| 60 |
$post_footer = '<p>Last changed: [MODI_DATE] at [MODI_TIME]</p> |
|
| 62 | 61 |
<a href=\"[BACK]\">Back</a>'; |
| 63 | 62 |
$comments_header = addslashes('<br /><br />
|
| 64 | 63 |
<h2>Comments</h2> |
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