Support

Home Forums Ticketing Add-on Need to scale down image size in the ticket

Need to scale down image size in the ticket

Posted: August 27, 2016 at 3:43 am

Viewing 7 reply threads


J Baalbergen

August 27, 2016 at 3:43 am

The image size in the ticket is too big. I don’t understand the solution in this topic. How do I do that? It seems I can only insert the field [EVENT-IMAGE], with this result (it scales up).
Can you please help? Regards, Jolanda


Seth Shoultes

  • Support Staff

August 27, 2016 at 12:33 pm

Hi,

I would recommend adding some CSS to a child theme, or using a plugin like Simple Custom CSS to resize the image.

Here’s some CSS you can use to resize the image:

.ticket .logo > img {
    max-width: 50%;
}

That should give you something like this:
http://www.screencast.com/t/Xlr17J9jnqSc

Hope that helps. Please let us know if have any further questions.


J Baalbergen

August 29, 2016 at 1:51 pm

Hello Seth, I placed your code in CSS builder, but nothing changes. All images are still scaled to 406 px width and I don’t know where that comes from.
Do you have another suggestion?
Thanks in advance, Jolanda


J Baalbergen

August 29, 2016 at 1:53 pm

By the way, it would be great if the size is the same as in the grid view.


Tony

  • Support Staff

August 31, 2016 at 4:58 am

Hi there,

For Seth’s example did you add the code within the ticket template itself?

You’ll need to add that CSS to a style block within the ticket template itself, you do that within Text mode – http://take.ms/A0uKw

<style>
.ticket .logo > img {
    max-width: 50%;
}
</style>

That will reduce the width of the image down to 50% of the original, you could also set the specific width and height to display the image there too:

<style>
.ticket .logo > img {
   width: 200px;
}
</style>

That will reduce the image size down to 200px wide and allow the browser to determine the height.

We do not currently have a shortcode that allows you to set explicit sizes used within the ticket, I have created a ticket to discuss including this within a future version of EE.


J Baalbergen

September 1, 2016 at 3:33 am

Hello Tony, as you suggested I added the code to the ticket template but unfortunately that also didn’t work as well as adding code to css builder.

I know it’s not the best option, but at last I fixed it by changing both css files in wp-content/plugins/eea-ticketing/core/messages/templates/variations:

html_ticketing_main_default.css and
html_ticketing_base_default.css

resp:

.logo img {
margin-top:2em;
width: 250px;
}

.ticket img {
border: none;
width: 250px;
}

Regards, Jolanda


Tony

  • Support Staff

September 2, 2016 at 4:41 am

Yeah adding CSS to a build is unlikely to work as the tickets load differently, it needs to be done within the template editor in text mode (you also can not switch baqck to visual mode after doing so).

The problem with doing the above is you will lose that customization after each update to EE although I understand why you’ve made that change.

We have a ticket to include a new shortcode in the messages system that will allow you to set both the size of the image loaded within the template and also explicitly set width and height of the image when displayed.

I have added a note to that ticket to update this thread once that is included within EE.


Josh

  • Support Staff

September 7, 2016 at 10:23 am

Update: EE4.9.10 was released and it includes a new short code for messages. An example of how to use it follows:

[EVENT_IMAGE_* width=250 height=250]

Viewing 7 reply threads

The support post ‘Need to scale down image size in the ticket’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso