Support has been upgraded!
The Support Forum is closed. Not to worry! Providing the top quality support you expect and we're known for will continue! We're not ending support, just changing where you submit requests. This will provide you with the best experience possible.
Premium Support
Have you purchased an addon for Connections such as one of our premium templates or extensions with a valid license and you need help?
Please open a Support Ticket in your user account.
Free Support
Are you using the free Connections plugin? Don't worry, you are still very important to us! We are still providing you with the same high quality support that we're known for.
Please open a new support topic in the WordPress support forums for Connections.
- This topic has 7 replies, 2 voices, and was last updated 11 years, 9 months ago by
Steven Zahm.
-
AuthorPosts
-
10/27/2014 at 12:02 pm #308199
Rick Wielopolski
ParticipantHi…we decided on using Connections and Extension Pro Pack for our Church Directory. Looks pretty good in testing but cannot solve two request even though I tried various methods in your forums.
1.) Need to remove the Organization and Department fields in “Form” to prevent confusion.
2.) Need to force Individual and Private entry types to keep the self-submitting data clean.Please indicate what files need to be modified in addition to any code snippets.
We are using WP 3.92 and your latest software/extensions with a Weaver II Theme.
Thanks!
10/28/2014 at 12:22 pm #308362Steven Zahm
Keymaster**@ Rick **
re: Need to remove the Organization and Department fields in “Form” to prevent confusion.
This can only be done with CSS. Add the following to the theme’s custom CSS area:div#cn-metabox-section-organization, div#cn-metabox-section-department { display: none; }re: Need to force Individual and Private entry types to keep the self-submitting data clean.
Go to the Connections : Settings admin page and click the Form tab. Disable the “Permit the user to select the entry type to be submitted.” option and set the “Default Entry Type” option to Individual.Unfortunately there is not a real good method to force private. This is within Form where you want to change it, right?
The only thing I can think of is adding a filter that will always force the entry to private not matter what the user sets. Will that be a workable option for you?
10/28/2014 at 1:49 pm #308388Rick Wielopolski
ParticipantI had already tried the CSS change above by inserting it into the Weaver II Custom CSS GUI field which should updated style.css. It did not work and assume this is the theme you wanted me to update. (It will also auto-generate the style.min.css). Debugging through the browser proves that removal of the 2 HTML “divs” renders correctly, however, I cannot find the file in your application to “comment-out” the code that creates them. I am capable of editing CSS, PHP, etc. Can this be accomplished another way?
Also, I set “individual” in the Form but need “private” concurrently. How would I incorporate a filter?
Thanks!
10/29/2014 at 10:22 am #308428Steven Zahm
Keymaster@ Rick
It is possible that the theme is loading its custom CSS before Form loads it’s CSS. I would need a link to that page to know for sure and to determine why the CSS does not work. Maybe try added the
!importantclause:div#cn-metabox-section-organization, div#cn-metabox-section-department { display: none !important; }You are using the latest version of Form, yes? That would be another reason the CSS would not work.
I do not recommend removing it in PHP because then after any updates you’ll have to redo the change. But if you want to you need to remove those fields from the array in the
connections_form.phpfile starting on line 1428.Here’s the filter that will set every entry to private whenever an entry is added/updated regardless of what the setting is:
Install the Code Snippets plugin.
Add a new snippet with the following code:
function cn_force_private( $entry ) { $entry->setVisibility( 'private' ); return $entry; } add_filter( 'cn_pre_process_add-entry', 'cn_force_private' ); add_filter( 'cn_pre_process_update-entry', 'cn_force_private' );Save and activate the new snippet.
Hope that helps!
10/29/2014 at 12:28 pm #308446Rick Wielopolski
ParticipantThank you for your prompt response Steve!
First, the “display: none !important;” worked fine and the fields are removed from Form. (I actually tried this once before but must have fat-fingered it. Sorry about the confusion).
Is there a way to easily do the same for the User’s Admin editing screen? WP allows them access in the top menu and the options are overwhelming for most folks. I’d love to disable it and force them to only use Form.
Secondly, the filter is definitely cool. It does force the overall setting to “private”, however, not any of the individual fields (phone, email, etc.). If the fields remain set to “public”, will it affect any viewing, etc. since the overall view is private and Login is required? BTW…this works in Form editing as well as Admin editing.
One issue, we now will not have a way to allow “unlisted” as a selection. Do you have an addition to the filter that would accomplish this last change?
Thanks again…Rick
10/29/2014 at 1:19 pm #308455Steven Zahm
Keymaster@ Rick
re: Is there a way to easily do the same for the User’s Admin editing screen? WP allows them access in the top menu and the options are overwhelming for most folks. I’d love to disable it and force them to only use Form. You’d have to edit the Connections admin CSS to do the same which would get overwritten on each update meaning you’d have to add it again. It’s probably easier to use a plugin to disable the admin bar:
https://wordpress.org/plugins/admin-bar-disabler/re: private Because the entry is private the details are private
re: Do you have an addition to the filter that would accomplish this last change? Sorry, no, not really. Who would need to set unlisted, admins only? Maybe added a capability check so admins can set public/private/unlisted will do?
function cn_force_private( $entry ) {if ( ! current_user_can('manage_options') ) $entry->setVisibility( 'private' ); return $entry; } add_filter( 'cn_pre_process_add-entry', 'cn_force_private' ); add_filter( 'cn_pre_process_update-entry', 'cn_force_private' );-
This reply was modified 11 years, 9 months ago by
Steven Zahm. Reason: Fix code typo
10/29/2014 at 2:05 pm #308466Rick Wielopolski
ParticipantMany Thanks!
The additional change to the code snippet works great! However, for others who use this, please note that one error exists above…change ‘manage options ‘ to ‘manage options’ by removing the space so it recognizes the parameter.
Also, the admin-bar-disabler plugin works great as well.
(I believe I found a few minor bugs and will post in your bug list for future releases).
Everything is configured quite well and we can now review with the pastor & congregational committee.
Great app and support!
10/29/2014 at 4:39 pm #308485Steven Zahm
Keymaster@ Rick
Thanks! I fixed the typo.
-
This reply was modified 11 years, 9 months ago by
-
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.
