Misc
SQL
Using the GetGalleryForDisplay stored procedure:
CALL usp_galleries_GetGalleryForDisplay('Y',
'N', -- Exclude images from result: Y or N
'N', -- Exclude videos from result: Y or N
NULL, -- Exclude artworks matching given categories from result: VARCHAR(400)
NULL, -- Include ONLY artworks matching given categories in result: VARCHAR(400)
NULL, -- Exclude artworks matching given tags from result: VARCHAR(400)
NULL, -- Include ONLY artworks matching given tags in result: VARCHAR(400)
NULL, -- Include ONLY artworks matching given search terms in result: VARCHAR(400)
NULL, -- Exclude artworks matching given search terms from result: VARCHAR(400)
NULL, -- Search date limit, exclude all artworks earlier than the given date, DATETIME or NULL
,NULL,NULL,NULL,NULL,NULL,NULL, -- Metrics date limit, ignore all metrics earlier than the given date, DATETIME or NULL
,'antsstyle', -- Username to get profile gallery for: string or NULL
NULL, -- User following ID: integer or NULL, return only artworks from users the given user follows or reblogged by those users
NULL, -- Bookmark folder ID: integer or NULL, return only artworks in the given bookmark folder
NULL, -- Bookmark user ID:
NULL, -- User album ID: integer or NULL, return only artworks in the given album
25, -- SQL LIMIT for results, default 25
0, -- SQL OFFSET for results
NULL, -- Order by attribute: string OR NULL,NULL) see stored procedure for options for this. Default is date desc.
NULL, -- Includes logical operator:
NULL -- Requesting user ID: integer or NULL, the user making the gallery request
)
Get a comma-separated string with all the column names of a given table:
SELECT GROUP_CONCAT(column_name ORDER BY ordinal_position)
FROM information_schema.columns
WHERE table_schema = 'deserted_chateau' AND table_name = 'user_artworks'
Scripts
sudo ./AddEmailTemplate.sh \
--template DesertedChateau-Activation-Email \
--subject "Activate your Deserted Chateau account" \
--html "activation/activation.html" \
--update
sudo ./SendTestActivationEmail.sh \
--email "testuser1@desertedchateau.com" \
--activationcode 123