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.
Tagged: 8.5.15 snippets, contact, custom email link
- This topic has 5 replies, 2 voices, and was last updated 10 years, 2 months ago by
Steven Zahm.
-
AuthorPosts
-
05/22/2016 at 10:52 am #377154
Alison
ParticipantYou might have responded to this issue in your reply to @Gill in May 2015 but I want to confirm. In my directory every user does not have an email address so I would like to have an indication in list view that a user has an email before clicking to go to single view. In the response to @Gill you seem to present the entire form in the list view. I would only like to have a link. Essentially the same link on the name.
Thank you05/23/2016 at 10:37 am #377284Steven Zahm
Keymaster@ Alison
The link s you gave in your reply link to the user’s profile page not the discussion thread. Could you give that link so I can get a little more context on what you are asking?
05/24/2016 at 7:39 am #377390Alison
ParticipantGill’s question and your response is here http://connections-pro.com/support/topic/no-contact-link-in-list-view/. He asked for the form in list view or a link to single entry view. I would like a link to single entry view. Preferred functionality is to replace the email address with link text for example “Email Alison” because not everyone has an email address and I don’t what the user to have to click through to single entry view to find out if an email address exists.
Thank you Steve05/24/2016 at 10:39 am #377401Steven Zahm
Keymaster@ Alison
Thanks that helps a lot in giving me more context and now I understand what you want. Off the top of my head, I can not think of a solution…
Actually, try this code snippet:
add_filter( 'cn_output_email_addresses', 'alison_email_contact_link', 11, 4 ); function alison_email_contact_link( $block, $addresses, $entry, $atts ) { if ( $addresses ) { if ( ! cnQuery::getVar( 'cn-entry-slug' ) ) { $name = $entry->getName( array( 'format' => '%first%' ) ); $permalink = $entry->getPermalink() . '#cnct-email-' . $entry->getSlug(); $row = '<span class="email-address"><a class="value" title="Email ' . $name . '" href="' . $permalink . '">Email ' . $name . '</a></span>'; $block = '<span class="email-address-block">' . PHP_EOL . $row . PHP_EOL . '</span>'; } } return $block; }Hope that helps!
05/24/2016 at 3:47 pm #377450Alison
ParticipantI am very glad that you had this idea because it worked. Thanks
05/25/2016 at 10:34 am #377522Steven Zahm
Keymaster@ Alison
Great to hear this worked like you wanted!
-
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.
