Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleaning up my repo ... pedantic changes that did not fit elsewhere #249

Merged
merged 13 commits into from Mar 21, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion sources/DataValidate.class.php
Expand Up @@ -692,7 +692,6 @@ protected function _validate_valid_url($field, $input, $validation_parameters =

if (!preg_match('`^(https{0,1}?:(//([a-z0-9\-._~%]+)(:[0-9]+)?(/[a-z0-9\-._~%!$&\'()*+,;=:@]+)*/?))(\?[a-z0-9\-._~%!$&\'()*+,;=:@/?]*)?(\#[a-z0-9\-._~%!$&\'()*+,;=:@/?]*)?$`', $input[$field], $matches))
{
var_dump($matches);
return array(
'field' => $field,
'input' => $input[$field],
Expand Down
2 changes: 1 addition & 1 deletion sources/controllers/ModerationCenter.controller.php
Expand Up @@ -1096,7 +1096,7 @@ function action_viewWatchedUsers()
else
{
// Still obey permissions!
$approve_boards = boardsAllowedTo('approve_posts');
$approve_boards = !empty($user_info['mod_cache']['ap']) ? $user_info['mod_cache']['ap'] : boardsAllowedTo('approve_posts');
$delete_boards = boardsAllowedTo('delete_any');

if ($approve_boards == array(0))
Expand Down
4 changes: 2 additions & 2 deletions sources/controllers/PostModeration.controller.php
Expand Up @@ -487,7 +487,7 @@ function action_unapproved_attachments()
<option value="delete">&nbsp;--&nbsp;' . $txt['delete'] . '</option>
</select>
<noscript><input type="submit" name="ml_go" value="' . $txt['go'] . '" class="button_submit" /></noscript>',
'align' => 'right',
'class' => 'floatright',
),
),
);
Expand Down Expand Up @@ -663,7 +663,7 @@ function action_approve()
if ($poster != $user_info['id'])
logAction(($approved ? 'un' : '') . 'approve', array('topic' => $topic, 'subject' => $subject, 'member' => $poster, 'board' => $board));
}

cache_put_data('num_menu_errors', null, 900);

redirectexit('topic=' . $topic . '.msg' . $_REQUEST['msg']. '#msg' . $_REQUEST['msg']);
Expand Down
6 changes: 3 additions & 3 deletions sources/subs/Attachments.subs.php
Expand Up @@ -1643,7 +1643,7 @@ function getServerStoredAvatars($directory, $level)

while ($line = $dir->read())
{
if (in_array($line, array('.', '..', 'blank.gif', 'index.php')))
if (in_array($line, array('.', '..', 'blank.png', 'index.php')))
continue;

if (is_dir($modSettings['avatar_directory'] . '/' . $directory . (!empty($directory) ? '/' : '') . $line))
Expand All @@ -1660,8 +1660,8 @@ function getServerStoredAvatars($directory, $level)
if ($level == 0)
{
$result[] = array(
'filename' => 'blank.gif',
'checked' => in_array($context['member']['avatar']['server_pic'], array('', 'blank.gif')),
'filename' => 'blank.png',
'checked' => in_array($context['member']['avatar']['server_pic'], array('', 'blank.png')),
'name' => $txt['no_pic'],
'is_dir' => false
);
Expand Down
4 changes: 2 additions & 2 deletions themes/CurveClassic/Admin.template.php
Expand Up @@ -575,7 +575,7 @@ function template_view_versions()
<tbody>
<tr>
<td class="windowbg" width="50%">
<a href="#" id="Default-link">', $txt['dvc_default'], '</a>
<a href="#" id="default-link">', $txt['dvc_default'], '</a>
</td>
<td class="windowbg" width="25%">
<em id="yourdefault">??</em>
Expand All @@ -587,7 +587,7 @@ function template_view_versions()
</tbody>
</table>

<table id="Default" width="100%" class="table_grid">
<table id="default" width="100%" class="table_grid">
<tbody>';

foreach ($context['default_template_versions'] as $filename => $version)
Expand Down
14 changes: 7 additions & 7 deletions themes/default/Admin.template.php
Expand Up @@ -70,7 +70,7 @@ function template_admin()
<br />
<strong>', $txt['administrators'], ':</strong>
', implode(', ', $context['administrators']);

// If we have lots of admins... don't show them all.
if (!empty($context['more_admins_link']))
echo '
Expand Down Expand Up @@ -323,7 +323,7 @@ function ourCurrentVersion()
*/
function template_view_versions()
{
global $context, $settings, $scripturl, $txt;
global $context, $scripturl, $txt;

echo '
<div id="admincenter">
Expand Down Expand Up @@ -572,7 +572,7 @@ function template_view_versions()
<tbody>
<tr>
<td class="windowbg" style="width:50%">
<a href="#" id="Default-link">', $txt['dvc_default'], '</a>
<a href="#" id="default-link">', $txt['dvc_default'], '</a>
</td>
<td class="windowbg" style="width:25%">
<em id="yourdefault">??</em>
Expand All @@ -584,7 +584,7 @@ function template_view_versions()
</tbody>
</table>

<table id="Default" class="table_grid">
<table id="default" class="table_grid">
<tbody>';

foreach ($context['default_template_versions'] as $filename => $version)
Expand Down Expand Up @@ -870,7 +870,7 @@ function template_show_settings()
{
if (!is_array($context['settings_message']))
$context['settings_message'] = array($context['settings_message']);

echo '
<div class="', (empty($context['error_type']) ? 'infobox' : ($context['error_type'] !== 'serious' ? 'noticebox' : 'errorbox')), '" id="errors">
<ul>
Expand Down Expand Up @@ -1461,10 +1461,10 @@ function template_core_features()
$.ajax({
// The link we are accessing.
url: smf_scripturl + "?action=xmlhttp;sa=corefeatures;xml",

// The type of request.
type: "post",

// The type of data that is getting returned.
data: data,
error: function(error) {
Expand Down
25 changes: 21 additions & 4 deletions themes/default/css/index.css
Expand Up @@ -747,6 +747,9 @@ dl.settings dt a img {
position: relative;
vertical-align: top;
}
dl.settings textarea {
width: 85%;
}

/* Styles for rounded headers.
------------------------------------------------------- */
Expand Down Expand Up @@ -865,6 +868,9 @@ table.table_grid {
table.table_grid td {
padding: 3px;
}
table.table_grid textarea {
width: 100%;
}
table.table_collapse {
border-collapse: collapse;
border-spacing: 0;
Expand All @@ -874,7 +880,7 @@ table.table_padding {
border-spacing: 0;
}
table.table_padding td {
padding: 3px;
padding: 4px;
}

/* GenericList */
Expand Down Expand Up @@ -4299,7 +4305,7 @@ tr.catbg th:last-child, #show_attachments th:last-child {
.table_grid td.windowbg, .table_grid td.windowbg2, .table_grid td.lockedbg, .table_grid td.lockedbg2,
.table_grid td.stickybg, .table_grid td.stickybg2, .table_grid td.locked_sticky, .table_grid td.locked_sticky2,
.table_grid td.whos_viewing, .table_grid td.moderation, .table_grid td.qaction_cell, .table_grid tbody ,
.table_grid td.approvetbg, .table_grid td.approvetbg2 {
.table_grid td.approvetbg, .table_grid td.approvetbg2, .table_grid td.approvebg, .table_grid td.approvebg2 {
border-bottom: 1px solid #ccc;
}
.table_grid tr:nth-child(even) td {
Expand All @@ -4311,6 +4317,15 @@ tr.catbg th:last-child, #show_attachments th:last-child {
.table_grid td.whos_viewing {
font-size: 0.9em;
}
/* Colors for topics or posts that require approval action */
.table_grid td.approvebg:nth-child(n), .table_grid td.approvebg2:nth-child(n) {
border-bottom: 1px solid #ccc;
background: #fff6ca;
}
.table_grid td.approvetbg:nth-child(n), .table_grid td.approvetbg2:nth-child(n) {
border-bottom: 1px solid #ccc;
background: #fff6ca;
}

/* @todo tempo Colors for locked and sticky topics so we something to look at till this is done :P*/
.table_grid tr td.stickybg {
Expand Down Expand Up @@ -4344,6 +4359,7 @@ tr.catbg th:last-child, #show_attachments th:last-child {
.table_grid tr td.lockedbg2.subject{
background: #f0f4f7 url(../images/icons/quick_lock.png) no-repeat 98% 4px;
}

/* Search results need some help as well */
.search_results_posts .lockedbg {
background: #f0f4f7 url(../images/icons/quick_lock.png) no-repeat 95% 15px;
Expand All @@ -4356,14 +4372,15 @@ tr.catbg th:last-child, #show_attachments th:last-child {
}

/* Colors for background of posts requiring approval */
#forumposts .approvebg {
#forumposts .approvebg, .table_grid td.approvebg {
color: #222;
background: #ffeaea;
}
#forumposts .approvebg2 {
#forumposts .approvebg2, .table_grid td.approvebg2 {
color: #222;
background: #fff2f2;
}

/* Color for background of *topics* requiring approval */
.approvetbg {
color: #222;
Expand Down
Binary file added themes/default/images/stats_info_hd.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions themes/default/languages/Validation.english.php
@@ -1,5 +1,6 @@
<?php
// Version: 1.0; Validation

$txt['_validate_required'] = 'The %1$s field is required';
$txt['_validate_valid_email'] = 'The %1$s field is required to be a valid email address';
$txt['_validate_max_length'] = 'The %1$s field needs to be shorter than %2$s character';
Expand Down