Skip to content

Commit

Permalink
Merge pull request #13 from vickzkater/v2.0.2
Browse files Browse the repository at this point in the history
v2.0.2
  • Loading branch information
vickzkater authored Aug 8, 2020
2 parents 360aacb + 9dd4a05 commit 2e9a5ca
Show file tree
Hide file tree
Showing 16 changed files with 128 additions and 5,117 deletions.
15 changes: 0 additions & 15 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -100,21 +100,6 @@ FACEBOOK_CLIENT_ID=
FACEBOOK_CLIENT_SECRET=
FACEBOOK_CALLBACK_URL="${APP_URL_SITE}/auth/facebook/callback"

TWITTER_CLIENT_MODULE=false
TWITTER_CLIENT_ID=
TWITTER_CLIENT_SECRET=
TWITTER_CALLBACK_URL="${APP_URL_SITE}/auth/twitter/callback"

INSTAGRAM_CLIENT_MODULE=false
INSTAGRAM_CLIENT_ID=
INSTAGRAM_CLIENT_SECRET=
INSTAGRAM_CALLBACK_URL="${APP_URL_SITE}/auth/instagram/callback"

LINKEDIN_CLIENT_MODULE=false
LINKEDIN_CLIENT_ID=
LINKEDIN_CLIENT_SECRET=
LINKEDIN_CALLBACK_URL="${APP_URL_SITE}/auth/linkedin/callback"

FCM_SERVER_KEY=
FCM_SENDER_ID=

Expand Down
7 changes: 0 additions & 7 deletions .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,3 @@ Header always set Content-Security-Policy: upgrade-insecure-requests
RewriteEngine On
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php72” package as the default “PHP” programming language.
<IfModule mime_module>
AddHandler application/x-httpd-ea-php72 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
10 changes: 0 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,16 +169,6 @@ Next, setup environment configuration in `.env` file
- Set `FACEBOOK_CLIENT_SECRET` for set FACEBOOK API Authentication
- Set `FACEBOOK_CALLBACK_URL` for set FACEBOOK API Authentication Callback URL

- Set `TWITTER_CLIENT_MODULE` for enable/disable TWITTER API Authentication
- Set `TWITTER_CLIENT_ID` for set TWITTER API Authentication
- Set `TWITTER_CLIENT_SECRET` for set TWITTER API Authentication
- Set `TWITTER_CALLBACK_URL` for set TWITTER API Authentication Callback URL

- Set `LINKEDIN_CLIENT_MODULE` for enable/disable LINKEDIN API Authentication
- Set `LINKEDIN_CLIENT_ID` for set LINKEDIN API Authentication
- Set `LINKEDIN_CLIENT_SECRET` for set LINKEDIN API Authentication
- Set `LINKEDIN_CALLBACK_URL` for set LINKEDIN API Authentication Callback URL

- Set `FCM_SERVER_KEY` for set Firebase Push Notification
- Set `FCM_SENDER_ID` for set Firebase Push Notification

Expand Down
7 changes: 6 additions & 1 deletion VERSION.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
## Version 2.0.2
### Changelog
- Update minor in MailchimpHelper
- Fix issue update config

## Version 2.0.1
### Changelog
- Add support auth for Guzzle functions
- Add support Session Driver Database
- Add security update: if password has been changed, then force user to re-login
- Add security update: if the password has been changed, then force the user to re-login
- Add feature logout from all sessions

## Version 2.0.0
Expand Down
30 changes: 24 additions & 6 deletions app/Http/Controllers/Admin/system/ConfigController.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,13 +168,31 @@ public function update(Request $request)
}
$data->help = $help;

$meta_keywords = Helper::validate_input_text($request->meta_keywords);
if (!$meta_keywords) {
return back()
->withInput()
->with('error', lang('Invalid format for #item', $this->translation, ['#item' => ucwords(lang('meta keywords', $this->translation))]));
$data->powered = Helper::validate_input_text($request->powered);

if ($request->powered_url) {
$powered_url = Helper::validate_input_url($request->powered_url);
if (!$powered_url) {
return back()
->withInput()
->with('error', lang('Invalid format for #item', $this->translation, ['#item' => (lang('Powered URL', $this->translation))]));
}
$data->powered_url = $powered_url;
} else {
$data->powered_url = null;
}

if ($request->meta_keywords) {
$meta_keywords = Helper::validate_input_text($request->meta_keywords);
if (!$meta_keywords) {
return back()
->withInput()
->with('error', lang('Invalid format for #item', $this->translation, ['#item' => ucwords(lang('meta keywords', $this->translation))]));
}
$data->meta_keywords = $meta_keywords;
} else {
$data->meta_keywords = null;
}
$data->meta_keywords = $meta_keywords;

$meta_title = Helper::validate_input_text($request->meta_title);
if (!$meta_title) {
Expand Down
38 changes: 38 additions & 0 deletions app/Http/Controllers/DevController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

class DevController extends Controller
{
/**
* GOSMS
*/
public function gosms_send(Request $request)
{
// SET THE PARAMETERS
Expand All @@ -25,6 +28,9 @@ public function gosms_send(Request $request)
dd($result); // Boolean
}

/**
* MAILCHIMP
*/
public function mailchimp_list()
{
$result = MailchimpHelper::list();
Expand Down Expand Up @@ -87,4 +93,36 @@ public function mailchimp_view_tags_in_contact(Request $request)

dd($result);
}

/**
* EMAIL
*/
/**
* EMAIL
*/
public function email_send(Request $request)
{
// GET THE DATA
$data = '';

// SET EMAIL SUBJECT
$subject_email = '';

$email_address = $request->email;
if (!$email_address) {
// rendering email in browser
// return (new SyllabusRequest($data, $subject_email))->render();
}

try {
// SEND EMAIL
// Mail::to($email_address)->send(new SyllabusRequest($data, $subject_email));
} catch (\Exception $e) {
// Debug via $e->getMessage();
dd($e->getMessage());
return "We've got errors!";
}

dd('Successfully sent email to ' . $email_address);
}
}
9 changes: 6 additions & 3 deletions app/Libraries/MailchimpHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,15 @@ public static function hashing_subscribe($email_address)
return md5(strtolower($email_address));
}

public static function add_subscribe($email_address)
public static function add_subscribe($email_address, $merge = [], $confirm = false)
{
// Adds/updates an existing subscriber:
$list_id = env('MC_LIST_ID');
$merge = [];
$confirm = false;
// $merge = [
// 'FNAME' => 'Vicky',
// 'LNAME' => 'Budiman',
// 'PHONE' => '+628123123123'
// ];
Mailchimp::subscribe($list_id, $email_address, $merge, $confirm);
// Use $confirm = false to skip double-opt-in if you already have permission.
// This method will update an existing subscriber and will not ask an existing subscriber to re-confirm.
Expand Down
34 changes: 32 additions & 2 deletions app/Libraries/TheHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public static function validate_input_email($string)
}

/**
* Allow all characters within "FILTER_SANITIZE_MAGIC_QUOTES"
* Allow all characters within "FILTER_SANITIZE_ADD_SLASHES"
* If ($no_backslash == false) and it contains symbols: single quote (') and double quote (")
* Then it will add symbol backslash (\) before those symbols
*
Expand All @@ -124,7 +124,7 @@ public static function validate_input_text($string, $htmlspecialchars = false, $
if ($string == '' || !$string) {
return null;
}
$val = filter_var($string, FILTER_SANITIZE_MAGIC_QUOTES);
$val = filter_var($string, FILTER_SANITIZE_ADD_SLASHES);
if ($no_backslash) {
$val = stripslashes($val);
}
Expand Down Expand Up @@ -626,4 +626,34 @@ public static function check_remote_file($url)
return false;
}
}

/**
* Get family name (firstname & lastname)
*
* @param String $fullname required
* @param String $default_lastname optional
*
* @return Object
*/
public static function get_family_name($fullname, $default_lastname = null)
{
$arr_names = explode(' ', $fullname);
if (count($arr_names) == 1) {
$lastname = $arr_names[0];
if($default_lastname){
$lastname = $default_lastname;
}
$firstname = $arr_names[0];
} else {
$lastname = $arr_names[(count($arr_names) - 1)];
array_pop($arr_names);
$firstname = implode(' ', $arr_names);
}

$obj = new \stdClass();
$obj->firstname = $firstname;
$obj->lastname = $lastname;

return $obj;
}
}
7 changes: 0 additions & 7 deletions public/.htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,3 @@
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php72” package as the default “PHP” programming language.
<IfModule mime_module>
AddHandler application/x-httpd-ea-php72 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
Binary file added public/uploads/product/1593851803-product.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/uploads/product/1593851888-product.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/uploads/product/1593851957-product.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 2e9a5ca

Please sign in to comment.