Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration Admin Panel #2

Merged
merged 11 commits into from
Nov 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ TODO :

[ ] Why the flag don't show??

[ ] Implement Admin panel
[X] Implement Admin panel

[ ] Add backup restore script

Expand Down
7 changes: 3 additions & 4 deletions conf/index_source.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,16 @@
<a href="/" title="Startseite"><strong>EmailPoubelle</strong> </a>
</header>
<div id="b">
<article>
<h1><?= _('Emails trash free') ?></h1>
<p><?= _('Generate trash emails without lifetime constraint') ?>. </p>
<article style="float:left">
<?php
// Intégration dans votre site :
if (file_exists('../conf.php')) {
include('../conf.php');
} else {
include('../conf-dist.php');
}
include('../emailPoubelle.php');
include('../emailPoubelle.php');
include('../emailPoubelleAdmin.php');
?>
</div>
</div>
Expand Down
11 changes: 9 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@
},
"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",
"ask": {
Expand All @@ -62,8 +71,6 @@
"choices": ["Yes", "No"],
"default": "No"
}


]
}
}
2 changes: 2 additions & 0 deletions scripts/install
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ ynh_abort_if_errors
domain=$YNH_APP_ARG_DOMAIN
path_url=$YNH_APP_ARG_PATH
admin=$YNH_APP_ARG_ADMIN
password=$YNH_APP_ARG_PASSWORD
is_public=$4
final_path=/var/www/$app
db_user=emailPoubelle
Expand Down Expand Up @@ -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 "utilisateurMysql" "$db_user" $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 !)
sudo chmod o-r $final_path/conf.php

Expand Down
2 changes: 1 addition & 1 deletion src/conf-dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
// Email
define('EMAILTAGSUJET', '[EmailPoubelle]');
// From de l'email
define('EMAILFROM', '"NO REPLAY emailPoubelle" <[email protected]>');
define('EMAILFROM', '"NO REPLY emailPoubelle" <[email protected]>');
define('EMAILEND', 'emailPoubelle.zici.fr');

// Alisas interdit : (regex ligne par ligne) - commenter pour désactiver
Expand Down