1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/lionwiki-t2t_ynh.git synced 2024-09-03 19:36:27 +02:00

trying to fix #24 (can't upgrade/replace main.txt)

This commit is contained in:
farvardin 2024-02-07 14:23:10 +01:00
parent dcba7692e4
commit e2f65a84cd
4 changed files with 28 additions and 6 deletions

View file

@ -22,11 +22,11 @@ $PROTECTED_READ = false;
// Some of those templates are using markitup, a convenient and advanced toolbar to edit the wiki. // Some of those templates are using markitup, a convenient and advanced toolbar to edit the wiki.
//$TEMPLATE = 'templates/minimaxing/minimaxing.html'; // this one is the default skin for lionwiki-t2t //$TEMPLATE = 'templates/minimaxing/minimaxing.html'; // this one was once the default skin for lionwiki-t2t
//$TEMPLATE = 'templates/minimaxing/minimaxing_links.html'; // this one is for a basic landpage without menu //$TEMPLATE = 'templates/minimaxing/minimaxing_links.html'; // this one is for a basic landpage without menu
//$TEMPLATE = 'templates/red.html'; //$TEMPLATE = 'templates/red.html';
//$TEMPLATE = 'templates/txt2tags/txt2tags.html'; // used on the txt2tags wiki //$TEMPLATE = 'templates/txt2tags/txt2tags.html'; // used once on the old txt2tags wiki (now offline)
//$TEMPLATE = 'templates/ElectricObsidian/ElectricObsidian.html'; // dark theme //$TEMPLATE = 'templates/ElectricObsidian/ElectricObsidian.html'; // dark theme
@ -43,7 +43,7 @@ $PROTECTED_READ = false;
//$TEMPLATE = 'templates/newspaper/newspaper.html'; // light theme //$TEMPLATE = 'templates/newspaper/newspaper.html'; // light theme
//$TEMPLATE = 'templates/stellar/index.html'; // in development //$TEMPLATE = 'templates/stellar/index.html'; // in development
//$TEMPLATE = 'templates/editorial/index0.html'; // in development //$TEMPLATE = 'templates/editorial/index0.html'; // in development
//$TEMPLATE = 'templates/blazekiss/blazekiss.html'; //$TEMPLATE = 'templates/blazekiss/blazekiss.html'; // deprecated
//$TEMPLATE = 'templates/sissou.html'; //$TEMPLATE = 'templates/sissou.html';
//$TEMPLATE = 'templates/fravashyo/fravashyo.html'; //$TEMPLATE = 'templates/fravashyo/fravashyo.html';
//$TEMPLATE = 'templates/dandelion.html'; //$TEMPLATE = 'templates/dandelion.html';
@ -58,7 +58,9 @@ $PROTECTED_READ = false;
//$TEMPLATE = 'templates/light.html'; //$TEMPLATE = 'templates/light.html';
//$TEMPLATE = 'templates/print.html'; //$TEMPLATE = 'templates/print.html';
//$TEMPLATE = 'templates/paper/paper.html'; //$TEMPLATE = 'templates/paper/paper.html';
$TEMPLATE = 'templates/mimoza/mimoza.html'; $TEMPLATE = 'templates/mimoza/mimoza.html'; // current default template
//$TEMPLATE = 'templates/cafe.html';
// $TEMPLATE = 'templates/smallweb/smallweb.html'; // not finished and not very good
//$TEMPLATE = 'templates/wikiss.html'; //$TEMPLATE = 'templates/wikiss.html';
//$TEMPLATE = 'templates/skeleton/skeleton.html'; // deprecated //$TEMPLATE = 'templates/skeleton/skeleton.html'; // deprecated
//$TEMPLATE = 'templates/simple.html'; // //$TEMPLATE = 'templates/simple.html'; //

View file

@ -232,6 +232,17 @@ h6:hover span.par-edit {
font-size: small; font-size: small;
} }
/* makes the top edit link invisible */
.editlink a {
text-decoration: none;
color: var(--couleur-primaire);
}
.editlink2 a {
text-decoration: none;
color: #eee;
}
/* Progress bar */ /* Progress bar */
progress { progress {
color: var(--couleur-primaire); color: var(--couleur-primaire);

View file

@ -35,6 +35,13 @@
<link rel="stylesheet" href="templates/minimaxing/minimaxing.css" /> <link rel="stylesheet" href="templates/minimaxing/minimaxing.css" />
<script src="templates/js/less.js" type="text/javascript"></script> <script src="templates/js/less.js" type="text/javascript"></script>
<!-- Remove "alternate" in one of the style to make it default -->
<link rel="alternate stylesheet" type="text/css" media="screen" title="theme01 (Brick Red)" href="templates/minimaxing/minimaxing_theme01.css" />
<link rel="alternate stylesheet" type="text/css" media="screen" title="theme02 (Marron)" href="templates/minimaxing/minimaxing_theme02.css" />
<link rel="alternate stylesheet" type="text/css" media="screen" title="terminal solarized" href="templates/minimaxing/terminal_solarized.css" />
<script type="text/javascript" > <script type="text/javascript" >
<!-- <!--
$(document).ready(function() { $(document).ready(function() {
@ -150,6 +157,7 @@ $(document).ready(function() {
{SEARCH_FORM}{SEARCH_INPUT}{SEARCH_SUBMIT}{/SEARCH_FORM} {SEARCH_FORM}{SEARCH_INPUT}{SEARCH_SUBMIT}{/SEARCH_FORM}
<br /> <br />
Design CC-BY-SA based on <a href="https://html5up.net/minimaxing">Minimaxing</a>. Powered by <a href="https://sourceforge.net/p/lionwiki-t2t/code/">LionWiki-t2t</a> Design CC-BY-SA based on <a href="https://html5up.net/minimaxing">Minimaxing</a>. Powered by <a href="https://sourceforge.net/p/lionwiki-t2t/code/">LionWiki-t2t</a>
<br /> {RSS}
</div> </div>
</div> </div>

View file

@ -18,7 +18,7 @@ ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
if [[ -z "${password:-}" ]] || [[ -z "${color:-}" ]] || [[ -z "${wiki:-}" ]]; then if [[ -z "${password:-}" ]] || [[ -z "${color:-}" ]] || [[ -z "${wiki:-}" ]]; then
password=$( grep -oP '^\$PASSWORD = sha1\(\"\K.*(?=\"\);$)' "$install_dir/config.php") password=$( grep -oP '^\$PASSWORD = sha1\(\"\K.*(?=\"\);$)' "$install_dir/config.php")
wiki=$( grep -oP '^\$WIKI_TITLE = '"'\K.*(?=';)" "$install_dir/config.php") wiki=$( grep -oP '^\$WIKI_TITLE = '"'\K.*(?=';)" "$install_dir/config.php")
color=$(grep -A1 'For YunoHost config' "$install_dir/templates/minimaxing/minimaxing.css" | grep -oP '^/\* @fg: #\K.*(?=;)') color=$(grep -A1 'For YunoHost config' "$install_dir/templates/minimaxing/minimaxing.css" | grep -oP '^/\* @fg: #\K.*(?=;)'|| true)
if [[ -z "$password" ]] || [[ -z "$wiki" ]] || [[ -z "$color" ]]; then if [[ -z "$password" ]] || [[ -z "$wiki" ]] || [[ -z "$color" ]]; then
yunohost_app="yunohost app" yunohost_app="yunohost app"
@ -50,7 +50,8 @@ ynh_app_setting_set --app="$app" --key=color --value="$color"
ynh_script_progression --message="Upgrading source files..." --weight=3 ynh_script_progression --message="Upgrading source files..." --weight=3
# Download, check integrity, uncompress and patch the source from app.src # Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep="config.php pheditor.php menu.php config.t2t" ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep="config.php pheditor.php menu.php config.t2t var/pages/main.txt var/pages/todo.txt var/pages/sandbox.txt var/pages/links.txt var/pages/admin.txt"
chmod -R o-rwx "$install_dir" chmod -R o-rwx "$install_dir"
chown -R "$app:www-data" "$install_dir" chown -R "$app:www-data" "$install_dir"