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 14 replies, 3 voices, and was last updated 8 years, 11 months ago by
Jett.
-
AuthorPosts
-
12/21/2014 at 11:53 am #313261
dominic loiacono
ParticipantHi again (3rd question today),
Thanks again for great support, tried looking but didn’t seem to do right searches.
I have installed link and form.
I have customised the form (hidden elements), I have also made useres be subscribed before submitting form.
If i am single card view, the user has the ability to edit the entry using the form. If not then they have to use the connections maser/admin form (which shows all the fields even hidden ones).
Is there any way to force them to use the form method as opposed to the master field?
I know the url is page/name/person-name/edit, I would like to implement it in a menu or widget. is any of this possible?
thanks again
dom
12/22/2014 at 9:45 am #313289Steven Zahm
Keymaster@ dominic
There’s no way to block the admin … unless you block the admin completely from your users (there’s plugins for that). Then the only way to edit their entry will be from the
/edit/
link. Just a side note, the links in the admin bar will always resolve to the admin pages. It only the links in the list and entry actions that will resolve to the frontend.Hope that helps!
12/26/2014 at 12:18 pm #313413dominic loiacono
ParticipantThings are coming along, especially with all your support. I have disabled the admin panel for subscribed users. So now the only option is to use the front form editor, that way all the hidden fields on form are not visible to user when creating or editing profile.
I’m not sure if I implemented the form correctly because you mentioned a virtual page, I created a page and I inserted the [connections_form] shortcode. i then created a menu item linking to this page.
From your post above i will not be able to use a similar setup for editing as i need
to be in single person view in order to edit details.stylistically I would like to remove the the edit link from above the single card view and insert it as a text/php/htm sidebar widget. I believe I found the function/code which creates the link. just hoping that there is a way to modify it to display inside a php sidebar widget
public static function entryAction( $atts, $entry ) { // Grab an instance of the Connections object. $instance = Connections_Directory(); // Check to see if the entry has been linked to a user ID. $entryID = get_user_meta( get_current_user_id(), 'connections_entry_id', TRUE ); // var_dump( $entryID ); $results = $instance->retrieve->entries( $atts ); // var_dump( $results ); if ( is_user_logged_in() && ( current_user_can( 'connections_manage' ) || $entryID == $results[0]->id ) && ( current_user_can( 'connections_edit_entry' ) ||
current_user_can( ‘connections_edit_entry_moderated’ ) )
) {cnURL::permalink( array( 'type' => 'edit', 'slug' =>
$entry->getSlug(), ‘text’ =>
__( ‘Edit Entry’, ‘connections_form’ ), ‘return’ => FALSE ) );
}
}Also from my forum readings and one of your other posts, users will be able to submit multiple profiles (but only be able to edit the one based on their email address). Did i understand this correctly? Is there any way to use form and link and not allow multiple entries?
thanks again
dominic
12/26/2014 at 1:13 pm #313421Steven Zahm
Keymaster@ dominic
The virtual page for form is like the
/edit/
link except it’s/submit/
If you have this link disabled under the List Actions then normal users can not get to it … now, if a users happened to know about the existence of the/submit/
link they could manually type that in and be able to submit multiple entries. Really though, that’s not going to be an issue because that is simply something a typical user is going to figure out.Now, because you’re using the legacy
[connections_form]
shortcode … as long as the link to that page is visible to users, they’ll be able to submit entries.As for the edit link code something like this may work (untested):
public function widget() { if ( get_query_var('cn-entry-slug') ) { // Grab an instance of the Connections object. $instance = Connections_Directory(); // Check to see if the entry has been linked to a user ID. $entryID = get_user_meta( get_current_user_id(), 'connections_entry_id', TRUE ); // var_dump( $entryID ); $results = $instance->retrieve->entries( $atts ); // var_dump( $results ); if ( is_user_logged_in() && ( current_user_can( 'connections_manage' ) || $entryID == $results[0]->id ) && ( current_user_can( 'connections_edit_entry' ) || current_user_can( ‘connections_edit_entry_moderated’ ) ) ) { cnURL::permalink( array( 'type' => 'edit', 'slug' => get_query_var('cn-entry-slug'), 'text' => __( 'Edit Entry', 'connections_form' ), 'return' => FALSE ) ); } } }
The above would be the widget override method in your widget class.
Hope that helps you out.
12/27/2014 at 10:58 am #313470dominic loiacono
ParticipantThanks, I created a manual sidebar menu (stylized list) in my php text widget and inserted your code ( removed first line of your code and last }) Worked like a charm.
Now i have a manage profile sidebar menu with the edit profile appearing when available.
You are awesome.
Thanks.
12/27/2014 at 10:54 pm #313539Jett
ParticipantHi!
I’m trying to do the exact same thing:
1) I created a PHP Code Widget
2) Inserted the code above without the first and last line
3) Added the widget to show on my directory pageHowever get_query_var(‘cn-entry-slug’) returns false every time.
If I force it to true, I get Fatal error: Cannot use object of type connectionsLoadI just want to move the link to a different location on the page.
Any suggestions?
Thanks!
12/27/2014 at 11:35 pm #313540dominic loiacono
ParticipantHey Jeff, i used Enhanced Text Widget to create the the sidebar link
inside i put the following code:
[url=http://justpaste.it/imon]justpaste.it/imon[/url] (code doesnt seem to like being pasted.
(I added some text to the code in an else statement, shows up when edit link disappears)
You should also be able to put the code in the card-single.php template and it will display.
Not sure if this will resolve your error. Hope it helps a little.
dom
12/28/2014 at 12:00 am #313541Jett
ParticipantThanks Dom!
I can see the edit show up when I select the name now.
However, I was trying to get edit entry to show up when I view the entire directory to save the user the step of selecting their name.Any ideas?
12/28/2014 at 1:23 am #313542dominic loiacono
ParticipantHey Jeff,
Steven will clarify better, but my understanding is that it is not possible to get the edit link from results listing, not sure because if how the link is created or the various if conditions to check the users permissions in relation to the profile.
I agree it would be nice to be able to edit the profiles without the extra click, since it is not 100% intuitive that clicking on the name brings you to a full profile that with the edit link. Ideally I did not want the linked name (all the info i want shown is in the results).
maybe a future feature.
12/28/2014 at 11:16 am #313548Jett
ParticipantDo you know which file generates the directory list?
I should be able to get the code that creates the View My Directory Entry link and then add the edit extension to it.Thanks for your help.
-
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.