Forum Activity for @ultrajam

SteveX
@ultrajam
03/21/17 01:26:35PM
2,584 posts

Image crop=portrait


Using Jamroom

The easiest that I can see is to add this at line 1694 at the end of the // Cropping section of jrImage_create_image()
		$_offsets = explode(':', $_post['crop']);
		if (count($_offsets) == 4) {
			$src_x_offset = $_offsets[2];
			$src_y_offset = $_offsets[3];
		}
So that part of the function now looks like this:
                }
                break;
        }
		$_offsets = explode(':', $_post['crop']);
		if (count($_offsets) == 4) {
			$src_x_offset = $_offsets[2];
			$src_y_offset = $_offsets[3];
		}
    }
    else {
        // maintain aspect ratio of original image
        $new_height      = (int) (($src_height / $src_width) * $new_width);
        $_post['height'] = $new_height;
    }

    //----------------------------------
    // create resource
    //----------------------------------

Then in the jrImage_display smarty function use crop="16:9:0:0"

I don't see any notices or warnings in the error log, so I'll leave that in place and try out some different combinations of cropping.

I can manage without it by capturing multiple images per module item, but it would be very nice to have if possible :)
SteveX
@ultrajam
03/21/17 12:52:14PM
2,584 posts

node-fetch client in log


Using Jamroom

Thanks Michael.

The site is on http. Nothing on my mac, but previously the site was sending tracker emails to someone elses pc so it could be that.

I'll keep an eye on it.
SteveX
@ultrajam
03/21/17 11:13:44AM
2,584 posts

node-fetch client in log


Using Jamroom

I have a few of these in the log today with a node-fetch client.

What I'm wondering is how does it find the url given that it has always been a private tracker item and has not been linked to from anywhere?

Quote: Message 404 Page not found: /steve/tracker/383/a-how-to-use-google-workbook
Date 21/03/17 06:04:20PM
IP Address 35.160.36.119
URL /steve/tracker/383/a-how-to-use-google-workbook
Memory 2MB
Data
Array
(
[_post] => Array
(
[_uri] => /steve/tracker/383/a-how-to-use-google-workbook
[module_url] => steve
[module] => jrTracker
[option] => 383
[_1] => 383
[_2] => a-how-to-use-google-workbook
[_profile_id] => 2
)

[referrer] => none
[client] => node-fetch/1.0 (+https://github.com/bitinn/node-fetch)
)

updated by @ultrajam: 06/23/17 12:22:43AM
SteveX
@ultrajam
03/21/17 04:42:15AM
2,584 posts

Updates


Installation and Configuration

If you are on JBServers that is different from Jamroom Hosting.

https://www.jamroom.net/hosting
SteveX
@ultrajam
03/20/17 07:02:22PM
2,584 posts

Image crop=portrait


Using Jamroom

I'm happy anyway man :) But thanks for thinking about it.

I was thinking that the simplest way might be to allow an offset to be passed in with the crop.

crop="width:height:x_offset:y_offset"

So crop="16:9:0:0" crops from the top left, crop="16:9:-0:-0" crops from the bottom right. I'm only really interested in cropping from the top though.
updated by @ultrajam: 03/20/17 07:03:15PM
SteveX
@ultrajam
03/20/17 05:33:14PM
2,584 posts

Image crop=portrait


Using Jamroom

Thanks Michael, portrait does indeed work, just not quite how I thought it would.

If I override the core code by adding $src_y_offset = 0; just before the // create resource section in jrImage_create_image() it crops from the top. But I can't override it there anyway :(
updated by @ultrajam: 03/20/17 05:34:17PM
SteveX
@ultrajam
03/20/17 04:12:42PM
2,584 posts

Image crop=portrait


Using Jamroom

Hi Michael

Yes, the crops work perfectly :) I use them a lot.

But they all crop from the middle of the image height. I am looking for something which would crop the top portion of a tall image and it seemed that "portrait" might do that - apparently it assumes that a person's face is in the top third of the image but I can't get it to do anything at all.
SteveX
@ultrajam
03/20/17 02:00:46PM
2,584 posts

Image crop=portrait


Using Jamroom

Do we still have crop="portrait" for jrImage_display?

I can see it in the jrImage code, but it doesn't seem to do anything unless I'm approaching it wrongly.

I'm hoping it will do a "crop from the top" type of crop.

Thanks for any advice!
updated by @ultrajam: 07/29/17 04:48:25AM
SteveX
@ultrajam
03/20/17 01:31:56PM
2,584 posts

Page Module Current ID


Jamroom Developers

@softdesigns I might be wrong, but I get the feeling that this doc might be useful to you:
https://www.jamroom.net/ultrajam/documentation/code/1683/reading-the-post
SteveX
@ultrajam
03/16/17 12:03:54PM
2,584 posts

Is There a PDF Version of Documents?


Installation and Configuration

lol, yeah that's our shibboleth/athens single sign on stuff. the library pays for all sorts of resources (publications, databases, etc) which are available to the students when they are logged in to the university network whether on or off campus. Mostly those urls are hidden in buttons and links, but not in the pdfs as buttons don't work.

If there were many people saving the pdfs that might get refined a bit, but it isn't worth the time since so few people actually use the pdf button. Our main docs (library workbooks) don't have a pdf button, only the assignment planner because that was a requested feature.

If it were up to me students would be able to log in and save/update their schedule and then it would be a really useful tool. But logins are a little way ahead on our cautious road map :)
  45