Craig Tucker
Forum Replies Created
-
AuthorPosts
-
Craig TuckerParticipant
What I see is that you have moved all messages to their own table: wp_fep_messages
That changes a lot. So for Gravity Forms what I need to understand is how attachments are assigned to messages now.
For OpenEMR since all messages are in their own table now I will need to completely re write the query for that table obviously. I am wondering about your use of the wp_postmeta table. In the old system it was being used to track participants, deletions of messages with pm_delete and _fep_delete_by_; then clearing of messages with pm_clear.
Since we are no longer using the post table, p.post_type = ‘fep_message’ is not necessary. That should simplify the query.
Am I on the right track?
Craig TuckerParticipantAnd to clarify, the problem I am having with GravityForms is inserting the PDF of the form with the message. The Message is posting fine. But my pdf file of the form is not inserted anymore. So I am supposing that the field that held the attachment data has changed in some way?
And the problem with the OpenEMR is that I am not able to grab new messages and pull them into OpenEMR anymore. So I imagine the problem is that one of these fields or functions has changed or no longer exists or there is a new dependency that I need to include in my query:
fep_get_option
fep_get_userdata
fep_send_messagefep_message
_fep_participants
_fep_delete_by_
_fep_participantsCraig TuckerParticipantPlease go to Front End PM PRO > Settings > Licenses
Then remove your license key and save changes, again input your license key and again save changes.This worked for me.
Thanks,
CraigCraig TuckerParticipantThe appropriate roles are selected. One anomaly may be that I added the administrator role after the first post of the announcement. So perhaps that is an issue.
Craig TuckerParticipantThat does it thanks.
Craig TuckerParticipantI suppose you mean:
if ($post->post_type = ‘fep_message’ && $post->post_parent != 0){
That will be better. Thanks.
Craig TuckerParticipantThis works to refresh the thread and revive the deleted participants if placed in functions.php
add_action('save_post', 'undelete_thread'); function undelete_thread($post_id) { $post = get_post($post_id); if ($post->post_type = 'fep_message'){ $participants = fep_get_participants( $post->post_parent ); foreach( $participants as $participant ) { delete_post_meta($post->post_parent,'_fep_delete_by_'. $participant ); } } }
Craig TuckerParticipantA better method perhaps:
$participants = fep_get_participants( $post->post_parent ); foreach( $participants as $participant ) { $query ="SELECT meta_id FROM wp_postmeta WHERE post_id = %s and <code>meta_key</code> = '_fep_delete_by_%s'"; $queryp1 = $wpdb->prepare($query, array($post->post_parent, $participant)); if (!empty($queryp1)) { delete_post_meta($queryp1,'_fep_delete_by_' . $participant); } }
Craig TuckerParticipantI said string when I should have said thread but I think you can get the idea.
Craig TuckerParticipantWorks great. Thanks so much.
Craig TuckerParticipantSounds great. I suppose I could just put it in a child theme. I should do that.
Craig TuckerParticipantIt would be nice to have this as an option in settings. I was trying to do this with a custom CSS but it is unreliable. Eg:
div.fep-message-content.fep-message-content-2258.fep-hide-if-js{
display: block !important;
}Removing line 17 works better but will be lost on update.
Custom CSS will last through the update but is not so good.
Craig TuckerParticipantThanks. I have updated my file on github to include a new routine for multiple admins.
Craig TuckerParticipantI found another issue. I need to fix the method for verifying authorized admins. The variable $admin_user_login with Cartpauj PM was associated this wise:
$adminOps = get_option('cartpaujPM_options'); $admin_user_login = $adminOps['admin_user_login'];
In Cartpauj PM there is only one admin so this is straightforward. But in Frontend PM you can have multiple authorized admins. So I need to develop a different procedure to verify authorized admins. I see you have a function “fep_get_option”. Can I use this to return an array of the ‘username’ entries for admins entered? If so how? With this array I can check if
wp_authenticate($_REQUEST['login']
is in the array. That should work.Craig TuckerParticipantSorry I was not clear about where I needed the attachment. I do not need it with the message so my method has worked fine. So, to integrate with OpenEMR and the Sunset Patient Portal I made the following modifications to the webserve.php file:
https://github.com/CraigT543/Sunset-Patient-Portal-with-FrontendPM/blob/master/FrontendPMmods.php
This works to replace cartpauj-pm with Frontend PM as the messaging application for OpenEMR.
-
AuthorPosts