Welcome, Guest
Username: Password: Remember me

TOPIC: Change size of thumbnails

Change size of thumbnails 4 years 11 months ago #18177

unfortunately I can't help you out but maybe there is someone else around who can can assist you with it.
(won't respond to PM)
==================================================================
running: JEM 3.x (custom version) + Joomla 3.9.1.0 + PHP 5.x
Locally: PHP 7.3.5 + Joomla 4.0.0-alpha10 + pre-alpha JEM4.x (custom)

Please Log in or Create an account to join the conversation.

Change size of thumbnails 4 years 11 months ago #18178

  • jojo12
  • jojo12's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 3191
  • Karma: 45
  • Thank you received: 342
Hi, first of all, if you change output.class.php, then you have to redo it after each update, because an override is not possible.
I don't know if it's the best way to do that, I copied the flyer in output.class.php and inserted this after the flyer and renamed it as flyer2. I had to change some code inside of this.
Then I made an template override for the event detail view (if you want for venue view too) and renamed all flyer to flyer2.
For my purposes I allways load only images with height=200px.

I had to change to following:
		// Does a thumbnail exist?
/*		if (JFile::exists(JPATH_SITE.'/images/jem/'.$folder.'/small/'.$imagefile)) {
			if ($settings->lightbox == 0) {
				//$url = '#';  // Hoffi, 2014-06-07: '#' doesn't work, it opend "Add event" page - don't use <a, onclick works fine with <img :-)
				$attributes = $id_attr.' class="flyerimage" onclick="window.open(\''.JUri::base().'/'.$image['original'].'\',\'Popup\',\'width='.$image['width'].',height='.$image['height'].',location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no\')"';

				$icon = '<img '.$attributes.' src="'.JUri::base().'/'.$image['thumb'].'" width="'.$image['thumbwidth'].'" height="'.$image['thumbheight'].'" alt="'.$info.'" title="'.JText::_('COM_JEM_CLICK_TO_ENLARGE').'" />';
				$output = '<div class="flyerimage">'.$icon.'</div>';
			} else {
				JHtml::_('behavior.modal', 'a.flyermodal');
				$url = JUri::base().'/'.$image['original'];
				$attributes = $id_attr.' class="flyermodal flyerimage2" title="'.$info.'"';

				$icon = '<img src="'.JUri::base().'/'.$image['thumb'].'" width="'.$image['thumbwidth'].'" height="'.$image['thumbheight'].'" alt="'.$info.'" title="'.JText::_('COM_JEM_CLICK_TO_ENLARGE').'" />';
				$output = '<div class="flyerimage"><a href="'.$url.'" '.$attributes.'>'.$icon.'</a></div>';
			}
		// Otherwise take the values for the original image specified in the settings
		} else {*/

		$output = '<img '.$id_attr.' class="notmodal" src="'.JURI::base().'/'.$image['original'].'" width="auto" height="200px" alt="'.$info.'" />';
//		}
		return $output;
	}

if you want you can delete the code between /* and */
on JEM 2.3.0 stable in latest Joomla (3.9.16) Protostar php7.4.1

Please Log in or Create an account to join the conversation.

Last edit: by jojo12.

Change size of thumbnails 4 years 11 months ago #18200

  • liontv
  • liontv's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 9
  • Thank you received: 0
Thanks @jojo12 but it did not work replacing the lines you mention me but nothing happens or just does not work.
/components/com_jem/classes/output.class.php
I tried to replace the line 748-770 and white snapshot
I tried to replace only 766 and not work
Why so difficult to change the image size of the event?
More help?

Please Log in or Create an account to join the conversation.

Last edit: by liontv.

Change size of thumbnails 4 years 11 months ago #18201

  • jojo12
  • jojo12's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 3191
  • Karma: 45
  • Thank you received: 342
Sorry, I am not a developer and they may have a reason not to add it. We discussed it earlier.
I tried to add here the whole file but this is not allowed.
So the described way is my personal solution which works.

Did you copy the lines 708-772 in the file and pasted it right after I had to rename flyer to flyer2 in copied rows (in 715)
Then I excluded the lines 749-765 (you can delete it if you want)
I changed the code in line 766 to my purposes.
I excluded line 767 too.

Then I went to the overridden files default.php (event, venue) and looked for all "flyer" and renamed them to "flyer2"

Then it worked for me.

This is my service for you. If you don't succeed, then I can't help you and will not help you more.

I added the snippet
on JEM 2.3.0 stable in latest Joomla (3.9.16) Protostar php7.4.1
Attachments:
The following user(s) said Thank You: mrcraige

Please Log in or Create an account to join the conversation.

Last edit: by jojo12.

Change size of thumbnails 4 years 11 months ago #18298

  • jojo12
  • jojo12's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 3191
  • Karma: 45
  • Thank you received: 342
Did you succeed?
on JEM 2.3.0 stable in latest Joomla (3.9.16) Protostar php7.4.1
The following user(s) said Thank You: liontv

Please Log in or Create an account to join the conversation.

Change size of thumbnails 4 years 11 months ago #18309

  • liontv
  • liontv's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 9
  • Thank you received: 0
I'm not lucky.
I do not have much experience in code, Jem thought that would be easy to implement for me, but it is not.
I hope the near future the developers working on implementing change style pictures to you adequate to our design.
I really like the extension but if I can not reach that issue does not serve me.

Sorry for my stupidity. And thanks for your time.

Please Log in or Create an account to join the conversation.

Time to create page: 0.270 seconds

Donate

If you find JEM useful and if you use it on your site, please consider a donation to the project.

Private Messages

You are not logged in.

Follow us......