Forum Replies Created
-
AuthorPosts
-
Steven Zahm
Keymaster@ MV Times
Yes, the shortcode now looks fine.
Not that this should affect anything but it appears
home_id='19413'is actually the same page that the directory is on. If it is, then that settings is redundant because that is what it will default to. So you could remove it.Additionally, if the cMap template is the template activate on the Connections : Templates admin page, that option is redundant and can be removed.
But neither should affect the lock option but removing them will simplify your shortcode.
The only thing I can think of it must be something to do with your homegrown town select drop down. My best guess is that it is hard coded in the WP post editor with a bit of js to submit the value on click. Is that correct? You’re not using PHP or anything that directly alters the shortcode or anything, correct?
Steven Zahm
Keymaster@ tom1209
This is actually not related to cMap, though cMap is affected. It is a core Connections setting. One that by default is to allow clicking on an entry name to show its single entry view… the only way this would not work if it were manually turned off. To turn it back on, go to the Connections : Settings admin page and click the Advanced tab and re-enable the Name link option. After you do, the names of entries will be links allowing visitors to click to view the single entry page.
Hope that helps!
Steven Zahm
Keymaster@ MV Times
Your shortcode is either “corrupt” or there was a copy paste error because what you have is not a valid WP shortcode:
[connections category='644' |SORT_ACS,zipcode|SORT_DESC' template='cmap' page_limit='5' home_id='19413' lock='true']This could be the issue.
This is the part that is wrong, because it is incomplete:
|SORT_ACS,zipcode|SORT_DESC'It should be (
something-hereis a placeholder for a valid sort field):order_by='something-here|SORT_ACS,zipcode|SORT_DESC'OR
order_by='zipcode|SORT_DESC'Steven Zahm
Keymaster@ MV Times
On the feature list, add
lock='trueto the shortcode. That should prevent the list from being filtered by the query.Steven Zahm
Keymaster@ tom1209
re: This is a private reply as this page is not yet live. Just in case you want to see what it looks like in action.
Looks good.
re: Of course, I have no idea what a “private reply” means in the context of this forum. :)
Means only I and the poster can see it if the poster was logged in when they made it private. If the poster was not logged in, then only I can see it.
Steven Zahm
Keymaster@ Joe
re: On your example, scit.org, I think you Geocode the zipcode field to latitude and longitude, then pass that along with the Radius for the output. Is that correct?
Correct. The JavaScript Google Geocoder API is being used to do the geocoding client side so that the 2500 rolling limit is very unlikely to be reached by the client. If this was done server-side via PHP it would be very likely that the limit would be reached and thus not function.
re: on the Edit Entry page, if you enter the address and click GeoCode, it retrieves the lat & long. How do I access or call that function?
This too is being done via JavaScript but with the Google Maps API using a jQuery plugin named goMap. The code can be found here. However, it is very unlikely you can leverage this code since it is really specific on its function. You could leverage this function to do server side geocoding but a word of caution… This will be completely ripped out within the next year and replaced with a far more capable API. My suggestion would be to copy the code that you need from it instead of relying on it directly.
Hope that helps!
pss. If you login to the forums, you’ll be able reply to you own posts even after I mark them as resolved as long as you were the user that created the initial post…
I’m going to mark the other thread as unresolved so you can continue posting under that one and closing this one so this discussion can stay in one thread.
http://connections-pro.com/support/topic/additional-dropdown-field/
Steven Zahm
Keymaster@ tom1209
Sounds like a decent way of implementing it!
Steven Zahm
Keymaster@ Ash
Of, I forgot to answer the other question… Yes, you will be able to apply updates to the core Connections plugin safely.
Steven Zahm
Keymaster@ Ash
I just sent you an email with a quote. Let me know if you do not receive that email.
Steven Zahm
Keymaster@ Joe
re: The one thing that is not working is the zip code and radius. It is not working individually or with the other fields to narrow the results. I’m feeding the “near_addr” and “radius” values the same way as all the others. Any ideas?
Sounds like you are feed the results of the submitted form into the shortcode options, is that correct? The near_address option has never been implemented. So if you have a zip code submitted, you have to get that geocoded and then pass that geocode to the lat/long shortcode options.
re: I was working with the latitude short code. One issue I came across is that the radius seems to max out at 50 miles. Is there any way to change that or am I doing something wrong?
There is no artificial limit in place for the radius. In testing, I used all the way up to 6000mi. There may be a bug in your code. I wonder… are you also passing the zipcode to the zipcode shortcode filter as well as doing a radius search? If you are, that would break the radius search because only entries with the zipcode would be returned.
re: The cn-search-messages output after the search only outputs for the search terms. I dived into the class.template-parts.php and found that there is no $out setup for “cn-cat-in”, “cn-radius” or the zip code. Can I just uncomment the code for the “cn-radius” and duplicate the individual code for “cn-cat-in” and zip code fields?
There is an output for zipcode. You can uncomment the code for the radius query var. For the cn-cat-in query var, that is a bit more difficult. You’ll need code similar to the cn-cat query var.
Hope that helps!
-
AuthorPosts
