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.32, configuration, Gridder, template
- This topic has 9 replies, 2 voices, and was last updated 9 years, 6 months ago by
Michelle Forbes.
-
AuthorPosts
-
01/18/2017 at 8:51 pm #407277
Michelle Forbes
ParticipantHi, thanks for your plugin and template! Gridder… the images are not displaying correctly in the main grid, they are not being cropped to proportion as is on the single entry pages. Also, how do I go about adding some padding around each grid entry, and making the images smaller then the default.
I am assuming that there is no customization for the gridder template via the templates/customization as I do not get a customization option with gridder activated.
And lastly, how do I go about making the dropdown background a different color from the entry title? It seems like it might confuse some if the color is the same as other title areas in the same row above the dropdown info.
Again thank you for your work!
01/19/2017 at 10:35 am #407388Steven Zahm
Keymaster@ Michelle
re: the images are not displaying correctly in the main grid, they are not being cropped to proportion as is on the single entry pages.
The image crop mode for the grid will be center weighted since most profile shots are centered weighted.
The image crop for the single page is also center weighted perhaps the size difference make them look different.
re: Also, how do I go about adding some padding around each grid entry, and making the images smaller then the default.
There is no way to add more padding. Well, I suppose you could use CSS to add more, but I am not sure who that will affect the display since it was designed to look the way it does.
re: I am assuming that there is no customization for the gridder template via the templates/customization as I do not get a customization option with gridder activated.
Correct, not at this time. However, you still have a lot of configuration options available to you.
re: how do I go about making the dropdown background a different color from the entry title? It seems like it might confuse some if the color is the same as other title areas in the same row above the dropdown info.
Not sure I follow. The activate entry, the entry with the contact panel open, the tint of the color is lighted to highlight it, make it different from the others. Here’s a demo.
Hope I have answered your questions thoroughly!
01/19/2017 at 12:59 pm #407421Michelle Forbes
ParticipantI see you resolved this but I am still not clear on how to get the actual size of the image to be proportionally correct per each image in the grid. This needs to be correct. Is there another template that handles this properly? The single page does keep the whole image to proportion regardless of the original image’s size. Thank you, I figured out the rest of my questions.
01/19/2017 at 1:26 pm #407422Steven Zahm
Keymaster@ Michelle
re: I am still not clear on how to get the actual size of the image to be proportionally correct per each image in the grid. This needs to be correct. Is there another template that handles this properly?
Sorry, but there is no way to set or configure the crop per image. All images will be crop center weighted. This is by far the most common practice when images need to be scaled and cropped to fit a specific dimension. This is exactly how the images is auto scaled and cropped on the single page too. The image itself is a different dimension (width x height) but still cropped center weighted.
If you like the way the image appears on the single page, then adjust the Gridder image size to be the same as the default image size of the single page. Like so:
[connections image_width=300 image_height=225]Now, that said, if you changed the image size option for the Large image on the Connections : Settings admin page under image, then match the height and width that was set on the Settings page to the shortcode option height and width.
On the Settings page, you can also adjust the crop mode, if you changed it from the default “Crop and resize proportionally to best fit the specified dimensions, maintaining the aspect ratio.” option then the images will be cropped differently, but the crop is still center weighted.
The crop mode can not be adjusted for Gridder thru a shortcode option. It can only be changed by applying a filter to change the core default crop mode applied to all images. To do this:
Install the Code Snippets plugin. Create a new snippet with the following:
function cn_image_atts( $atts ) { $atts['zc'] = 2; return $atts; } add_filter( 'cn_output_default_atts_image', 'cn_image_atts' );The valid crop mode options are:
0Resize to Fit specified dimensions (no cropping)1Crop and resize to best fit the dimensions (default behaviour)2Resize proportionally to fit entire image into specified dimensions, and add borders if required3Resize proportionally adjusting size of scaled image so there are no borders gaps
01/19/2017 at 5:15 pm #407514Michelle Forbes
Participantthanks for taking the time to explain the options. Whereas the images are cropped to fit perfectly on the single page, nothing worked using the exact same settings for the large images. Your code snippet worked very well just by adding it to the functions. Yeah, happy enough here. whew.
Just 2 more questions…hopefully. And maybe I should open up a new thread… I need to have the detail-link “View Profile” at the top, before the excerpt or it can be before the telephone#, etc. I also would like less characters in the excerpt. I tried the shortcode, excerpt_length=0 and this did not work (I set it to 100).
Thanks again!!!
01/20/2017 at 2:48 am #407519Michelle Forbes
ParticipantHi again, I figured out the excerpts, still trying to figure out how to move the detail-link.
01/20/2017 at 10:10 am #407583Steven Zahm
Keymaster@ Michelle
re: excerpt
More or less just an fyi, there will be a minor update to Gridder coming soon. This changes the logic of the excerpt to use the core excerpt function in Connections vs a custom one in Gridder.
Settings the value to
0will display the entire bio, effectively turning off the excerpt.re: view profile link
The only to to move this is to edit the template’s PHP file. If that is something you are comfortable doing, here’s how.
Edit the
card.phpfile found in this folder:
../wp-content/plugins/connections-gridder/Locate this block of code at the bottom of the file:
if ( $atts['show_profile_link'] ) { echo '<div class="cn-gridder-detail-link">'; /** @todo Should use @see cnEntry::getPermalink() instead. */ cnURL::permalink( array( 'type' => 'name', 'slug' => $entry->getSlug(), 'text' => __( 'View Profile', 'cnt_gridder' ), 'home_id' => $atts['home_id'], 'force_home' => $atts['force_home'], ) ); echo '</div>'; }Move it to right after this line:
if ( $atts['excerpt_length'] ) {That will move it above the excerpt.
To make your change update safe, follow the tutorial on custom template override files.
Hope that helps!
01/20/2017 at 3:59 pm #407612Michelle Forbes
ParticipantThank you! Sigh, I did it, putting card.php into folder theme/child/connections-gridder
and there is no change.I did not include the php tags around the detail link code. Here is how it is added:
if ( $atts['excerpt_length'] ) { if ( $atts['show_profile_link'] ) { echo '<div class="cn-gridder-detail-link">'; cnURL::permalink( array( 'type' => 'name', 'slug' => $entry->getSlug(), 'text' => __( 'Details', 'cnt_gridder' ), 'home_id' => $atts['home_id'], ) ); echo '</div>'; }I looked in 3 different browsers… what did I miss? thanks again, I really do appreciate you spending the time helping me.
01/23/2017 at 10:59 am #407923Steven Zahm
Keymaster@ Michelle
What is the exact path you put your override file in? The path you gave does not seem to be correct. So, I’d double check the file path against the paths outlined in the docs for an override file.
Base on what your said, Connections would expect to find your override files here:
../wp-content/theme/{child-theme}/connections-templates/gridder/card.phpHope that helps!
ps. If you are using page caching, make sure to flush it otherwise you will likely just see the old cached version of the page.
01/25/2017 at 2:00 pm #408348Michelle Forbes
Participantthat was it! working well, and thank you!
-
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.
