")
@login_required
@@ -707,7 +833,6 @@ def export_member(mid):
def export_system():
db = get_db()
members = db.execute("SELECT * FROM member").fetchall()
- groups_r = db.execute("SELECT * FROM groups").fetchall()
data = {}
data["members"] = []
@@ -718,6 +843,15 @@ def export_system():
groups = generate_json_groups()
data["groups"] = groups
+ front_log = generate_json_frontlog()
+ data["front_log"] = front_log
+
+ sections = generate_json_sections()
+ data["sections"] = sections
+
+ pages = generate_json_pages()
+ data["pages"] = pages
+
filename = "myriad_system_textonly.json"
file_full_path = current_app.config["TMP_FOLDER"] + "/" + filename
with open(file_full_path, 'w') as f:
@@ -733,6 +867,7 @@ def export_system_full():
icons = db.execute("SELECT icon_location FROM icons").fetchall()
blinkies = db.execute("SELECT blinkie_location FROM blinkies").fetchall()
stamps = db.execute("SELECT stamp_location FROM stamps").fetchall()
+ misc = os.listdir(current_app.config["MISC_UPLOAD_FOLDER"])
data = {}
data["members"] = []
@@ -743,6 +878,15 @@ def export_system_full():
groups = generate_json_groups()
data["groups"] = groups
+ front_log = generate_json_frontlog()
+ data["front_log"] = front_log
+
+ sections = generate_json_sections()
+ data["sections"] = sections
+
+ pages = generate_json_pages()
+ data["pages"] = pages
+
filename = "myriad_system.json"
file_full_path = current_app.config["TMP_FOLDER"] + "/" + filename
with open(file_full_path, 'w') as f:
@@ -761,6 +905,8 @@ def export_system_full():
for stamp in stamps:
sname = stamp[0]
zipf.write(current_app.config["STAMPS_UPLOAD_FOLDER"] + "/" + sname)
+ #for misc_file in misc:
+ #zipf.write(current_app.config["MISC_UPLOAD_FOLDER"] + "/" + misc_file)
return send_file("static/tmp/"+zip_name, as_attachment=True)
diff --git a/myriad/schema.sql b/myriad/schema.sql
index f5ef3db..729e943 100644
--- a/myriad/schema.sql
+++ b/myriad/schema.sql
@@ -9,6 +9,7 @@ DROP TABLE IF EXISTS stamps;
DROP TABLE IF EXISTS front_log;
DROP TABLE IF EXISTS sections;
DROP TABLE IF EXISTS pages;
+DROP TABLE IF EXISTS custom_urls;
CREATE TABLE user (
id INTEGER PRIMARY KEY AUTOINCREMENT,
@@ -110,4 +111,11 @@ CREATE TABLE pages (
title TEXT,
content TEXT,
position INTEGER
+);
+
+CREATE TABLE custom_urls (
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
+ member_id INTEGER NOT NULL,
+ custom_url TEXT,
+ FOREIGN KEY (member_id) REFERENCES member (id)
);
\ No newline at end of file
diff --git a/myriad/templates/manage/admin.html b/myriad/templates/manage/admin.html
index 9296651..fecb7cf 100644
--- a/myriad/templates/manage/admin.html
+++ b/myriad/templates/manage/admin.html
@@ -47,24 +47,12 @@
-
- Export
- Export entire system as JSON (without images)
- Export entire system as ZIP (with images)
-
+ Export & Import
+ Export entire system as ZIP
-
- Import system from JSON
- You must only run full system imports on a fresh database
-
-
-
-
- Import system from ZIP
- You must only run full system imports on a fresh database
+ Import system from previous Myriad export
+ This will replace existing data
+ Be sure to upload the .zip folder as it was downloaded without unzipping it
-
{% endblock %}
\ No newline at end of file
diff --git a/myriad/templates/page.html b/myriad/templates/page.html
index 8cff725..ee237ee 100644
--- a/myriad/templates/page.html
+++ b/myriad/templates/page.html
@@ -58,13 +58,6 @@
{{ section[3]|safe }}
{% endfor %}
-
-
{% if member[13] %}
{% if blinkies|length > 0 %}
{% if member[18] %}{{ member[18] }}
{% endif %}
@@ -101,6 +94,16 @@
{% endif %}
+ {% if member[15] %}
+ {% if groups|length > 0 %}
+ {{ member[20] }}
+ {% for gr in groups %}
+ {% set group = get_group(gr[1]) %}
+ >> {{ group[1] }}
+ {% endfor %}
+ {% endif %}
+ {% endif %}
+
{% endif %}