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.2.7, Excerpt Plus, javascript, template
- This topic has 7 replies, 2 voices, and was last updated 11 years, 2 months ago by
Steven Zahm.
-
AuthorPosts
-
05/29/2015 at 4:33 am #335990
Alex Quinn
ParticipantHi,
The answer to this might be “use a different template”, but I’m hoping not!
I like the layout of Excerpt Plus but I don’t need the show/hide function. How do I have all the information displayed by default?
Thanks!
05/29/2015 at 11:56 am #336040Steven Zahm
Keymaster@ Alex
This is possible but requires editing the
excerpt-plus.jsfile. Open it and remove this:// As the page is rendered the excerpt is hidden via the CSS style. Hide the details and show the excerpt. $('.cn-hide').css('display', 'none'); $('.cn-excerpt').css('display', 'block'); $('h3.cn-accordion-item,span.cn-show-more').click( function() { var $this = $(this); var uuid = $this.attr('data-uuid'); if ( $( '#cn-detail-' + uuid ).css('display') == 'block' ) { // Hide detail; show excerpt. $( '#cn-detail-' + uuid ).slideUp( 1000, function() { $( '#cn-excerpt-' + uuid ).fadeIn(1000); $( '#cn-toggle-' + uuid ).toggleClass('cn-open'); }); } else { // Hide excerpt; show detail. $( '#cn-excerpt-' + uuid ).fadeOut( 1000, function() { $( '#cn-detail-' + uuid ).slideDown(1000); $( '#cn-toggle-' + uuid ).toggleClass('cn-open'); }); } });Instead of overwriting the original file, drop it in this folder (you’ll have to create it):
../wp-content/uploads/connections-templates/excerpt-plus/Name the file as:
excerpt-plus.min.jsHope that helps!
05/29/2015 at 2:08 pm #336056Alex Quinn
ParticipantGreat stuff, thank you, will give it a go.
In reality, all I need is to add pagination to the default template. Is that easy to do with code from Excerpt Plus or would it be better to modify the layout of the EP template?
The main problem is that the logos I am displaying looked fine in the default template but are cropped in EP.
05/29/2015 at 4:22 pm #336133Steven Zahm
Keymaster@ Alex
You could add the pagination code from EP to the default template. They are both setup a little differently, but if you know PHP it should not be too difficult to add the code from one to the other.
06/02/2015 at 2:19 am #336365Alex Quinn
ParticipantActually, it might just be easier to solve the logo issue. I haven’t changed any of the logo settings but they are now bring cropped because the width is now set to 100 instead of 225px.
Is there any easy way to change this as I can’t find it in the css and don’t want the template to ignore the main image settings?
06/02/2015 at 4:07 pm #336408Steven Zahm
Keymaster@ Alex
Excerpt Plus forces the logo size so the layout is not broken. The size can be changed in the
card.phpfile found here:../wp-content/uploads/connections-templates/excerpt-plus/After you do, you will have to adjust the CSS to account for the larger logo size.
Alternatively, you can change the default crop mode like so:
Install the Code Snippet plugin.
Add a new snippet with the following code:
function cn_image_crop_mode_2( $atts ) { $atts['zc'] = 2; return $atts; } add_filter( 'cn_output_default_atts_image', 'cn_image_crop_mode_2' );Save and activate the new snippet.
Hope that helps!
06/04/2015 at 7:48 am #336502Alex Quinn
ParticipantI’ve just edited the card.php file and the image size has changed, but still displays a cropped image. It seems that the issue is with the way the image is cropped rather than the size of the element on the page.
When I load up the page and then view the image in isolation on another tab, the image is cropped. So it won’t matter how big or small I make it, it will still be cropped.
06/04/2015 at 9:43 am #336504Steven Zahm
Keymaster@ Alex
To change the default crop mode, use the filter I gave in my last reply or change this in the
card.php:$entry->getImage( array( 'image' => $atts['image'], 'height' => 120, 'width' => 100, 'fallback' => array( 'type' => $atts['image_fallback'], 'string' => $atts['str_image'] ) ) );to this:
$entry->getImage( array( 'image' => $atts['image'], 'height' => 120, 'width' => 100, 'zc' => 2, 'fallback' => array( 'type' => $atts['image_fallback'], 'string' => $atts['str_image'] ) ) );You could also use crop mode
3if you wish.Hope that helps.
-
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.
