Permalink
Browse files

(core) integrate unread personal messages, modcenter reports and unap…

…proved member registrations into the notification popup

(core-rating) allow non-unique rating classes *WARNING* database changes required
(core) merged a couple of bug fixes from SMF 2.1-dev
(theme) syntax highlighting after inline-editing of a message should now work
(core) activity stream templates converted
(theme) removed some deprecated files
  • Loading branch information...
silvercircle committed Jul 27, 2012
1 parent 2235778 commit 53a87994a49b58f4bd7f64f0bfd11e421a195cad
Showing with 356 additions and 8,676 deletions.
  1. +7 −15 Sources/Activities.php
  2. +1 −1 Sources/Errors.php
  3. +2 −2 Sources/Groups.php
  4. +1 −1 Sources/Load.php
  5. +2 −1 Sources/PersonalMessage.php
  6. +3 −3 Sources/Post.php
  7. +15 −9 Sources/Ratings.php
  8. +4 −1 Sources/backend/ManagePosts.php
  9. +13 −5 Sources/lib/Subs-Activities.php
  10. +23 −17 Sources/lib/Subs-Ratings.php
  11. +1 −1 Sources/lib/Subs.php
  12. +9 −3 Themes/admin/ManageRatings.template.php
  13. +0 −248 Themes/default/Activities.template.php
  14. +1 −1 Themes/default/Post.template.php
  15. +6 −3 Themes/default/css/index_default.css
  16. +10 −8 Themes/default/css/index_lightweight.css
  17. +0 −4 Themes/default/index.template.php
  18. +1 −1 Themes/default/languages/Activities.english.php
  19. +1 −0 Themes/default/languages/Admin.english.php
  20. +1 −1 Themes/default/languages/index.english.php
  21. +1 −1 Themes/default/prettify/prettify.css
  22. +0 −1 Themes/default/prettify/prettify.js
  23. +2 −1 Themes/default/scripts/script.js
  24. +0 −68 Themes/default/scripts/shlt.js
  25. +3 −4 Themes/default/scripts/topic.js
  26. +0 −165 Themes/default/shlt/LGPL-LICENSE
  27. +0 −20 Themes/default/shlt/MIT-LICENSE
  28. +0 −120 Themes/default/shlt/compass/_theme_template.scss
  29. +0 −14 Themes/default/shlt/compass/config.rb
  30. +0 −216 Themes/default/shlt/compass/shCore.scss
  31. +0 −2 Themes/default/shlt/compass/shCoreDefault.scss
  32. +0 −2 Themes/default/shlt/compass/shCoreDjango.scss
  33. +0 −2 Themes/default/shlt/compass/shCoreEclipse.scss
  34. +0 −2 Themes/default/shlt/compass/shCoreEmacs.scss
  35. +0 −2 Themes/default/shlt/compass/shCoreFadeToGrey.scss
  36. +0 −2 Themes/default/shlt/compass/shCoreMDUltra.scss
  37. +0 −2 Themes/default/shlt/compass/shCoreMidnight.scss
  38. +0 −2 Themes/default/shlt/compass/shCoreRDark.scss
  39. +0 −7 Themes/default/shlt/compass/shThemeDefault.scss
  40. +0 −36 Themes/default/shlt/compass/shThemeDjango.scss
  41. +0 −48 Themes/default/shlt/compass/shThemeEclipse.scss
  42. +0 −32 Themes/default/shlt/compass/shThemeEmacs.scss
  43. +0 −36 Themes/default/shlt/compass/shThemeFadeToGrey.scss
  44. +0 −31 Themes/default/shlt/compass/shThemeMDUltra.scss
  45. +0 −31 Themes/default/shlt/compass/shThemeMidnight.scss
  46. +0 −31 Themes/default/shlt/compass/shThemeRDark.scss
  47. +0 −24 Themes/default/shlt/scripts/shAll.js
  48. +0 −17 Themes/default/shlt/scripts/shAutoloader.js
  49. +0 −59 Themes/default/shlt/scripts/shBrushAS3.js
  50. +0 −59 Themes/default/shlt/scripts/shBrushBash.js
  51. +0 −65 Themes/default/shlt/scripts/shBrushCSharp.js
  52. +0 −97 Themes/default/shlt/scripts/shBrushCpp.js
  53. +0 −91 Themes/default/shlt/scripts/shBrushCss.js
  54. +0 −55 Themes/default/shlt/scripts/shBrushDelphi.js
  55. +0 −67 Themes/default/shlt/scripts/shBrushGroovy.js
  56. +0 −52 Themes/default/shlt/scripts/shBrushJScript.js
  57. +0 −57 Themes/default/shlt/scripts/shBrushJava.js
  58. +0 −58 Themes/default/shlt/scripts/shBrushJavaFX.js
  59. +0 −72 Themes/default/shlt/scripts/shBrushPerl.js
  60. +0 −88 Themes/default/shlt/scripts/shBrushPhp.js
  61. +0 −33 Themes/default/shlt/scripts/shBrushPlain.js
  62. +0 −64 Themes/default/shlt/scripts/shBrushPython.js
  63. +0 −55 Themes/default/shlt/scripts/shBrushRuby.js
  64. +0 −94 Themes/default/shlt/scripts/shBrushSass.js
  65. +0 −66 Themes/default/shlt/scripts/shBrushSql.js
  66. +0 −56 Themes/default/shlt/scripts/shBrushVb.js
  67. +0 −69 Themes/default/shlt/scripts/shBrushXml.js
  68. +0 −17 Themes/default/shlt/scripts/shCore.js
  69. +0 −17 Themes/default/shlt/scripts/shLegacy.js
  70. +0 −130 Themes/default/shlt/src/shAutoloader.js
  71. +0 −1,721 Themes/default/shlt/src/shCore.js
  72. +0 −157 Themes/default/shlt/src/shLegacy.js
  73. +0 −336 Themes/default/shlt/styles/shAll.css
  74. +0 −224 Themes/default/shlt/styles/shCore.css
  75. +0 −328 Themes/default/shlt/styles/shCoreDefault.css
  76. +0 −331 Themes/default/shlt/styles/shCoreDjango.css
  77. +0 −339 Themes/default/shlt/styles/shCoreEclipse.css
  78. +0 −324 Themes/default/shlt/styles/shCoreEmacs.css
  79. +0 −328 Themes/default/shlt/styles/shCoreFadeToGrey.css
  80. +0 −324 Themes/default/shlt/styles/shCoreMDUltra.css
  81. +0 −324 Themes/default/shlt/styles/shCoreMidnight.css
  82. +0 −324 Themes/default/shlt/styles/shCoreRDark.css
  83. +0 −123 Themes/default/shlt/styles/shThemeDefault.css
  84. +0 −120 Themes/default/shlt/styles/shThemeDjango.css
  85. +0 −128 Themes/default/shlt/styles/shThemeEclipse.css
  86. +0 −113 Themes/default/shlt/styles/shThemeEmacs.css
  87. +0 −117 Themes/default/shlt/styles/shThemeFadeToGrey.css
  88. +0 −113 Themes/default/shlt/styles/shThemeMDUltra.css
  89. +0 −113 Themes/default/shlt/styles/shThemeMidnight.css
  90. +0 −113 Themes/default/shlt/styles/shThemeRDark.css
  91. +6 −0 Themes/default/tpl/astream/astream_full.tpl
  92. +22 −0 Themes/default/tpl/astream/astream_output.tpl
  93. +20 −0 Themes/default/tpl/astream/astream_xml.tpl
  94. +80 −0 Themes/default/tpl/astream/bits.tpl
  95. +33 −0 Themes/default/tpl/astream/notification_full.tpl
  96. +66 −0 Themes/default/tpl/astream/notification_popup.tpl
  97. +0 −3 Themes/default/tpl/sidebars/sidebar_on_index.tpl
  98. +12 −3 Themes/default/tpl/xml_blocks.tpl
  99. +2 −1 index.php
  100. +4 −2 install_2-0_mysql.sql
  101. +4 −2 table-changes.sql
View
@@ -55,15 +55,15 @@ function aStreamDispatch()
*/
function aStreamGetNotifications()
{
- global $user_info, $context;
+ global $user_info, $context, $scripturl;
if($user_info['is_guest']) // guests don't get anything, they can't have notifications
fatal_lang_error('no_access');
$xml = isset($_REQUEST['xml']) ? true : false;
$view = isset($_REQUEST['view']) ? $_REQUEST['view'] : 'recent';
- loadTemplate('Activities');
+ //loadTemplate('Activities');
loadLanguage('Activities');
$start = isset($_REQUEST['start']) ? $_REQUEST['start'] : 0;
@@ -86,13 +86,11 @@ function aStreamGetNotifications()
array('id_member' => $user_info['id'], 'start' => $start, 'ignoredusers' => $user_info['ignoreusers']));
aStreamOutput($result, true);
+ Eos_Smarty::loadTemplate($xml ? 'astream/notification_popup' : 'astream/notification_full');
- if($xml) {
- $context['template_layers'] = array();
- $context['sub_template'] = 'notifications_xml';
- }
- else
- $context['sub_template'] = 'notifications';
+ $context['unread_pm'] = $user_info['unread_messages'];
+ $context['pmlink'] = URL::parse($scripturl . '?action=pm');
+ $context['modlink'] = URL::parse($scripturl . '?action=moderate;area=reports');
}
/**
@@ -164,7 +162,6 @@ function aStreamGetStream()
global $context;
$xml = isset($_REQUEST['xml']) ? true : false;
- loadTemplate('Activities');
loadLanguage('Activities');
$board = isset($_REQUEST['b']) ? $_REQUEST['b'] : 0;
@@ -176,12 +173,7 @@ function aStreamGetStream()
else if($topic)
aStreamGetForTopic($topic, $xml);
- if($xml) {
- $context['template_layers'] = array();
- $context['sub_template'] = 'showactivity_xml';
- }
- else
- $context['sub_template'] = 'showactivity';
+ Eos_Smarty::loadTemplate($xml ? 'astream/astream_xml' : 'astream/astream_full');
}
function aStreamGet($b = 0, $xml = false, $global = false)
View
@@ -296,7 +296,7 @@ function setup_fatal_error_context($error_message)
if (empty($context['page_title']))
$context['page_title'] = $context['error_title'];
- EoS_Smarty::resetTemplates();
+ EoS_Smarty::resetTemplates(); // discard all templates loaded so far. We don't need them any longer
EoS_Smarty::loadTemplate('errors');
// If this is SSI, what do they want us to do?
View
@@ -630,12 +630,12 @@ function GroupRequests()
{
global $txt, $context, $scripturl, $user_info, $sourcedir, $smcFunc, $modSettings, $language;
- if(isset($_REQUEST['action']) && $_REQUEST['action'] === 'moderate')
+ //if(isset($_REQUEST['action']) && $_REQUEST['action'] === 'moderate')
EoS_Smarty::loadTemplate('modcenter/list_groups');
// Set up the template stuff...
$context['page_title'] = $txt['mc_group_requests'];
- $context['sub_template'] = 'show_list';
+ //$context['sub_template'] = 'show_list';
// Verify we can be here.
if ($user_info['mod_cache']['gq'] == '0=1')
View
@@ -512,7 +512,7 @@ function loadUserSettings()
CacheAPI::putCache('user_settings-' . $id_member, $user_settings, 600);
$user_info['notify_count'] = isset($user_settings['notify_count']) ? $user_settings['notify_count'] : 0;
-
+ $user_info['notify_count'] += ($user_info['unread_messages'] ? 1 : 0);
// record the user in the list of users who were online today. todo: there should be an option for this feature.
if(!empty($modSettings['who_track_daily_visitors']) && $user_info['id'] > 0 && !isset($modSettings['online_today'][$user_info['id']])) {
$modSettings['online_today'][$user_info['id']] = array(
@@ -441,7 +441,8 @@ function MessageFolder()
$context['from_or_to'] = $context['folder'] != 'sent' ? 'from' : 'to';
$context['get_pmessage'] = 'prepareMessageContext';
$context['signature_enabled'] = substr($modSettings['signature_settings'], 0, 1) == 1;
-
+ //$context['disabled_fields'] = isset($modSettings['disabled_profile_fields']) ? array_flip(explode(',', $modSettings['disabled_profile_fields'])) : array();
+
$labelQuery = $context['folder'] != 'sent' ? '
AND FIND_IN_SET(' . $context['current_label_id'] . ', pmr.labels) != 0' : '';
View
@@ -196,6 +196,9 @@ function Post()
$context['notify'] = !empty($context['notify']);
$context['sticky'] = isset($_REQUEST['sticky']) ? !empty($_REQUEST['sticky']) : $sticky;
+ // Check whether this is a really old post being bumped...
+ if (!empty($modSettings['oldTopicDays']) && $lastPostTime + $modSettings['oldTopicDays'] * 86400 < time() && empty($sticky) && !isset($_REQUEST['subject']))
+ $oldTopicError = true;
}
else
{
@@ -407,9 +410,6 @@ function Post()
$modSettings['topicSummaryPosts'] = $context['new_replies'] > $modSettings['topicSummaryPosts'] ? max($modSettings['topicSummaryPosts'], 5) : $modSettings['topicSummaryPosts'];
}
}
- // Check whether this is a really old post being bumped...
- if (!empty($modSettings['oldTopicDays']) && $lastPostTime + $modSettings['oldTopicDays'] * 86400 < time() && empty($sticky) && !isset($_REQUEST['subject']))
- $oldTopicError = true;
}
// Get a response prefix (like 'Re:') in the default forum language.
View
@@ -42,7 +42,7 @@ function LikeDispatch()
$ctype = isset($_REQUEST['ctype']) ? $_REQUEST['ctype'] : 1; // default to content type = 1 (post)
$mid = isset($_REQUEST['m']) ? (int)$_REQUEST['m'] : 0;
- $rtype = isset($_REQUEST['r']) ? (int)$_REQUEST['r'] : 0;
+ $rtype = isset($_REQUEST['r']) ? (int)$_REQUEST['r'] : '0';
if(!isset($modSettings['ratings'][$rtype]))
AjaxErrorMsg($txt['unknown_rating_type']);
@@ -73,7 +73,7 @@ function LikeDispatch()
if($action === 'getlikes') {
$request = smf_db_query('SELECT l.id_msg, l.id_user, l.updated, l.id_receiver, m.real_name
FROM {db_prefix}likes AS l LEFT JOIN {db_prefix}members AS m ON (m.id_member = l.id_user)
- WHERE l.id_msg = {int:idmsg} AND l.ctype = {int:ctype} AND l.rtype = {int:rtype}
+ WHERE l.id_msg = {int:idmsg} AND l.ctype = {int:ctype} AND FIND_IN_SET({int:rtype}, l.rtype)
ORDER BY l.updated DESC LIMIT {int:start}, 500',
array('idmsg' => $mid, 'ctype' => $ctype, 'start' => $start, 'rtype' => $rtype)); // todo: paging and limit per page should be configurable
@@ -123,13 +123,19 @@ function GetRatingWidget()
mysql_free_result($request);
$context['result_count'] = 0;
- foreach($modSettings['ratings'] as $key => $rating) {
- if(Ratings::isAllowed($key, $id_board)) {
- $context['result_count']++;
- $context['ratings'][] = array(
- 'rtype' => (int)$key,
- 'label' => $rating['text'],
- );
+ $uniques = array(true, false);
+ foreach($uniques as $uniqueness) {
+ foreach($modSettings['ratings'] as $key => $rating) {
+ if($rating['unique'] != $uniqueness)
+ continue;
+ if(Ratings::isAllowed($key, $id_board)) {
+ $context['result_count']++;
+ $context['ratings'][] = array(
+ 'rtype' => (int)$key,
+ 'label' => $rating['text'],
+ 'unique' => $rating['unique']
+ );
+ }
}
}
$context['content_id'] = $content_id;
@@ -490,6 +490,7 @@ function ModifyRatingSettings()
'boards' => isset($rating['boards']) && !empty($rating['boards']) ? implode(',', $rating['boards']) : '',
'boards_denied' => isset($rating['boards_denied']) && !empty($rating['boards_denied']) ? implode(',', $rating['boards_denied']) : '',
'groups_denied' => isset($rating['groups_denied']) && !empty($rating['groups_denied']) ? implode(',', $rating['groups_denied']) : '',
+ 'unique' => isset($rating['unique']) && !empty($rating['unique']) ? true : false,
);
}
else {
@@ -503,7 +504,8 @@ function ModifyRatingSettings()
'boards' => '',
'boards_denied' => '',
'groups_denied' => '',
- 'localized' => ''
+ 'localized' => '',
+ 'unique' => true,
);
}
}
@@ -525,6 +527,7 @@ function ModifyRatingSettings()
'boards' => isset($_REQUEST['rating_boards_' . $i]) && !empty($_REQUEST['rating_boards_' . $i]) ? explode(',', normalizeCommaDelimitedList($_REQUEST['rating_boards_' . $i])) : array(),
'boards_denied' => isset($_REQUEST['rating_boards_denied_' . $i]) && !empty($_REQUEST['rating_boards_denied_' . $i]) ? explode(',', normalizeCommaDelimitedList($_REQUEST['rating_boards_denied_' . $i])) : array(),
'points' => isset($_REQUEST['rating_points_' . $i]) && !empty($_REQUEST['rating_points_' . $i]) ? $_REQUEST['rating_points_' . $i] : 0,
+ 'unique' => isset($_REQUEST['rating_unique_' . $i]) && $_REQUEST['rating_unique_' . $i] ? true : false,
);
}
}
@@ -175,12 +175,20 @@ function actfmt_rating(&$params)
if(!isset($params['rtype']))
$params['rtype'] = 1;
- if(isset($modSettings['ratings'][$params['rtype']]))
- $params['rating_type'] = $modSettings['ratings'][$params['rtype']]['text'];
- else
- return false;
+ $rtypes = explode(',', $params['rtype']);
+ $rating_text = array();
+ $anonymize = false;
+ foreach($rtypes as $rtype) {
+ if(isset($modSettings['ratings'][(int)$rtype]))
+ $rating_text[] = $modSettings['ratings'][(int)$rtype]['text'];
+ else
+ return false;
+ if(!$context['can_view_ratings'] && $modSettings['ratings'][$rtype]['points'] != 0)
+ $anonymize = true;
+ }
+ $params['rating_type'] = implode(' and ', $rating_text);
- $_k = 'acfmt_' . $params['id_desc'] . '_' . trim($key) . ($context['can_view_ratings'] || $modSettings['ratings'][$params['rtype']]['points'] == 0 ? '' : '_a');
+ $_k = 'acfmt_' . $params['id_desc'] . '_' . trim($key) . ($anonymize ? '_a' : '');
if(isset($txt[$_k]))
return(_vsprintf($txt[$_k], $params));
else {
@@ -147,24 +147,26 @@ public static function updateForContent($mid)
array('id_message' => $mid, 'ctype' => $content_type));
while ($row = mysql_fetch_assoc($request)) {
- $rtype = $row['rtype'];
- if(empty($row['member_name']) || !isset($modSettings['ratings'][$rtype]))
- continue;
- if(!isset($likers[$rtype]['count']))
- $likers[$rtype]['count'] = 0;
- $likers[$rtype]['count']++;
- if(!isset($likers[$rtype]['members']))
- $likers[$rtype]['members'][0] = array('name' => $row['member_name'], 'id' => $row['like_user']);
- $count++;
+ $rtypes = explode(',', $row['rtype']);
+ foreach($rtypes as $rtype) {
+ if(empty($row['member_name']) || !isset($modSettings['ratings'][$rtype]))
+ continue;
+ if(!isset($likers[$rtype]['count']))
+ $likers[$rtype]['count'] = 0;
+ $likers[$rtype]['count']++;
+ if(!isset($likers[$rtype]['members']))
+ $likers[$rtype]['members'][0] = array('name' => $row['member_name'], 'id' => $row['like_user']);
+ $count++;
+ }
}
mysql_free_result($request);
- $totalcount = $count;
+
smf_db_query('INSERT INTO {db_prefix}like_cache(id_msg, likes_count, like_status, updated, ctype)
VALUES({int:id_msg}, {int:total}, {string:like_status}, {int:updated}, {int:ctype})
ON DUPLICATE KEY UPDATE updated = {int:updated}, likes_count = {int:total}, like_status = {string:like_status}',
- array('id_msg' => $mid, 'total' => $totalcount, 'updated' => time(), 'like_status' => serialize($likers), 'ctype' => $content_type));
+ array('id_msg' => $mid, 'total' => $count, 'updated' => time(), 'like_status' => serialize($likers), 'ctype' => $content_type));
- $result['count'] = $totalcount;
+ $result['count'] = $count;
$result['status'] = $likers;
return($result);
}
@@ -182,15 +184,16 @@ public static function generateOutput($like_status, &$output, $mid, $have_liked)
{
global $txt, $modSettings;
$parts = array();
+ $types = explode(',', $have_liked);
if(is_array($like_status)) {
foreach($like_status as $key => $the_like) {
if(isset($modSettings['ratings'][$key]) && isset($the_like['members'])) {
$parts[$key] = '<span data-rtype="'.$key.'" class="number">' . $the_like['count'] . '</span>&nbsp;' . $modSettings['ratings'][$key]['text'] . '&nbsp;';
if($the_like['count'] > 1)
- $parts[$key] .= ($key == $have_liked ? sprintf($the_like['count'] > 2 ? $txt['you_and_others'] : $txt['you_and_other'], $the_like['count'] - 1) : '(<a rel="nofollow" onclick="getMcard('.$the_like['members'][0]['id'].', $(this));return(false);" class="mcard" href="'.URL::user($the_like['members'][0]['id'], $the_like['members'][0]['name']) .'">'.$the_like['members'][0]['name'].'</a>&nbsp;' . sprintf($the_like['count'] > 2 ? $txt['and_others'] : $txt['and_other'], $the_like['count'] - 1));
+ $parts[$key] .= (in_array($key, $types) ? sprintf($the_like['count'] > 2 ? $txt['you_and_others'] : $txt['you_and_other'], $the_like['count'] - 1) : '(<a rel="nofollow" onclick="getMcard('.$the_like['members'][0]['id'].', $(this));return(false);" class="mcard" href="'.URL::user($the_like['members'][0]['id'], $the_like['members'][0]['name']) .'">'.$the_like['members'][0]['name'].'</a>&nbsp;' . sprintf($the_like['count'] > 2 ? $txt['and_others'] : $txt['and_other'], $the_like['count'] - 1));
else
- $parts[$key] .= ($key == $have_liked ? $txt['rated_you'] : '(<a rel="nofollow" onclick="getMcard('.$the_like['members'][0]['id'].', $(this));return(false);" class="mcard" href="'.URL::user($the_like['members'][0]['id'], $the_like['members'][0]['name']) .'">'.$the_like['members'][0]['name'].'</a>)');
+ $parts[$key] .= (in_array($key, $types) ? $txt['rated_you'] : '(<a rel="nofollow" onclick="getMcard('.$the_like['members'][0]['id'].', $(this));return(false);" class="mcard" href="'.URL::user($the_like['members'][0]['id'], $the_like['members'][0]['name']) .'">'.$the_like['members'][0]['name'].'</a>)');
}
}
}
@@ -222,8 +225,11 @@ public static function rateIt($mid)
$update_mode = false;
$like_type = ((isset($_REQUEST['r']) && (int)$_REQUEST['r'] > 0) ? $_REQUEST['r'] : '1');
- if(!isset($modSettings['ratings'][$like_type]))
- AjaxErrorMsg($txt['unknown_rating_type']);
+ $rtypes = explode(',', $like_type);
+ foreach($rtypes as $rtype) {
+ if(!isset($modSettings['ratings'][$rtype]))
+ AjaxErrorMsg($txt['unknown_rating_type']);
+ }
if($user_info['is_guest'])
AjaxErrorMsg($txt['no_like_for_guests']);
@@ -312,7 +318,7 @@ public static function rateIt($mid)
}
if(($like_receiver && !$memberContext[$like_receiver]['is_banned']) || $like_receiver == 0) { // posts by guests can be liked
smf_db_query('INSERT INTO {db_prefix}likes(id_msg, id_user, id_receiver, updated, ctype, rtype)
- VALUES({int:id_message}, {int:id_user}, {int:id_receiver}, {int:updated}, {int:ctype}, {int:rtype})',
+ VALUES({int:id_message}, {int:id_user}, {int:id_receiver}, {int:updated}, {int:ctype}, {string:rtype})',
array('id_message' => $mid, 'id_user' => $uid, 'id_receiver' => $like_receiver, 'updated' => time(), 'ctype' => $content_type, 'rtype' => $like_type));
if($like_receiver)
View
@@ -1379,7 +1379,7 @@ function parse_bbc($message, $smileys = true, $cache_id = '', $parse_tags = arra
array(
'tag' => 'php',
'type' => 'unparsed_content',
- 'content' => '<div class="codeheader">PHP</div><pre class="brush:php;">$1</pre>',
+ 'content' => '<div class="codeheader">PHP:</div><pre class="prettyprint lang-php linenums:1">$1</pre>',
'block_level' => false,
'disabled_content' => '$1',
),
@@ -43,6 +43,9 @@ function template_manage_ratings()
<th class="last_th glass cleantop nowrap">',
$txt['rating_class_points'],'
</th>
+ <th class="last_th glass cleantop nowrap">',
+ $txt['rating_class_unique'],'
+ </th>
</tr>
</thead>
<tbody>';
@@ -54,13 +57,13 @@ function template_manage_ratings()
<input type="text" size="3" name="rating_id_', $id, '" value="', $id, '" />
</td>
<td>
- <input type="text" size="15" name="rating_desc_', $id, '" value="', $class['desc'], '" />
+ <input type="text" size="8" name="rating_desc_', $id, '" value="', $class['desc'], '" />
</td>
<td>
- <input type="text" size="15" name="rating_label_', $id, '" value="', $class['label'], '" />
+ <input type="text" size="10" name="rating_label_', $id, '" value="', $class['label'], '" />
</td>
<td>
- <input type="text" size="15" name="rating_localized_', $id, '" value="', $class['localized'], '" />
+ <input type="text" size="10" name="rating_localized_', $id, '" value="', $class['localized'], '" />
</td>
<td style="width:95%;">
<input type="text" style="width:96%;" name="rating_format_', $id, '" value="', $class['format'], '" />
@@ -76,6 +79,9 @@ function template_manage_ratings()
<td>
<input type="text" size="5" name="rating_points_', $id, '" value="', $class['points'], '" />
</td>
+ <td>
+ <input type="checkbox" ',($class['unique'] ? 'checked="checked"' : ''),' name="rating_unique_', $id, '" value="1" />
+ </td>
</tr>';
}
echo '
Oops, something went wrong.

0 comments on commit 53a8799

Please sign in to comment.