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.23, cn_output_email_addresses, contact, extension, filter
- This topic has 5 replies, 2 voices, and was last updated 9 years, 11 months ago by
Steven Zahm.
-
AuthorPosts
-
08/29/2016 at 8:23 pm #388150
ssnoomann
ParticipantI have added the above mentioned code snippet to my site to resolve this problem. I now see a Contact Us link on the cMap output. But, when clicked, it just takes me to the URL set for website and no contact form.
As there is no Demo of this extension I am not sure what I should expect. I assumed that I would see some type of Lightbox appear or something on the Links bar that would extend downwards…
It’s not really important to have email contact but I’m sure your intentions for the extension where something different than I’m seeing. A little insight would be great!
08/29/2016 at 8:26 pm #388151ssnoomann
ParticipantI see that this post doesn’t reference the closed topic that I was re-opening on… Here is the code snippet that I was referring to:
add_filter( ‘cn_output_email_addresses’, ‘cn_contact_email_contact_link’, 11, 4 );
function cn_contact_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 = 'Contact Us'; $block = '' . PHP_EOL . $row . PHP_EOL . ''; } } return $block;}
08/29/2016 at 8:28 pm #388152ssnoomann
ParticipantLooking at this code more closely it appears that it is referencing First Name. I do not use the name fields, only the Organization name.
08/30/2016 at 9:36 am #388225Steven Zahm
Keymaster@ ssnoomann
re: As there is no Demo of this extension I am not sure what I should expect.
When the plugin is activated and the contact block for the contact form enabled you will see a contact form on the entry’s detail page as shown in these screenshots.
If you are not seeing this contact form there are two things to check:
- Ensure the Contact plugin is installed and activated on the WordPress Plugins admin page.
- Ensure that you have enabled the email entry content block on the Connections : Settings page under the display tab.
re: Here is the code snippet that I was referring to
You are referring to the code in this reply in the other thread, correct?
Looking at the code you pasted in this thread, I can see it was altered. Use the code as is, do not change it. The alterations that were done make it nonfunctional.
re: Looking at this code more closely it appears that it is referencing First Name. I do not use the name fields, only the Organization name.
If you are adding the entries as “Organizations”, the code is just fine, please leave it as is. The
getName()function is “smart” and will return the org name if the entry is an “Organization” regardless of the settings for the name format.Hope this answers your questions thoroughly!
08/30/2016 at 2:46 pm #388327ssnoomann
ParticipantIf you mean that I should see a Contact Us link, then yes, I do. I don’t see an actual form anywhere.
When I roll over this link, it shows this:
http://[domain-name].com/business/name/%5Bbusiness-name-slug%5D/#cnct-email-%5Bbusiness-name-slug%5D
but, then it just redirects to the link associated with the name.
I have attached a screenshot of the actual listing showing the Contact Us button that appears when I activate the snippet. Yes, I have modified the style a bit but don’t see anything in my modifications that would affect that.
I can provide a link to the site if you’d like or the style changes but would send it in a private message. My hosting provider automatically upgraded me to WordPress 4.6 yesterday and now the pagination on the site doesn’t work… but that’s for another forum topic.
Attachments:
You must be logged in to view attached files.08/30/2016 at 7:31 pm #388339Steven Zahm
Keymaster@ ssnoomann
re: When I roll over this link, it shows this:
There will not be any rollover, popup, lightbox or anything. It is simply a link to the entry’s details page to the contact form.
The difference is it will autoscroll to the “Email Entry” form that is displayed on the entry’s detail page.
So, the link you are seeing is exactly correct.
Looking at your site, screenshot attached, the contact form is where it should be.
re: I have attached a screenshot of the actual listing showing the Contact Us button that appears when I activate the snippet. Yes, I have modified the style a bit but don’t see anything in my modifications that would affect that.
I’m guessing then that the code in this reply is not that code you are actually using because it would not result inn a link.
Anyway, it does sound like what you are using is working.
Attachments:
You must be logged in to view attached files. -
AuthorPosts
- You must be logged in to reply to this topic.
