From: <ir...@us...> - 2012-09-26 12:51:35
|
Revision: 10194 http://xoops.svn.sourceforge.net/xoops/?rev=10194&view=rev Author: irmtfan Date: 2012-09-26 12:51:23 +0000 (Wed, 26 Sep 2012) Log Message: ----------- bug fix: move semicolon, javascript:history.go(-1), redirect header for admin report, topic_lock, rating enable, inneHTML for non img Tags Modified Paths: -------------- XoopsModules/newbb/branches/irmtfan/newbb/action.post.php XoopsModules/newbb/branches/irmtfan/newbb/action.topic.php XoopsModules/newbb/branches/irmtfan/newbb/admin/admin_report.php XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev10109.txt XoopsModules/newbb/branches/irmtfan/newbb/docs/lang_diff.txt XoopsModules/newbb/branches/irmtfan/newbb/index.php XoopsModules/newbb/branches/irmtfan/newbb/language/english/admin.php XoopsModules/newbb/branches/irmtfan/newbb/language/english/main.php XoopsModules/newbb/branches/irmtfan/newbb/language/persian/admin.php XoopsModules/newbb/branches/irmtfan/newbb/language/persian/main.php XoopsModules/newbb/branches/irmtfan/newbb/polls.php XoopsModules/newbb/branches/irmtfan/newbb/post.php XoopsModules/newbb/branches/irmtfan/newbb/ratethread.php XoopsModules/newbb/branches/irmtfan/newbb/templates/js/language/english/newbb_toggle.js XoopsModules/newbb/branches/irmtfan/newbb/templates/newbb_index.html XoopsModules/newbb/branches/irmtfan/newbb/templates/newbb_thread.html XoopsModules/newbb/branches/irmtfan/newbb/templates/newbb_viewtopic.html XoopsModules/newbb/branches/irmtfan/newbb/topicmanager.php XoopsModules/newbb/branches/irmtfan/newbb/viewtopic.php XoopsModules/newbb/branches/irmtfan/newbb/votepolls.php Modified: XoopsModules/newbb/branches/irmtfan/newbb/action.post.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/action.post.php 2012-09-26 12:04:53 UTC (rev 10193) +++ XoopsModules/newbb/branches/irmtfan/newbb/action.post.php 2012-09-26 12:51:23 UTC (rev 10194) @@ -20,7 +20,8 @@ $mode = !empty($_GET['mode']) ? intval($_GET['mode']) : 1; if ( empty($post_id) || empty($op)) { - redirect_header("javascript:history.go(-1);", 2, _MD_NORIGHTTOACCESS); + // irmtfan - issue with javascript:history.go(-1) + redirect_header($_SERVER['HTTP_REFERER'], 2, _MD_NORIGHTTOACCESS); exit(); } Modified: XoopsModules/newbb/branches/irmtfan/newbb/action.topic.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/action.topic.php 2012-09-26 12:04:53 UTC (rev 10193) +++ XoopsModules/newbb/branches/irmtfan/newbb/action.topic.php 2012-09-26 12:51:23 UTC (rev 10194) @@ -18,7 +18,8 @@ if ( empty($topic_id) || empty($op)) { - redirect_header("javascript:history.go(-1);", 2, _MD_NORIGHTTOACCESS); + // irmtfan - issue with javascript:history.go(-1) + redirect_header($_SERVER['HTTP_REFERER'], 2, _MD_NORIGHTTOACCESS); exit(); } Modified: XoopsModules/newbb/branches/irmtfan/newbb/admin/admin_report.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/admin/admin_report.php 2012-09-26 12:04:53 UTC (rev 10193) +++ XoopsModules/newbb/branches/irmtfan/newbb/admin/admin_report.php 2012-09-26 12:51:23 UTC (rev 10194) @@ -43,6 +43,9 @@ switch ($op) { case "save": $report_ids = $_POST['report_id']; + // irmtfan add error redirect header + if (empty($report_ids)) + redirect_header( "admin_report.php?item={$item}" . (empty($start) ? "" : "&start={$start}"), 1, _AM_NEWBB_REPORTNOTSELECT); $report_memos = isset($_POST['report_memo']) ? $_POST['report_memo'] : array(); foreach ($report_ids as $rid => $value) { if (!$value) continue; @@ -51,19 +54,24 @@ $report_obj->setVar("report_memo", $report_memos[$rid]); $report_handler->insert($report_obj); } - redirect_header( "admin_report.php?item={$item}" . (empty($start) ? "" : "&start={$start}"), 1); + // irmtfan add message + redirect_header( "admin_report.php?item={$item}" . (empty($start) ? "" : "&start={$start}"), 1, _AM_NEWBB_REPORTSAVE); break; case "delete": $report_ids = $_POST['report_id']; + // irmtfan add error redirect header + if (empty($report_ids)) + redirect_header( "admin_report.php?item={$item}" . (empty($start) ? "" : "&start={$start}"), 1, _AM_NEWBB_REPORTNOTSELECT); foreach ($report_ids as $rid => $value) { if (!$value) continue; if ($report_obj = $report_handler->get($rid)) { $report_handler->delete($report_obj); } } - redirect_header( "admin_report.php?item={$item}" . (empty($start) ? "" : "&start={$start}"), 1); + // irmtfan add message + redirect_header( "admin_report.php?item={$item}" . (empty($start) ? "" : "&start={$start}"), 1, _AM_NEWBB_REPORTDELETE); break; Modified: XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev10109.txt =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev10109.txt 2012-09-26 12:04:53 UTC (rev 10193) +++ XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev10109.txt 2012-09-26 12:51:23 UTC (rev 10194) @@ -1,3 +1,25 @@ +date 2012-09-26 +=================================== +1- bug fix: move semicolon from php files to template files. 'block;' => 'block' AND 'none;' => 'none' +in newbb/index.php, newbb/viewtopic.php, newbb/templates/newbb_thread.html, newbb/templates/newbb_viewtopic.html, newbb/templates/newbb_index.html + +2- bug fix: Issue with javascript in redirect_header javascript:history.go(-1) +in newbb/action.post.php, newbb/action.topic.php, newbb/polls.php, newbb/post.php, newbb/ratethread.php, newbb/topicmanager.php, newbb/votepolls.php + +3- bug fix: add messages for redirect_header +in newbb/post.php, newbb/votepolls.php, newbb/admin/admin_report.php, newbb/language/english/main.php, newbb/language/english/admin.php, newbb/docs/lang_diff.txt + +4- fix and improve: add redirect header when no report is selected in admin_report.php in submit. +newbb/admin/admin_report.php, newbb/language/english/admin.php, newbb/docs/lang_diff.txt + +5- bug fix: user dont see "the topic is locked" if the show_reg was set to 0. revise forum_post_or_register smarty and assign 3 new smraty variables: forum_post, forum_register, topic_lock +in newbb/viewtopic.php + +6- bug fix: user can see rating when he dont have permission to post and/or reply. +in newbb/viewtopic.php, newbb/templates/newbb_viewtopic.html + +7- bug fix: innerHTML change only if the TAG is not img. + date 2012-09-25 =================================== 1- bug fix: change the method of adding stylesheet and scripts from overrighting xoops_module_header smarty variable to $xoTheme. Modified: XoopsModules/newbb/branches/irmtfan/newbb/docs/lang_diff.txt =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/docs/lang_diff.txt 2012-09-26 12:04:53 UTC (rev 10193) +++ XoopsModules/newbb/branches/irmtfan/newbb/docs/lang_diff.txt 2012-09-26 12:51:23 UTC (rev 10194) @@ -50,3 +50,11 @@ define('_MD_RESTORETOPIC','Restore this topic'); define('_MD_TOPICRESTORE','The topic has been restored.'); define('_MD_DESC_RESTORE','Once you press the restore button at the bottom of this form the topic you have selected, and all its related posts, will be restored.'); + +define('_MD_POLL_NOOPTION','You must choose an option !!'); + +admin.php +--------- +define('_AM_NEWBB_REPORTSAVE','Selected Reports have been processed successfully'); +define('_AM_NEWBB_REPORTDELETE','Selected Reports have been deleted from database successfully'); +define('_AM_NEWBB_REPORTNOTSELECT','No Report is selected!'); \ No newline at end of file Modified: XoopsModules/newbb/branches/irmtfan/newbb/index.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/index.php 2012-09-26 12:04:53 UTC (rev 10193) +++ XoopsModules/newbb/branches/irmtfan/newbb/index.php 2012-09-26 12:51:23 UTC (rev 10194) @@ -158,11 +158,11 @@ $expand = (count($toggles) > 0) ? ( (in_array($cat_element_id, $toggles)) ? false : true ) : true; // START irmtfan to improve newbb_displayImage if ($expand) { - $cat_display = 'block;'; + $cat_display = 'block'; //irmtfan move semicolon $cat_icon_display = "minus"; $cat_alt = _MD_NEWBB_HIDE; } else { - $cat_display = 'none;'; + $cat_display = 'none'; //irmtfan move semicolon $cat_icon_display = "plus"; $cat_alt = _MD_NEWBB_SEE; } Modified: XoopsModules/newbb/branches/irmtfan/newbb/language/english/admin.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/language/english/admin.php 2012-09-26 12:04:53 UTC (rev 10193) +++ XoopsModules/newbb/branches/irmtfan/newbb/language/english/admin.php 2012-09-26 12:51:23 UTC (rev 10194) @@ -297,4 +297,8 @@ define('_AM_NEWBB_UPLOAD','max. Upload each file :'); define('_AM_NEWBB_MEMLIMITTOLARGE','Attention! Value \'memory_limit\' to PHP.INI less than \'post_max_size\''); define('_AM_NEWBB_MEMLIMITOK','Files can be uploaded with a maximum of %s.'); +// irmtfan add messages +define('_AM_NEWBB_REPORTSAVE','Selected Reports have been processed successfully'); +define('_AM_NEWBB_REPORTDELETE','Selected Reports have been deleted from database successfully'); +define('_AM_NEWBB_REPORTNOTSELECT','No Report is selected!'); ?> \ No newline at end of file Modified: XoopsModules/newbb/branches/irmtfan/newbb/language/english/main.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/language/english/main.php 2012-09-26 12:04:53 UTC (rev 10193) +++ XoopsModules/newbb/branches/irmtfan/newbb/language/english/main.php 2012-09-26 12:51:23 UTC (rev 10194) @@ -491,7 +491,10 @@ define('_MD_NEWBB_MAXUPLOADFILEINI','The uploaded file exceeds the upload_max_filesize directive in php.ini.'); define('_MD_NEWBB_MAXPIC','Images at the max. Size %s X %s pixels.'); define('_MD_NEWBB_SEARCHDISABLED','The search is disabled and can not be used.'); +// irmtfan added messages define('_MD_NEWBB_HIDEUSERDATA','Hide User information'); define('_MD_NEWBB_HIDE','Hide'); define('_MD_NEWBB_SEE','See'); +// votepolls.php - irmtfan +define('_MD_POLL_NOOPTION','You must choose an option !!'); ?> \ No newline at end of file Modified: XoopsModules/newbb/branches/irmtfan/newbb/language/persian/admin.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/language/persian/admin.php 2012-09-26 12:04:53 UTC (rev 10193) +++ XoopsModules/newbb/branches/irmtfan/newbb/language/persian/admin.php 2012-09-26 12:51:23 UTC (rev 10194) @@ -230,14 +230,17 @@ define('_AM_NEWBB_AUTHOR_WORD_EXTRA',"سخنان بیشتری از موسس ماژول"); // admin_report.php -define("_AM_NEWBB_REPORTADMIN","مدیریت پیام های گزارش شده"); -define("_AM_NEWBB_PROCESSEDREPORT","دیدن پاسخ ارسال شده توسط ناظر به گزارش فرستاده شده"); -define("_AM_NEWBB_PROCESSREPORT","گزارش های ارسال شده"); +define("_AM_NEWBB_REPORTADMIN","مدیریت گزارش های ارسالی در خصوص پست ها"); +define("_AM_NEWBB_PROCESSEDREPORT","دیدن گزارش های های پاسخ داده شده"); +define("_AM_NEWBB_PROCESSREPORT","دیدن گزارش های پاسخ داده نشده و نیازمند رسیدگی"); define("_AM_NEWBB_REPORTTITLE","عنوان گزارش"); define("_AM_NEWBB_REPORTEXTRA","بخش اضافی"); -define("_AM_NEWBB_REPORTPOST","پیام گزارش شده"); +define("_AM_NEWBB_REPORTPOST","پستی که گزارش شده"); define("_AM_NEWBB_REPORTTEXT","متن گزارش ارسال شده"); -define("_AM_NEWBB_REPORTMEMO","Process memo"); +define("_AM_NEWBB_REPORTMEMO","پاسخ داده شده به گزارش ارسال شده"); +define('_AM_NEWBB_REPORTSAVE','گزارش های انتخاب شده رسیدگی شدند.'); +define('_AM_NEWBB_REPORTDELETE','گزارش های انتخاب شده از پایگاه داده ها حذف شدند.'); +define('_AM_NEWBB_REPORTNOTSELECT','هیچ گزارشی انتخاب نشده است!'); // admin_report.php define("_AM_NEWBB_DIGESTADMIN","مدیریت خلاصه ها"); Modified: XoopsModules/newbb/branches/irmtfan/newbb/language/persian/main.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/language/persian/main.php 2012-09-26 12:04:53 UTC (rev 10193) +++ XoopsModules/newbb/branches/irmtfan/newbb/language/persian/main.php 2012-09-26 12:51:23 UTC (rev 10194) @@ -493,4 +493,6 @@ define('_MD_NEWBB_HIDEUSERDATA','مخفی کردن اطلاعات کاربر'); define('_MD_NEWBB_HIDE','مخفی کردن'); define('_MD_NEWBB_SEE','نمایش'); +// votepolls.php - irmtfan +define('_MD_POLL_NOOPTION','شما باید یکی از گزینه ها را انتخاب کنید!!'); ?> \ No newline at end of file Modified: XoopsModules/newbb/branches/irmtfan/newbb/polls.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/polls.php 2012-09-26 12:04:53 UTC (rev 10193) +++ XoopsModules/newbb/branches/irmtfan/newbb/polls.php 2012-09-26 12:51:23 UTC (rev 10194) @@ -53,7 +53,8 @@ } else { - redirect_header("javascript:history.go(-1);", 2, _MD_POLLMODULE_ERROR); + // irmtfan - issue with javascript:history.go(-1) + redirect_header($_SERVER['HTTP_REFERER'], 2, _MD_POLLMODULE_ERROR); exit(); } // irmtfan correct the way and typo=addmor -> addmore @@ -68,7 +69,8 @@ if (!isset($module_handler)) $module_handler =& xoops_gethandler('module'); $xoopspoll =& $module_handler->getByDirname($pollmodules); if (!is_object($xoopspoll) || !$xoopspoll->getVar('isactive')) { - redirect_header("javascript:history.go(-1);", 2, _MD_POLLMODULE_ERROR); + // irmtfan - issue with javascript:history.go(-1) + redirect_header($_SERVER['HTTP_REFERER'], 2, _MD_POLLMODULE_ERROR); exit(); } @@ -170,7 +172,8 @@ */ $option_empty = true; if (empty($_POST['option_text'])) { - redirect_header("javascript:history.go(-1);", 2, _MD_ERROROCCURED . ': ' . _MD_POLL_POLLOPTIONS . ' !'); + // irmtfan - issue with javascript:history.go(-1) + redirect_header($_SERVER['HTTP_REFERER'], 2, _MD_ERROROCCURED . ': ' . _MD_POLL_POLLOPTIONS . ' !'); } $option_text = $_POST['option_text']; foreach ( $option_text as $optxt ) { @@ -180,7 +183,8 @@ } } if ($option_empty) { - redirect_header("javascript:history.go(-1);", 2, _MD_ERROROCCURED . ': ' . _MD_POLL_POLLOPTIONS . ' !'); + // irmtfan - issue with javascript:history.go(-1) + redirect_header($_SERVER['HTTP_REFERER'], 2, _MD_ERROROCCURED . ': ' . _MD_POLL_POLLOPTIONS . ' !'); } if ( $pollmodules == 'xoopspoll') $poll = new XoopsPoll(); @@ -319,7 +323,8 @@ if ( $op == "update" ) { $option_empty = true; if (empty($_POST['option_text'])) { - redirect_header("javascript:history.go(-1);", 2, _MD_ERROROCCURED . ': ' . _MD_POLL_POLLOPTIONS . ' !'); + // irmtfan - issue with javascript:history.go(-1) + redirect_header($_SERVER['HTTP_REFERER'], 2, _MD_ERROROCCURED . ': ' . _MD_POLL_POLLOPTIONS . ' !'); } $option_text = $_POST['option_text']; foreach ( $option_text as $optxt ) { @@ -328,7 +333,8 @@ break; } } - if ($option_empty) redirect_header("javascript:history.go(-1);", 2, _MD_ERROROCCURED . ': ' . _MD_POLL_POLLOPTIONS . ' !'); + // irmtfan - issue with javascript:history.go(-1) + if ($option_empty) redirect_header($_SERVER['HTTP_REFERER'], 2, _MD_ERROROCCURED . ': ' . _MD_POLL_POLLOPTIONS . ' !'); if ( $pollmodules == 'xoopspoll') $poll = new XoopsPoll($poll_id); @@ -439,7 +445,8 @@ if ( $op == "savemore" ) { $option_empty = true; if (empty($_POST['option_text'])) { - redirect_header("javascript:history.go(-1);", 2, _MD_ERROROCCURED . ': ' . _MD_POLL_POLLOPTIONS . ' !'); + // irmtfan - issue with javascript:history.go(-1) + redirect_header($_SERVER['HTTP_REFERER'], 2, _MD_ERROROCCURED . ': ' . _MD_POLL_POLLOPTIONS . ' !'); } $option_text = $_POST['option_text']; foreach ( $option_text as $optxt ) { @@ -448,7 +455,8 @@ break; } } - if ($option_empty) redirect_header("javascript:history.go(-1);", 2, _MD_ERROROCCURED . ': ' . _MD_POLL_POLLOPTIONS . ' !'); + // irmtfan - issue with javascript:history.go(-1) + if ($option_empty) redirect_header($_SERVER['HTTP_REFERER'], 2, _MD_ERROROCCURED . ': ' . _MD_POLL_POLLOPTIONS . ' !'); if ( $pollmodules == 'xoopspoll') $poll = new XoopsPoll($poll_id); Modified: XoopsModules/newbb/branches/irmtfan/newbb/post.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/post.php 2012-09-26 12:04:53 UTC (rev 10193) +++ XoopsModules/newbb/branches/irmtfan/newbb/post.php 2012-09-26 12:51:23 UTC (rev 10194) @@ -130,7 +130,8 @@ if ( !empty($_POST['contents_submit']) ) { $message = $_POST['message']; if (empty($message)) { - redirect_header("javascript:history.go(-1);", 1); + // irmtfan - issue with javascript:history.go(-1) - add error message + redirect_header($_SERVER['HTTP_REFERER'], 1, _MD_ERROR_BACK); exit(); } if ( !empty($isedit) && $post_id > 0 ) { Modified: XoopsModules/newbb/branches/irmtfan/newbb/ratethread.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/ratethread.php 2012-09-26 12:04:53 UTC (rev 10193) +++ XoopsModules/newbb/branches/irmtfan/newbb/ratethread.php 2012-09-26 12:51:23 UTC (rev 10194) @@ -44,7 +44,9 @@ && !$topic_handler->getPermission($topic_obj->getVar("forum_id"), $topic_obj->getVar('topic_status'), "reply") ) { - redirect_header("javascript:history.go(-1);", 2, _NOPERM); + // irmtfan - issue with javascript:history.go(-1) + redirect_header($_SERVER['HTTP_REFERER'], 2, _NOPERM); + exit(); } if (empty($rate)) { Modified: XoopsModules/newbb/branches/irmtfan/newbb/templates/js/language/english/newbb_toggle.js =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/templates/js/language/english/newbb_toggle.js 2012-09-26 12:04:53 UTC (rev 10193) +++ XoopsModules/newbb/branches/irmtfan/newbb/templates/js/language/english/newbb_toggle.js 2012-09-26 12:51:23 UTC (rev 10194) @@ -1,67 +1,4 @@ -function ToggleBlock(block, icon) -{ - if (document.getElementById) - { - if (document.getElementById(block).style.display == 'block') - { - document.getElementById(block).style.display = 'none'; - SaveCollapsed(block, true); - } - else - { - document.getElementById(block).style.display = 'block'; - SaveCollapsed(block, false); - } - } - else if (document.all) - { - if (document.all[block].style.display == 'block') - { - document.all[block].style.display = 'none'; - SaveCollapsed(block, true); - } - else - { - document.all[block].style.display = 'block'; - SaveCollapsed(block, false); - } - } -} - -function ToggleBlock2(block, icon) -{ - if (document.getElementById) - { - if (document.getElementById(block).style.display == 'block') - { - document.getElementById(block).style.display = 'none'; - icon.src = 'images/plus.png'; - SaveCollapsed(block, true); - } - else - { - document.getElementById(block).style.display = 'block'; - icon.src = 'images/minus.png'; - SaveCollapsed(block, false); - } - } - else if (document.all) - { - if (document.all[block].style.display == 'block') - { - document.all[block].style.display = 'none'; - icon.src = 'images/plus.png'; - SaveCollapsed(block, true); - } - else - { - document.all[block].style.display = 'block'; - icon.src = 'images/minus.png'; - SaveCollapsed(block, false); - } - } -} -// START irmtfan - improve: add alt, title, id and innerHTML - recognize a IMG tag for src +// START irmtfan - improve: add alt, title, id and innerHTML - recognize a IMG tag for src - innerHTML for non img TAGs function ToggleBlockCategory(block, icon, src_expand, src_collapse, alt_expand, alt_collapse) { var Img_tag='IMG'; @@ -112,7 +49,9 @@ } } icon.title = icon.alt; - icon.innerHTML=icon.alt; // to support IE7&8 use innerHTML istead of textContent + if (icon.nodeName != Img_tag) { + icon.innerHTML=icon.alt; // to support IE7&8 use innerHTML istead of textContent + } } // source: http://stackoverflow.com/questions/1991608/find-base-name-in-url-in-javascript function findBaseName(url) { Modified: XoopsModules/newbb/branches/irmtfan/newbb/templates/newbb_index.html =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/templates/newbb_index.html 2012-09-26 12:04:53 UTC (rev 10193) +++ XoopsModules/newbb/branches/irmtfan/newbb/templates/newbb_index.html 2012-09-26 12:51:23 UTC (rev 10194) @@ -65,8 +65,8 @@ <{/if}> </tr> </table> - - <div id="<{$category.cat_element_id}>" style="display: <{$category.cat_display}>"> + <!-- irmtfan move semicolon --> + <div id="<{$category.cat_element_id}>" style="display: <{$category.cat_display}>;"> <table border="0" cellspacing="2" cellpadding="0" width="100%"> <{if $category.forums}> <tr class="head" align="center"> Modified: XoopsModules/newbb/branches/irmtfan/newbb/templates/newbb_thread.html =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/templates/newbb_thread.html 2012-09-26 12:04:53 UTC (rev 10193) +++ XoopsModules/newbb/branches/irmtfan/newbb/templates/newbb_thread.html 2012-09-26 12:51:23 UTC (rev 10194) @@ -48,7 +48,8 @@ <span class="pointer" onclick="ToggleBlockCategory('<{$topic_post.post_id}>',(this.firstElementChild || this.children[0]) , '<{$infobox.icon.expand}>', '<{$infobox.icon.collapse}>','<{$smarty.const._MD_NEWBB_HIDEUSERDATA}>','<{$smarty.const._MD_NEWBB_SEEUSERDATA}>')"> <{$infobox.displayImage}> </span> - <div id="<{$topic_post.post_id}>" style="display: <{$infobox.style}>" > + <!-- irmtfan move semicolon --> + <div id="<{$topic_post.post_id}>" style="display: <{$infobox.style}>;" > <div class="comUserStat"><span class="comUserStatCaption"><{$smarty.const._MD_JOINED}>:</span><br /><{$topic_post.poster.regdate}></div> <{if $topic_post.poster.from}> <div class="comUserStat"><span class="comUserStatCaption"><{$smarty.const._MD_FROM}></span> <{$topic_post.poster.from}></div> Modified: XoopsModules/newbb/branches/irmtfan/newbb/templates/newbb_viewtopic.html =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/templates/newbb_viewtopic.html 2012-09-26 12:04:53 UTC (rev 10193) +++ XoopsModules/newbb/branches/irmtfan/newbb/templates/newbb_viewtopic.html 2012-09-26 12:51:23 UTC (rev 10194) @@ -124,8 +124,8 @@ <{/foreach}> <{/if}> </select> - - <{if $rating_enable}> + <!-- irmtfan user should not see rating if he dont have permission --> + <{if $rating_enable && $forum_post && $forum_reply}> <select name="rate" id="rate" onchange="if(this.options[this.selectedIndex].value.length >0 ) { window.document.location=this.options[this.selectedIndex].value;}" @@ -226,7 +226,8 @@ </a> </div> <br /> - <div id="qr" style="display: <{$quickreply.style}>"> + <!-- irmtfan move semicolon --> + <div id="qr" style="display: <{$quickreply.style}>;"> <div><{$quickreply.form}></div> </div> <br /> Modified: XoopsModules/newbb/branches/irmtfan/newbb/topicmanager.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/topicmanager.php 2012-09-26 12:04:53 UTC (rev 10193) +++ XoopsModules/newbb/branches/irmtfan/newbb/topicmanager.php 2012-09-26 12:51:23 UTC (rev 10194) @@ -221,7 +221,8 @@ // irmtfan full URL echo $action[$mode]['msg']."<p><a href='".XOOPS_URL."/modules/".$xoopsModule->getVar("dirname")."/viewtopic.php?topic_id=$topic_id&forum=$newforum'>"._MD_GOTONEWFORUM."</a></p><p><a href='".XOOPS_URL."/modules/newbb/index.php'>"._MD_RETURNFORUMINDEX."</a></p>"; } else { - redirect_header("javascript:history.go(-1)",2,_MD_ERRORFORUM); + // irmtfan - issue with javascript:history.go(-1) + redirect_header($_SERVER['HTTP_REFERER'],2,_MD_ERRORFORUM); } } else { $topic_id = $topic_id[0]; Modified: XoopsModules/newbb/branches/irmtfan/newbb/viewtopic.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/viewtopic.php 2012-09-26 12:04:53 UTC (rev 10193) +++ XoopsModules/newbb/branches/irmtfan/newbb/viewtopic.php 2012-09-26 12:51:23 UTC (rev 10194) @@ -149,11 +149,11 @@ "collapse" => $icon_handler->getImageSource("more")) ; if($infobox['show'] == 1){ - $infobox['style']='none;'; + $infobox['style']='none'; //irmtfan move semicolon $infobox['alt'] = _MD_NEWBB_SEEUSERDATA; $infobox['src']="more"; } else { - $infobox['style']='block;'; + $infobox['style']='block'; //irmtfan move semicolon $infobox['alt'] = _MD_NEWBB_HIDEUSERDATA; $infobox['src']="less"; } @@ -183,18 +183,22 @@ $t_new = newbb_displayImage('t_new', _MD_POSTNEW); $t_reply = newbb_displayImage('t_reply', _MD_REPLY); - +// irmtfan show topic status if show reg is 0 and revise forum_post_or_register if ($topic_handler->getPermission($forum_obj, $topic_obj->getVar('topic_status'), "post")) { - $xoopsTpl->assign('forum_post_or_register', "<a href=\"".XOOPS_URL."/modules/".$xoopsModule->getVar("dirname", "n")."/newtopic.php?forum=".$forum_id."\">".$t_new."</a>"); -} elseif ( !empty($GLOBALS["xoopsModuleConfig"]["show_reg"]) ) { + $xoopsTpl->assign('forum_post', "<a href=\"".XOOPS_URL."/modules/".$xoopsModule->getVar("dirname", "n")."/newtopic.php?forum=".$forum_id."\">".$t_new."</a>"); +} else { if ($topic_obj->getVar('topic_status')) { - $xoopsTpl->assign('forum_post_or_register', _MD_TOPICLOCKED); - } elseif ( !is_object($xoopsUser)) { - $xoopsTpl->assign('forum_post_or_register', '<a href="'.XOOPS_URL.'/user.php?xoops_redirect='.htmlspecialchars($xoopsRequestUri).'">'._MD_REGTOPOST.'</a>'); + $xoopsTpl->assign('topic_lock', _MD_TOPICLOCKED); + } + if (!empty($GLOBALS["xoopsModuleConfig"]["show_reg"]) && !is_object($xoopsUser)) { + $xoopsTpl->assign('forum_register', '<a href="'.XOOPS_URL.'/user.php?xoops_redirect='.htmlspecialchars($xoopsRequestUri).'">'._MD_REGTOPOST.'</a>'); } -} else { - $xoopsTpl->assign('forum_post_or_register', ''); } +// irmtfan for backward compatibility assign forum_post_or_register smarty again. +$xoopsTpl->assign('forum_post_or_register',@$xoopsTpl->get_template_vars("forum_post") . + @$xoopsTpl->get_template_vars("forum_register") . + @$xoopsTpl->get_template_vars("topic_lock")); + if ($topic_handler->getPermission($forum_obj, $topic_obj->getVar('topic_status'), "reply")) { $xoopsTpl->assign('forum_reply', "<a href=\"".XOOPS_URL."/modules/".$xoopsModule->getVar("dirname", "n")."/reply.php?topic_id=".$topic_id."\">".$t_reply."</a>"); } @@ -672,11 +676,11 @@ $quickreply['show'] = 1; // = !empty($xoopsModuleConfig['quickreply_enabled'] $quickreply['expand'] = (count($toggles) > 0) ? ( (in_array('qr', $toggles)) ? false : true ) : true; if ($quickreply['expand']) { - $quickreply['style'] = 'block;'; + $quickreply['style'] = 'block'; //irmtfan move semicolon $quickreply_icon_display = $qr_expand; $quickreply_alt = _MD_NEWBB_HIDE.' '._MD_QUICKREPLY; } else { - $quickreply['style'] = 'none;'; + $quickreply['style'] = 'none'; //irmtfan move semicolon $quickreply_icon_display = $qr_collapse; $quickreply_alt = _MD_NEWBB_SEE.' '._MD_QUICKREPLY; } Modified: XoopsModules/newbb/branches/irmtfan/newbb/votepolls.php =================================================================== --- XoopsModules/newbb/branches/irmtfan/newbb/votepolls.php 2012-09-26 12:04:53 UTC (rev 10193) +++ XoopsModules/newbb/branches/irmtfan/newbb/votepolls.php 2012-09-26 12:51:23 UTC (rev 10194) @@ -72,7 +72,8 @@ $topic_handler =& xoops_getmodulehandler('topic', 'newbb'); $topic_obj =& $topic_handler->get($topic_id); if (!$topic_handler->getPermission($topic_obj->getVar("forum_id"), $topic_obj->getVar('topic_status'), "vote")) { - redirect_header("javascript:history.go(-1);", 2, _NOPERM); + // irmtfan - issue with javascript:history.go(-1) + redirect_header($_SERVER['HTTP_REFERER'], 2, _NOPERM); } if ( !empty($_POST['option_id']) ) { @@ -128,5 +129,6 @@ redirect_header(XOOPS_URL."/modules/newbb/viewtopic.php?topic_id=$topic_id&forum=$forum&poll_id=$poll_id&pollresult=1", 1, $msg); exit(); } -redirect_header(XOOPS_URL."/modules/newbb/viewtopic.php?topic_id=$topic_id&forum=$forum", 1, "You must choose an option !!"); -?> +// irmtfan - add error message +redirect_header(XOOPS_URL."/modules/newbb/viewtopic.php?topic_id=$topic_id&forum=$forum", 1, _MD_POLL_NOOPTION); +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |