aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-10-08 11:25:08 +1100
committerredmatrix <redmatrix@redmatrix.me>2015-10-08 11:25:08 +1100
commit3377b299572f3856ebba4c3375ef7d7136fa3666 (patch)
tree3c7241dbc9667a9a73694bf11c8acfea11126995
parente95753b1842b32fd0ae9565d31126b7341602906 (diff)
parent8bf45536d307c11980d11c53edeef997b6d70954 (diff)
downloadvolse-hubzilla-3377b299572f3856ebba4c3375ef7d7136fa3666.tar.gz
volse-hubzilla-3377b299572f3856ebba4c3375ef7d7136fa3666.tar.bz2
volse-hubzilla-3377b299572f3856ebba4c3375ef7d7136fa3666.zip
Merge pull request #395 from anaqreon/uexport
Add message about exporting by year/month to uexport
-rw-r--r--mod/uexport.php17
-rw-r--r--view/tpl/uexport.tpl7
2 files changed, 22 insertions, 2 deletions
diff --git a/mod/uexport.php b/mod/uexport.php
index fbbe9953b..4e781fee1 100644
--- a/mod/uexport.php
+++ b/mod/uexport.php
@@ -41,12 +41,25 @@ function uexport_init(&$a) {
}
function uexport_content(&$a) {
+
+ $y = datetime_convert('UTC',date_default_timezone_get(),'now','Y');
+
+ $yearurl = z_root() . '/uexport/' . $y;
+ $janurl = z_root() . '/uexport/' . $y . '/1';
+ $impurl = '/import_items';
$o = replace_macros(get_markup_template('uexport.tpl'), array(
'$title' => t('Export Channel'),
'$basictitle' => t('Export Channel'),
- '$basic' => t('Export your basic channel information to a small file. This acts as a backup of your connections, permissions, profile and basic data, which can be used to import your data to a new hub, but does not contain your content.'),
+ '$basic' => t('Export your basic channel information to a file. This acts as a backup of your connections, permissions, profile and basic data, which can be used to import your data to a new server hub, but does not contain your content.'),
'$fulltitle' => t('Export Content'),
- '$full' => t('Export your channel information and all the content to a JSON backup. This backs up all of your connections, permissions, profile data and all of your content, but is generally not suitable for importing a channel to a new hub as this file may be VERY large. Please be patient - it may take several minutes for this download to begin.')
+ '$full' => t('Export your channel information and recent content to a JSON backup that can be restored or imported to another server hub. This backs up all of your connections, permissions, profile data and several months of posts. This file may be VERY large. Please be patient - it may take several minutes for this download to begin.'),
+ '$by_year' => t('Export your posts from a given year.'),
+
+ '$extra' => t('You may also export your posts and conversations for a particular year or month. Adjust the date in your browser location bar to select other dates. If the export fails (possibly due to memory exhaustion on your server hub), please try again selecting a more limited date range.'),
+ '$extra2' => sprintf( t('To select all posts for a given year, such as this year, visit <a href="%1$s">%2$s</a>'),$yearurl,$yearurl),
+ '$extra3' => sprintf( t('To select all posts for a given month, such as January of this year, visit <a href="%1$s">%2$s</a>'),$janurl,$janurl),
+ '$extra4' => sprintf( t('These content files may be imported or restored by visiting <a href="%1$s">%2$s</a> on any site containing your channel. For best results please import or restore these in date order (oldest first).'),$impurl,$impurl)
+
));
return $o;
}
diff --git a/view/tpl/uexport.tpl b/view/tpl/uexport.tpl
index b9a1b9572..7eafd97a6 100644
--- a/view/tpl/uexport.tpl
+++ b/view/tpl/uexport.tpl
@@ -8,5 +8,12 @@
<p><b><a href="uexport/complete">{{$fulltitle}}</a></b></p>
<p>{{$full}}</p>
+
+ <p>{{$extra}}</p>
+ <p>{{$extra2}}</p>
+ <p>{{$extra3}}</p>
+
+ <p>{{$extra4}}</p>
+
</div>
</div>