1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/emailpoubelle_ynh.git synced 2024-09-03 18:26:29 +02:00

Merge pull request #2 from Krakinou/Testing

Integration Admin Panel
This commit is contained in:
Krakinou 2018-11-24 18:50:47 +01:00 committed by GitHub
commit ff93ab7a08
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 8 deletions

View file

@ -30,7 +30,7 @@ TODO :
[ ] Why the flag don't show?? [ ] Why the flag don't show??
[ ] Implement Admin panel [X] Implement Admin panel
[ ] Add backup restore script [ ] Add backup restore script

View file

@ -19,9 +19,7 @@
<a href="/" title="Startseite"><strong>EmailPoubelle</strong> </a> <a href="/" title="Startseite"><strong>EmailPoubelle</strong> </a>
</header> </header>
<div id="b"> <div id="b">
<article> <article style="float:left">
<h1><?= _('Emails trash free') ?></h1>
<p><?= _('Generate trash emails without lifetime constraint') ?>. </p>
<?php <?php
// Intégration dans votre site : // Intégration dans votre site :
if (file_exists('../conf.php')) { if (file_exists('../conf.php')) {
@ -29,7 +27,8 @@
} else { } else {
include('../conf-dist.php'); include('../conf-dist.php');
} }
include('../emailPoubelle.php'); include('../emailPoubelle.php');
include('../emailPoubelleAdmin.php');
?> ?>
</div> </div>
</div> </div>

View file

@ -53,6 +53,15 @@
}, },
"example": "homer" "example": "homer"
}, },
{
"name": "password",
"type": "password",
"ask": {
"en": "Enter a password to access the admin panel",
"fr": "Entrer un mot de passe pour accéder au tableau d'administration"
},
"example": "AveryStrongPassword"
},
{ {
"name": "public_site", "name": "public_site",
"ask": { "ask": {
@ -62,8 +71,6 @@
"choices": ["Yes", "No"], "choices": ["Yes", "No"],
"default": "No" "default": "No"
} }
] ]
} }
} }

View file

@ -15,6 +15,7 @@ ynh_abort_if_errors
domain=$YNH_APP_ARG_DOMAIN domain=$YNH_APP_ARG_DOMAIN
path_url=$YNH_APP_ARG_PATH path_url=$YNH_APP_ARG_PATH
admin=$YNH_APP_ARG_ADMIN admin=$YNH_APP_ARG_ADMIN
password=$YNH_APP_ARG_PASSWORD
is_public=$4 is_public=$4
final_path=/var/www/$app final_path=/var/www/$app
db_user=emailPoubelle db_user=emailPoubelle
@ -95,6 +96,7 @@ ynh_replace_string "// define('DBPASS'," " define('DBPASS'," $f
ynh_replace_string "baseMysql" "$db_user" $final_path/conf.php ynh_replace_string "baseMysql" "$db_user" $final_path/conf.php
ynh_replace_string "utilisateurMysql" "$db_user" $final_path/conf.php ynh_replace_string "utilisateurMysql" "$db_user" $final_path/conf.php
ynh_replace_string "motdepassedefou" "$db_pwd" $final_path/conf.php ynh_replace_string "motdepassedefou" "$db_pwd" $final_path/conf.php
ynh_replace_string "define('ADMIN_PASSWORD', 'admin');" "define('ADMIN_PASSWORD', '$password');" $final_path/conf.php
#setting conf file not world-readable (dude, there is a plain-text password !) #setting conf file not world-readable (dude, there is a plain-text password !)
sudo chmod o-r $final_path/conf.php sudo chmod o-r $final_path/conf.php

View file

@ -51,7 +51,7 @@ define('URLPAGE', 'http://'.$_SERVER["SERVER_NAME"].$_SERVER["SCRIPT_NAME"]);
// Email // Email
define('EMAILTAGSUJET', '[EmailPoubelle]'); define('EMAILTAGSUJET', '[EmailPoubelle]');
// From de l'email // From de l'email
define('EMAILFROM', '"NO REPLAY emailPoubelle" <emailpoubelle@exemple.com>'); define('EMAILFROM', '"NO REPLY emailPoubelle" <emailpoubelle@exemple.com>');
define('EMAILEND', 'emailPoubelle.zici.fr'); define('EMAILEND', 'emailPoubelle.zici.fr');
// Alisas interdit : (regex ligne par ligne) - commenter pour désactiver // Alisas interdit : (regex ligne par ligne) - commenter pour désactiver