Category: Development

Site Builder Uploaded Images get a new feature

2017-09-03
By: michael
Posted in: Development

Today a new feature was added to the Site Builder Uploaded Images widget, the ability to change the size and aspect ratio of the image you use.

size_aspect.png

The main purpose this was added was for users uploading images as full page headers.  The default setting for the uploaded image was to be set to 'xxlarge' which is 512px, but because the width of a page is usually wider than that the result would be grainy images that were less than ideal especially when the banner is the main theme for the page.

This new system allows a larger image size to be selected so a better quality image results.  Check out the BEFORE and AFTER images below.

before_after.png

The BEFORE image was blurry because it was a small image stretched into a large container.  The AFTER image is close to the correct size for the container so is much clearer.

A small new feature, but useful for anyone using the Upload Images widget for the Site Builder system.

Posted in: Development | 2 comments

Solving a development problem - urlencoding

2014-10-08
By: michael
Posted in: Development
What I'd like to do is a series on how to go about solving problems.  If you read the forums you will see many instances of questions being asked, then the answer being something like "It's fixed in the next release, so update".

Not all of the code in this series will always be current as better ways of doing things always come up.

What I want to look at here is the base process that you, me or anyone goes through in order to solve a problem.

I'm hoping it will help developers new to Jamroom or new to developing start to get some patterns that they can use to solve their own problems.  Which would lead to developing neat stuff.

So here goes:

First thing to remember is: It's not the problem in particular that we're looking at, but rather the methods we use to solve the problem

Second thing to remember is: There is always more than one way to solve a problem.

This problem comes to us from this forum thread:
https://www.jamroom.net/the-jamroom-network/forum/jamroom-developers/14693/in-user-names

The issue is: That albums with foreign characters (non English) in the url were causing the album to not display.  What we need to figure out is Why?.



So the steps are:
  1. figure out where we need to look
  2. figure out what is not working
  3. find a way to make it work
  4. implement that solution.

In this case:
  1. Where to look was the item_album.tpl file
  2. What was not working was the wrong thing was being searched for
  3. To make it work we needed to get the search term into the same format as it was in the database.
  4. We applied the same code that was used when inserting to the database to the search term.

Fixed.
Posted in: Development | 3 comments