psytanium
Forum Replies Created
-
Thanks π
Forum: Plugins
In reply to: [OneSignal - Web Push Notifications] Include Additional Data in notifiactionsMore explanation in image : https://imgur.com/a/IDVWnnA
Forum: Plugins
In reply to: [OneSignal - Web Push Notifications] Include Additional Data in notifiactionsHello,
Any help please ? The app the prepared to receive deep linking notifications, but using the Additional Data fields.
Because the plugin is not the same as OneSignal dashboard, its missing the Additional Data, I need small help to make :
1 – Additional data[Key] = βURLβ
2 – Additional data[value] = Initial launch URL————–
Im using the code provided in the documentation :
<?php
add_filter(‘onesignal_send_notification’, ‘onesignal_send_notification_filter’, 10, 4);
function onesignal_send_notification_filter($fields, $new_status, $old_status, $post) {
/* Goal: We don’t want to modify the original $fields array, because we want the original web push notification to go out unmodified. However, we want to send an additional notification to Android and iOS devices with an additionalData property.
* */
$fields_dup = $fields;
$fields_dup[‘isAndroid’] = true;
$fields_dup[‘isIos’] = true;
$fields_dup[‘isAnyWeb’] = true;
$fields_dup[‘isWP’] = false;
$fields_dup[‘isAdm’] = false;
$fields_dup[‘isChrome’] = false;
// $fields_dup[‘android_channel_id’] = “<CHANNEL ID UUID HERE>”;
$fields_dup[‘data’] = array(“myappurl” => $fields[‘url’]);
/* Important to set web_url to support opening through both mobile and browser*/
$fields_dup[‘web_url’] = $fields_dup[‘url’];
/* Important to unset the URL to prevent opening the browser when the notification is clicked for mobile app users */
unset($fields_dup[‘url’]);
$onesignal_post_url = “https://onesignal.com/api/v1/notifications”;
/* Hopefully OneSignal::get_onesignal_settings(); can be called outside of the plugin */
$onesignal_wp_settings = OneSignal::get_onesignal_settings();
$onesignal_auth_key = $onesignal_wp_settings[‘app_rest_api_key’];
$request = array(“headers” => array(“content-type” => “application/json;charset=utf-8”, “Authorization” => “Basic ” . $onesignal_auth_key), “body” => json_encode($fields_dup), “timeout” => 60);
$response = wp_remote_post($onesignal_post_url, $request);
if (is_wp_error($response) || !is_array($response) || !isset($response[‘body’])) {
$status = $response->get_error_code();
$error_message = $response->get_error_message();
error_log(“There was a ” . $status . ” error returned from OneSignal when sending to mobile users: ” . $error_message);
return;
}
return $fields;
}?>
Forum: Fixing WordPress
In reply to: Can’t login to the backend incorrect passwordTrying PHPMyAdmin and wp_set_password did nothing, i still get wrong username / password.
Regarding the emergency file, off course i uploaded the file lol
- This reply was modified 6 years, 4 months ago by psytanium.
Forum: Plugins
In reply to: [W3 Total Cache] PHP 7.3 compatibilityThe back end crashed when I installed W3 Cache and NextGen Gallery on PHP7.3
Forum: Plugins
In reply to: [Dynamic Select for Contact Form 7] Need more details on how to use itI start by copying the content of contact-form-7-dynamic-select-extension/cf7-dynamic-select-examples.php to functions.php ?
Thanks, that worked.
Appreciated πI can login to cPanel or connect to FTP, I don’t have a hosting problem. I tried to connect to the website from different computer and different ISP. Same problem.
Forum: Plugins
In reply to: [WP Go Maps (formerly WP Google Maps)] How to disable infowindowHi,
I found in Maps > Settings > General Map Settings, the following:
Disable Full Screen Control
Disable StreetView
Disable Zoom Controls
Disable Pan Controls
Disable Map Type Controls
Disable Mouse Wheel Zoom
Disable Mouse Dragging
Disable Mouse Double Click ZoomingI don’t think one of these.
Thanks
Forum: Plugins
In reply to: [New User Approve] Do not send/change passwordyes, big mistake. Users, when approved must receive the approval email with a link to create their password. This is how WordPress works by default.
Forum: Plugins
In reply to: [Contact Form 7] Dynamic number of fieldsThanks buzztone, i was trying to figure what we call this feature. i searched for “conditional logic forms” and found some jquery code to use on Contact Form 7.
But do you know how to modify the plugin without losing the ability to update it later ?
Forum: Plugins
In reply to: [Admin Menu Editor] Allow specific plugin menu to subscribersAs i understand from you, if i get the Pro version, it is possible to :
- Display a specific menu to Subscribers.
- Allow Subscribers to open that menu without getting a permission error.
or I need to hardcode the plugin first ?
Forum: Fixing WordPress
In reply to: htaccess hackedWordPress 4.2.1
.htaccess permission 644
plugins installed:
– Contact Form 7
– Easy FancyBox
– Login Logo
– Under Construction
– Duplicate PostForum: Fixing WordPress
In reply to: javascript from child themei found the script somewhere on this forums, can you tell me what should i replace ? ajax_call_mkto what would it become ?
thank you.