Skip to content

Commit

Permalink
Fixes #349 | DateChanger plugin: use UTC+timeoffset
Browse files Browse the repository at this point in the history
Note removed from support plugin
DateChanger plugin is activated again as default
  • Loading branch information
Fraenkiman committed Mar 26, 2024
2 parents 84c8de2 + 49f3d62 commit cd905da
Show file tree
Hide file tree
Showing 18 changed files with 5 additions and 40 deletions.
4 changes: 1 addition & 3 deletions fp-defaults/plugins.conf.php
Expand Up @@ -27,9 +27,7 @@
'postviews', // Counts and displays entry views
'commentcenter', // including Akismet interface
'mediamanager',
// 'datechanger', // Lets you change the publish date for (new) entries.
// DateChanger uses UTC. The time correction in the admin area is skipped
// Therefore deactivated by default
'datechanger', // Lets you change the publish date for (new) entries.
'feed', // Activates the RSS and Atom feed widget
'emoticons', // Activates an emoticons toolbar for entries and static pages
'support', // Provides the FlatPress admin and the community with all relevant data in case of problems.
Expand Down
2 changes: 0 additions & 2 deletions fp-plugins/datechanger/doc_datechanger.txt
Expand Up @@ -4,8 +4,6 @@ Lets you change the publish date for (new) entries. Therefore, it adds the edit

This plugin only works for NEW entries. Once published, the date cannot be changed again!

Attention: The plugin skips a time correction, which can be set in the configuration menu.

About
-----
The DateChanger plugin was originally built by Edoardo Vacchi (NoWhereMan).
6 changes: 4 additions & 2 deletions fp-plugins/datechanger/plugin.datechanger.php
Expand Up @@ -5,7 +5,7 @@
* Type: Block
* Author: FlatPress
* Description: Allows to change the date and time for <a href="./admin.php?p=entry&action=write" title="Write Entry">new entries</a> via a drop-down menu. Part of the standard distribution. <a href="./fp-plugins/datechanger/doc_datechanger.txt" title="Instructions" target="_blank">[Instructions]</a>
* Version: 1.0.4
* Version: 1.0.5
* Author URI: https://www.flatpress.org
*/
if (!(basename($_SERVER ['PHP_SELF']) == 'admin.php' && // must be admin area
Expand All @@ -15,7 +15,9 @@
return;

function plugin_datechanger_toolbar() {
$time = time();
// $time = time();
// use UTC + timeoffset, coe.date.php. line 64
$time = date_time();

$h = date('H', $time);
$m = date('i', $time);
Expand Down
2 changes: 0 additions & 2 deletions fp-plugins/support/lang/lang.cs-cz.php
Expand Up @@ -34,8 +34,6 @@
'pos_plugins' => '<p class="output"><strong>Activated plugins:</strong> ',
'neg_plugins' => '<p class="output"><strong>Activated plugins:</strong> Could not be determined.</p>',

'output_datechanger' => '<p class="attention"><strong>&#8505;</strong> The active DateChanger plugin skips the corrected timezone in the configuration menu.</p>',

// output "Core files"
'h2_permissions' => 'File and directory permissions',
'h3_core_files' => 'Core',
Expand Down
2 changes: 0 additions & 2 deletions fp-plugins/support/lang/lang.da-dk.php
Expand Up @@ -34,8 +34,6 @@
'pos_plugins' => '<p class="output"><strong>Activated plugins:</strong> ',
'neg_plugins' => '<p class="output"><strong>Activated plugins:</strong> Could not be determined.</p>',

'output_datechanger' => '<p class="attention"><strong>&#8505;</strong> The active DateChanger plugin skips the corrected timezone in the configuration menu.</p>',

// output "Core files"
'h2_permissions' => 'File and directory permissions',
'h3_core_files' => 'Core',
Expand Down
2 changes: 0 additions & 2 deletions fp-plugins/support/lang/lang.de-de.php
Expand Up @@ -34,8 +34,6 @@
'pos_plugins' => '<p class="output"><strong>Activated plugins:</strong> ',
'neg_plugins' => '<p class="output"><strong>Activated plugins:</strong> Could not be determined.</p>',

'output_datechanger' => '<p class="attention"><strong>&#8505;</strong> The active DateChanger plugin skips the corrected timezone in the configuration menu.</p>',

// output "Core files"
'h2_permissions' => 'File and directory permissions',
'h3_core_files' => 'Core',
Expand Down
2 changes: 0 additions & 2 deletions fp-plugins/support/lang/lang.el-gr.php
Expand Up @@ -34,8 +34,6 @@
'pos_plugins' => '<p class="output"><strong>Activated plugins:</strong> ',
'neg_plugins' => '<p class="output"><strong>Activated plugins:</strong> Could not be determined.</p>',

'output_datechanger' => '<p class="attention"><strong>&#8505;</strong> The active DateChanger plugin skips the corrected timezone in the configuration menu.</p>',

// output "Core files"
'h2_permissions' => 'File and directory permissions',
'h3_core_files' => 'Core',
Expand Down
2 changes: 0 additions & 2 deletions fp-plugins/support/lang/lang.en-us.php
Expand Up @@ -34,8 +34,6 @@
'pos_plugins' => '<p class="output"><strong>Activated plugins:</strong> ',
'neg_plugins' => '<p class="output"><strong>Activated plugins:</strong> Could not be determined.</p>',

'output_datechanger' => '<p class="attention"><strong>&#8505;</strong> The active DateChanger plugin skips the corrected timezone in the configuration menu.</p>',

// output "Core files"
'h2_permissions' => 'File and directory permissions',
'h3_core_files' => 'Core',
Expand Down
2 changes: 0 additions & 2 deletions fp-plugins/support/lang/lang.es-es.php
Expand Up @@ -34,8 +34,6 @@
'pos_plugins' => '<p class="output"><strong>Activated plugins:</strong> ',
'neg_plugins' => '<p class="output"><strong>Activated plugins:</strong> Could not be determined.</p>',

'output_datechanger' => '<p class="attention"><strong>&#8505;</strong> The active DateChanger plugin skips the corrected timezone in the configuration menu.</p>',

// output "Core files"
'h2_permissions' => 'File and directory permissions',
'h3_core_files' => 'Core',
Expand Down
2 changes: 0 additions & 2 deletions fp-plugins/support/lang/lang.fr-fr.php
Expand Up @@ -34,8 +34,6 @@
'pos_plugins' => '<p class="output"><strong>Activated plugins:</strong> </p>',
'neg_plugins' => '<p class="output"><strong>Activated plugins:</strong> Could not be determined.</p>',

'output_datechanger' => '<p class="attention"><strong>&#8505;</strong> The active DateChanger plugin skips the corrected timezone in the configuration menu.</p>',

// output "Core files"
'h2_permissions' => 'File and directory permissions',
'h3_core_files' => 'Core',
Expand Down
2 changes: 0 additions & 2 deletions fp-plugins/support/lang/lang.it-it.php
Expand Up @@ -34,8 +34,6 @@
'pos_plugins' => '<p class="output"><strong>Activated plugins:</strong> ',
'neg_plugins' => '<p class="output"><strong>Activated plugins:</strong> Could not be determined.</p>',

'output_datechanger' => '<p class="attention"><strong>&#8505;</strong> The active DateChanger plugin skips the corrected timezone in the configuration menu.</p>',

// output "Core files"
'h2_permissions' => 'File and directory permissions',
'h3_core_files' => 'Core',
Expand Down
2 changes: 0 additions & 2 deletions fp-plugins/support/lang/lang.ja-jp.php
Expand Up @@ -34,8 +34,6 @@
'pos_plugins' => '<p class="output"><strong>Activated plugins:</strong> ',
'neg_plugins' => '<p class="output"><strong>Activated plugins:</strong> Could not be determined.</p>',

'output_datechanger' => '<p class="attention"><strong>&#8505;</strong> The active DateChanger plugin skips the corrected timezone in the configuration menu.</p>',

// output "Core files"
'h2_permissions' => 'File and directory permissions',
'h3_core_files' => 'Core',
Expand Down
2 changes: 0 additions & 2 deletions fp-plugins/support/lang/lang.nl-nl.php
Expand Up @@ -34,8 +34,6 @@
'pos_plugins' => '<p class="output"><strong>Activated plugins:</strong> ',
'neg_plugins' => '<p class="output"><strong>Activated plugins:</strong> Could not be determined.</p>',

'output_datechanger' => '<p class="attention"><strong>&#8505;</strong> The active DateChanger plugin skips the corrected timezone in the configuration menu.</p>',

// output "Core files"
'h2_permissions' => 'File and directory permissions',
'h3_core_files' => 'Core',
Expand Down
2 changes: 0 additions & 2 deletions fp-plugins/support/lang/lang.pt-br.php
Expand Up @@ -34,8 +34,6 @@
'pos_plugins' => '<p class="output"><strong>Activated plugins:</strong> ',
'neg_plugins' => '<p class="output"><strong>Activated plugins:</strong> Could not be determined.</p>',

'output_datechanger' => '<p class="attention"><strong>&#8505;</strong> The active DateChanger plugin skips the corrected timezone in the configuration menu.</p>',

// output "Core files"
'h2_permissions' => 'File and directory permissions',
'h3_core_files' => 'Core',
Expand Down
2 changes: 0 additions & 2 deletions fp-plugins/support/lang/lang.ru-ru.php
Expand Up @@ -34,8 +34,6 @@
'pos_plugins' => '<p class="output"><strong>Activated plugins:</strong> ',
'neg_plugins' => '<p class="output"><strong>Activated plugins:</strong> Could not be determined.</p>',

'output_datechanger' => '<p class="attention"><strong>&#8505;</strong> The active DateChanger plugin skips the corrected timezone in the configuration menu.</p>',

// output "Core files"
'h2_permissions' => 'File and directory permissions',
'h3_core_files' => 'Core',
Expand Down
2 changes: 0 additions & 2 deletions fp-plugins/support/lang/lang.sl-si.php
Expand Up @@ -34,8 +34,6 @@
'pos_plugins' => '<p class="output"><strong>Activated plugins:</strong> ',
'neg_plugins' => '<p class="output"><strong>Activated plugins:</strong> Could not be determined.</p>',

'output_datechanger' => '<p class="attention"><strong>&#8505;</strong> The active DateChanger plugin skips the corrected timezone in the configuration menu.</p>',

// output "Core files"
'h2_permissions' => 'File and directory permissions',
'h3_core_files' => 'Core',
Expand Down
4 changes: 0 additions & 4 deletions fp-plugins/support/plugin.support.php
Expand Up @@ -111,10 +111,6 @@ function main() {
$support ['plugins'] = $lang ['admin'] ['maintain'] ['support'] ['neg_plugins'];
}

if (function_exists("plugin_datechanger_toolbar")) {
$support ['output_datechanger'] = $lang ['admin'] ['maintain'] ['support'] ['output_datechanger'];
}

/**
* prepare output "Core files"
*/
Expand Down
3 changes: 0 additions & 3 deletions fp-plugins/support/tpls/admin.plugin.support.tpl
Expand Up @@ -39,9 +39,6 @@
<li>
{$support.plugins}{$support.output_plugins}
</li>
<li>
{$support.output_datechanger}
</li>
</ul>
<p class="codeblock">[/code]</p>

Expand Down

1 comment on commit cd905da

@azett
Copy link
Member

@azett azett commented on cd905da Mar 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice one!

Please sign in to comment.