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 13 replies, 3 voices, and was last updated 7 years, 6 months ago by
Steven Zahm.
-
AuthorPosts
-
02/17/2016 at 10:40 pm #365737
Jo Marks
ParticipantHi Steven
I’ve now purchased cMap, Link and Form and are trying to put them altogether on a locally hosted test site before migrating it to my live site. I was making progress and then I went backwards. I know you will be limited in how much assistance you can give me given that you can’t access the pages in question, but see if you can spot anything wrong in the workflow.
I created a page called Directory and assigned Connections to it.
Installed cMap, Link and Form and activated them
I installed Sidebar Login plugin and then added this to a page sidebar.
I added the code snippet that I found at this link to the Sidebar Login widget http://connections-pro.com/support/topic/embedding-form-on-different-page/#post-360271
I ticked the boxes indicated in the Link documentation
I ticked Edit Entry under Subscriber on the Roles Tab
I added an entry with just a name and an email address in Connections. I then created a user in WordPress with this email address.
I then go to my newly created Directory page and enter the login details in the sidebar.
Now, on the first entry I created a link came up on the Directory page to go to edit my entry which bought up Form and everything was looking good. However subsequent test entries are not getting this link and if I click on the Edit My Directory Listing from under the Howdy it takes me to the correct listing but not in Form in Connections itself. And now the original listing that was working is no longer working correctly.
Apologies for the long winded explanation but I wanted to make sure I got everything in. Any clues from looking through this? If I was to do all this on the live site how could I ensure that no one else can see it except you, keep the page in drafts or password protect it?Thanks
Jo02/18/2016 at 4:15 pm #365801Steven Zahm
Keymaster@ Jo Marks
re: Edit My Directory Listing from under the Howdy it takes me to the correct listing but not in Form in Connections itself.
That would be correct. The adminbar link will always to the user to the admin side. In this case it would be the user’s Link admin profile page. That is what you are seeing, correct? The page URL would end like this:
../wp-admin/users.php?page=connections_link
If you are, then Link is working correctly, so that is very good. The issue would be that the Sidebar Login widget is no longer displaying the edit link, is that correct?
I took a look at the code for Sidebar Login and it does support shortcodes, however, the shortcode for the edit link from the other post will not work correctly for the way Sidebar Login needs. Try this instead:
add_shortcode( 'connections_edit_link', 'cn_edit_my_entry_shortcode' ); function cn_edit_my_entry_shortcode() { // Grab an instance of the Connections object. $instance = Connections_Directory(); // Get the current user ID. $userID = get_current_user_id(); // Check to see if the entry has been linked to a user ID. $entryID = get_user_meta( $userID, 'connections_entry_id', TRUE ); $results = $instance->retrieve->entries( array( 'id' => $entryID ) ); if ( is_user_logged_in() && ( $userID == $results[0]->user && $entryID == $results[0]->id ) && ( current_user_can( 'connections_edit_entry' ) || current_user_can( 'connections_edit_entry_moderated' ) ) ) { return cnURL::permalink( array( 'type' => 'edit', 'slug' => $results[0]->slug, 'data' => 'url', 'return' => TRUE ) ); } }
Then in the Sidebar Login widget use this for the logged in link:
Edit My Directory Entry | [connections_edit_link]
Now does that work?
02/24/2016 at 11:12 pm #366807Jo Marks
GuestHi Steven
Apologies for not getting back to you sooner, I’ve had some issues with my local site and have had to build it again on another PC but am finally up and running again.OK re: That would be correct. The adminbar link will always to the user to the admin side. In this case it would be the user’s Link admin profile page. That is what you are seeing, correct? The page URL would end like this:
../wp-admin/users.php?page=connections_link
Yes this is what I’m seeing so it looks like Link is working, tick.
Regarding the shortcode you’ve provided, I’m not sure where I’m meant to place this. I’ve put it into the widget itself but I don’t think that’s right is it? When I click on the Edit My Directory Link I just get a “This webpage is not available” error. There is another login widget called Login Widget with Shortcode, would this be a better option?
If I don’t have the Shortcode at all and don’t have the link in the Widget and set up a listing and a user then login as them an Edit link doesn’t appear at all except for under the Howdy option.
I’m thinking I’m going to have to install this on the live site and add a disallow to my robots.txt to hide it so you can have a look at it live. I’m getting myself in a muddle trying to get the workflow and everything right.
02/25/2016 at 9:53 am #366843Steven Zahm
Keymaster@ Jo Marks
re: Regarding the shortcode you’ve provided, I’m not sure where I’m meant to place this. I’ve put it into the widget itself but I don’t think that’s right is it?
I am going to assume you update the Code SNippet with the new code I gave in my reply, so, yes, you would add the shortcode I gave in the Sidebar Login widget. I am assuming you meant this plugin, right? If you are then you would add the shortcode to “Logged-out Links” input field.
re: When I click on the Edit My Directory Link I just get a “This webpage is not available” error.
It does sound like we are talking about the same login widget and that you do have the shortcode in the right area… what is the URL of the link? It should be the Connections entry profile/detail page with
/edit/
at the end OR../wp-admin/users.php?page=connections_link
03/01/2016 at 10:37 pm #367446Jo Marks
GuestHi Steven
Yes we are talking about the same widget. I put the shortcode in the places you advised but it’s still not working properly. So the user logs in and the screen says:WELCOME JOE SMITH
Edit My Directory Listing
LogoutWhen they click on the Edit My Directory Listing link it goes to http://connections_edit_link/ not the link you’ve referred to.
Thanks
Jo03/02/2016 at 8:02 pm #367622Steven Zahm
Keymaster@ Jo Marks
Actually, that makes sense. That is, if the user that is being tested does not have a linked entry. There is not a way for Sidebar Login to know and the snippet I gave will not return anything so Sidebar Login uses the shortcode text as the link.
I actually have a much better solution available now. First, you’ll need the latest version of the Login extension that I released yesterday. You’ll find that it has a widget that you can use they is very similar to the Sidebar Login widget. The primary difference is that the widget in Login is designed with tight integration with Connections and the Link extension.
Now, speaking of the Link extension, make sure you grab the latest version. Earlier today I released version 3.0. This version of Link will add options to the Login widget to display the add/view/edit links. All with simple point and click magic :D
Link 3.0 also introduces two new shortcodes that can be used to add the view/add/edit link anywhere shortcodes are supported. Now, you can not use these shortcode in Sidebar Login because of the way it uses the shortcodes, you’ll just get broken links so I highly recommend using the Login extension instead.
With Link 3.0 you can even add these links to you menu if you wanted, here’s the FAQ.
Now, depending when you receive this there will also e an updated version of the Form extension which has been slighly tweaked to better integrate with Link.
03/02/2016 at 11:25 pm #367651Jo Marks
GuestHi Steven
I’ve just read through the description for the Login extension and want to confirm that I’m reading it correctly. It says that if the user is not logged in and they visit your directory they will be shown your message plus the login form. My problem is that I want the directory to be available to everyone, but to have the login functionality for those users that have an existing listing so that they can update it themselves. Would the Login extension cater for this?03/03/2016 at 10:00 am #367679Steven Zahm
Keymaster@ Jo Marks
You did read that in the description… that is only one of the use cases for the shortcode which only applies if you setup your directory to require a login to view. You do not have to do this in order to use the Login extension. The description has not caught up to the latest version yet. I’ll be working on that today. That said, the documentation for Login is up and current.
You would use the Login widget that comes with the Login extension exactly as you are currently using the Sidebar Login widget. The primary difference between the two is it offers tight integration with the latest version of Link, which is the key. When both are installed, the widget will have the option of displaying the edit link automatically. You also have the option of automatically displaying the view/add entry link if the user does not have an entry in Connections. These two links are enabled by simply checking a box in the widget. No code, No shortcode, no complicated setup.
Login is free, install it and give it a try, you’ll find it offers nearly almost all the same features as the Sidebar Login widget plus some features it does not have.
03/06/2016 at 11:39 pm #367958Jo Marks
GuestThis reply has been marked as private.03/07/2016 at 9:39 am #368001Steven Zahm
Keymaster@ Jo Marks
re: when the user clicks on Logout is it possible for them to remain on the Directory page rather then going to the WordPress Logout screen?
That seems reasonable. I can make the widget default to the current page for when the user clicks the logout link. I’d have to push another update in order to make this change.
re: I’d also like to change the View My Directory Link to a View Directory Link and again take them straight to the Directory page front end.
See this FAQ. It explains how to change just about any text you want in Connections. To change Link specific strings like “View My Directory Entry” you would use the
connections_link
domain instead. Other than that, the instructions are exactly the same.re: For some reason the entry I have put in for david has duplicated and I’m not sure why. It has slightly different information on each listing but I can only see it once in the Manage section.
You have the
[connections]
shortcode on the page twice, remove the second one.re: I’ve changef the label of Biographical Information to Business using the css … This changes it on the front end but is there a way to change it on Form?
Following the instructions in this FAQ. It’s the same FAQ from my previous answers on how to change the text in Link.
re: I have entered a phone number in but it is not displaying and I can’t for the life of me work out why.
- Did you set the visibility of the phone number to private or unlisted?
- Did you perhaps turn off the display of the phone number in the cMap Template Customizer? I suspect this is the cause because I can see the phone number when I click to view the single entry detail/profile view.
- Did you perhaps set the shortcode option to disable the display phone numbers?
-
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.