Description of the need
With the addition of https://github.com/backdrop/backdrop-issues/issues/4903 into core, there has been some discussion about the need to add a new image style that we can use for our front page view of Cards. Various options have been discussed here: https://github.com/backdrop/backdrop-issues/issues/5593
Of the options presented, this is the one that has the most traction so far. It would be nice to get this into 1.22.0, since the new cards content type will be so prominent and it would be really nice if the view layout (image alignment) doesn't "break" as people experiment with it.
Proposed solution
After discussing this with @quicksketch during our informal sprint today, we've come up with the following proposal to address the following goals.
1) Keep changes to a minimum 2) Future proof the changes as much as possible 3) Name the new image style in a way that helps people understand the difference between cropped and uncropped image styles 4) Provides a meaningful alternative or option to existing image styles
I'm about to submit a PR that does the following. Feedback welcome.
1) Creates a new cropped image style 2) Names it "Cards (600x400 cropped) 3) Machine name = "cards"
Alternatives that have been considered
https://github.com/backdrop/backdrop-issues/issues/5593
Additional information
We have deliberately added the word cropped into the label to help distinguish it from existing image styles. This one will behave differently, because it is cropped and the others are not, and we feel as if the label should somehow reflect that.
Sorted alphabetically, we would have a list of image styles that would appear as:
Cards (600x400 cropped) Large (800x600) Medium (300x250) Thumbnail (100x100)
Recent comments
Thanks Alejandro. That was the clues I needed.
Ubercart - Programmatically add product to cart and straight to Checkout
Have you tried uc_cart_add_item()? You need to provide the nid of the product. Then you can use backdrop_goto('cart/checkout'); to send the user to the checkout screen. uc_cart_add_item...
Ubercart - Programmatically add product to cart and straight to Checkout
No problem, let's see how it evolves. I'd be happy to provide a suggested version if i could. I will keep that in mind and try learn this hook chain hopefully very soon. I will...
File hashing uploads made through TinyMCE