Ismail
Forum Replies Created
-
Forum: Plugins
In reply to: [bbPress Messages] Messages UpgradeHi Stewart,
Sorry but I do not share my email address in public forums. The above link should be used to send me an email and I’ll reply from my email address.
I think you sent me an email last week so I’ll reply to you from there.
Thanks,
SamuelForum: Plugins
In reply to: [bbPress Messages] Messages UpgradeHello Stewart,
Sure, feel free to email me the credentials, make sure you create a new temporary admin user for that. Contact me from https://samelh.com/contact/
Best,
SamuelHello @akgt,
I am sorry about the delay but we’ve just pushed 2.0 online.
You can normally use the basic shortcodes to create a messages link for current user with unread count using:
<a href="[bbpm-messages-link]">Messages ([bbpm-unread-count])</a>
But to make the dynamic form I’d suggest you add this code to your custom plugin or child theme’s functions file:
add_shortcode('bbpm-new-message', 'shortcode_bbpm_new_message'); function shortcode_bbpm_new_message($atts) { $atts = shortcode_atts(array( 'recipient' => 0 ), $atts); extract(array_map('intval', $atts)); if ( !$recipient ) return; $m = bbpm_messages(); if ( !$m->current_user ) return; $chat_id = $m->getPrivateSharedChat($recipient, $m->current_user); if ( !$chat_id ) { $m->set( 'chat_id', $m->set('chat_id', null)->getOrGenerateChatId() )->addChatRecipient(array($m->current_user, $recipient)); $chat_id = $m->get('chat_id'); } if ( class_exists('\BBP_MESSAGES\Inc\Core\Redirect') ) { if ( method_exists('\BBP_MESSAGES\Inc\Core\Redirect', 'parseNotices') ) { \BBP_MESSAGES\Inc\Core\Redirect::parseNotices('bbpm_errors', 'bbpm_add_error'); bbpm_template_errors(); } } ob_start(); ?> <form method="post" action="<?php echo bbpm_messages_url('send', $m->current_user); ?>"> <p class="form-section<?php echo bbpm_has_errors('message') ? ' has-errors' : ''; ?>"> <label for="message"><?php _e('Type a message:', BBP_MESSAGES_DOMAIN); ?></label> <?php echo bbpm_message_field(bbpm_old('message', true)); ?> <?php if ( bbpm_has_errors('message') ) : ?> <?php bbpm_print_error('message'); ?> <?php endif; ?> </p> <p class="form-submit"> <?php wp_nonce_field('send_message', 'bbpm_nonce'); ?> <input type="hidden" name="chat_id" value="<?php echo $chat_id; ?>" /> <input type="submit" name="send_message" value="<?php esc_attr_e('Send', BBP_MESSAGES_DOMAIN); ?>" /> <a href="<?php echo bbpm_messages_url(null, $m->current_user); ?>"><?php _e('Cancel', BBP_MESSAGES_DOMAIN); ?></a> </p> </form> <?php return ob_get_clean(); }
That will produce the
[bbpm-new-message]
shortcode which you can use this way:[bbpm-new-message recipient=5]
where 5 is the user whom current user will be sending messages to.If you’re not sure about the recipient ID then just link current user to
[bbpm-messages-link]new/
where they can search for recipients and compose a message.Hope that helps, let me know how it goes.
Thanks
Best,
Samuel- This reply was modified 8 years ago by Ismail.
Forum: Plugins
In reply to: [bbPress Messages] Messages UpgradeUse [bbpm-contact-link user_id=?] instead of [bbpm-comtact-link user=?]. Shortcodes are updated as well so consult the shortcodes tab for more details.
Best,
SamuelForum: Plugins
In reply to: [bbPress Messages] Messages UpgradeHi Stewart,
This is a weird one, can you help me reproduce this issue? I run tests on different sites including shard hosting and they come up good. When you click the new message link, to which page are you taken?
I think the link does not parse the full permalink to messages page, are you using a shortcode? if so, I believe you’re missing a user_id shortcode attribute..
Please share more details about this issue. Thank you!
Best,
SamuelForum: Plugins
In reply to: [bbPress Messages] error message: “please activate bbPress to use messaging””Hi Stewart,
Please open an independent support topic for this. Yes I just committed the first code release half an hour ago and this is for the lite plugin so far.
Thank you.
Best,
SamuelForum: Plugins
In reply to: [bbPress Mentions Email Notifications] Usernames with spacesHello there,
Usernames were meant to be attached and the regular expression pattern that fetches contents for usernames
bbp_find_mentions_pattern()
/[@]+([A-Za-z0-9-_\.@]+)\b/
(by bbPress) will not take into consideration the spaces.What you can do is you can split the contents into parts and iterate through them to fetch valid usernames, or load the whole blog usernames at first and then match the post content against them. Both ways, that will be costly in terms of server resources and performance.
My apologies about the late answer in advance.
Best,
Samuel- This reply was modified 8 years, 1 month ago by Ismail.
Forum: Plugins
In reply to: [bbPress Mentions Email Notifications] Activation ErrorHello chad,
I am very sorry for the delay to reply, but I updated to a newer version and now you can use it without difficulties as it can work with PHP versions older than
5.4
now.Hope it helps.
Thanks,
SamuelForum: Plugins
In reply to: [bbPress Mentions Email Notifications] Bug fix for [post-link]Hello there wpweaver,
Thank you so much for taking time to report this bug. Yes it makes sense I was pulling the permalink regardless of bbPress API which you pointed out, and apparently
get_the_permalink
defaults the post id parameter (while null) to the global $post that’s how it called to that form page.I am pushing an update shortly. Thanks again and have a good day!
Best,
SamuelForum: Plugins
In reply to: [bbPress Messages] error message: “please activate bbPress to use messaging””Hi Stewart,
Yes the development of 2.0 is still ongoing as it is not really an update but I rebuilt it from scratch.
I’ve been busy with the core past 2 days and now I will spend another 2-3 days to finish the front-end and wrap up everything before it’s done.
Here’s a screenshot: https://i.imgur.com/tR3AUht.png
Please email me as you did before if you have anything.
Best,
SamuelNot meaning to bump this 1-month old thread, but if you look at JetPack contact module source code, https://github.com/Automattic/jetpack/blob/master/modules/contact-form/grunion-contact-form.php#L1959, there’s a filter:
// Is it spam? /** This filter is already documented in modules/contact-form/admin.php */ $is_spam = apply_filters( 'jetpack_contact_form_is_spam', false, $akismet_values );
This can be used to return a an instance of
WP_Error
when the request is spam and you can use this with Google reCaptcha or any other anti-spam plugin:add_filter('jetpack_contact_form_is_spam', function($bool){ if ( $is_spam = true /* is spam */ ) { $bool = new WP_Error('possible_spam', __('Unable to process your submission, you have failed the spam test!', 'my-plugin')) } return $bool; });
And then the form will not be submitted, nor the feedback post type will be inserted, and the form data will be kept within the form.
Check out this plugin I have made for reCaptcha integration: https://github.com/elhardoum/jetpack-recaptcha
Hope that helps.
- This reply was modified 8 years, 1 month ago by Ismail.
Forum: Plugins
In reply to: [bbPress Messages] error message: “please activate bbPress to use messaging””@russ8523 I am very sorry about this. please contact me as soon as you can here https://samelh.com/contact/ and I will see what I can do to make it work on your install, as the update should take a couple of days.
Thank you!
SamuelForum: Reviews
In reply to: [Multisite Auth] Great PluginOh wow, that was a prompt post! lol.
Thank you so much Joshua, without you this plugin wouldn’t be there. I appreciate all your help and your prompt review ??
Have a fun weekend!!
Forum: Plugins
In reply to: [bbPress Messages] error message: “please activate bbPress to use messaging””Hello everyone,
I am very sorry for the delayed answer. I planned an update to this plugin but other schedules kept me delayed.
This plugin is not quite ready for a multisite, although what you can do is install it in the network admin, then go to the site where you want to activate it and I think it should work normally. The point is avoid
I have planned to be working this week on a newer version of this plugin and I’ll have all these features in mind, including Multisite support.
Thanks all for your understanding, and my apologies in advance.
Best,
SamuelForum: Plugins
In reply to: [bbPress Mentions Email Notifications] Using $this When Not in Object ContextHey Joshua!
I am sorry about this. I have updated the main class file doing as you suggested and it should be working well.
TYVM!
Best,
Samuel