Third Light Developer Exchange

Code and templating community forum for developers and software integrators

You are not logged in.

Announcement

If you wish to join the Developer Exchange, please contact your account manager - this is to avoid unnecessary spam in the forums. Many thanks for your understanding.

#1 2018-09-04 16:24:19

François
Member
Registered: 2017-06-12
Posts: 10

Use of ThirdLight Browser

Hello,
We have integrated the ThirdLight Browser to allow the selection of photos from another application.
It works well but, identified as a power user (the owner of the photos), we see less photos from the ThirdLight Browser than from the ThirdLight Web User Interface.
All photos are jpg or png with a large variety of sizes. Photos are not huge in terms of disk usage (few megs).
Here is an extract of our code (using jQuery) used as an internal demo, very similar to the demo provided by ThirdLight.
We guess it could be a configuration issue.
Any idea for such a difference ?
Thanks.
François.


(sorry, comments are in French...)

function launchCMSBrowser() {

  try {	
    var app = new IMS.IframeAppOverlay(  $("#serveur").val()  + "/apps/cmsbrowser/", {
          width: '99%',
          height: '99%',
          options: {
                      sessionId: $("#session").val(),	// token
                      theme: "blue",			// light, dark, blue
                      metadata: true,			// avec ou sans metadonnées
                      revisions: false,			// toujours false à la CEB
                      provideSFFUrl:true,		// Permet l'usage d'une URL permettant l'accès à la sélection

                      cropClasses: [			// liste des formats souhaités lors de l'"Export"
                      {
                           key: "pic",			// identifiant/réference unique dans le tableau (libre)
                           name: "Landscape",	// permet la sélection de ce format lors du "Choose" photo, avant "Export"
                           width: 450,			// taille à l'écran
                           height: 330,			// taille à l'écran
                           format: "JPG"			// format retenu lors d'une sélection
                      },
                      {
                           key: "wide",
                           name: "Wide",
                           width: 400,
                           height: 200,
                           format: "PNG"
                      } ]
          }
     });

    app.on( "cropChosen", function( cropDetails ) {

         // Cette fonction est activée lors du choix d'une photo
         // Sa mission est la mise en page de la photo

         console.log( cropDetails ) ;	// beaucoup d'infos..

         if ( cropDetails ) {
              var url = cropDetails.urlDetails.url ;
              $("#results")
                            .css("display","inline" )
                            .find("img")
                            .attr( "src", url )
                            .attr( "width", cropDetails.urlDetails.width + "px" )
                            .attr( "height", cropDetails.urlDetails.height + "px" )
                            ;
              $("#results .container")
                            .text( cropDetails.metadata.object_name ) ;
          }
    });

  }
  catch( e ) {
        console.log( e ) ;
  }
}

Last edited by François (2019-01-15 12:25:59)

Offline

#2 2018-09-05 12:06:03

steve
Third Light Staff
Registered: 2013-06-06
Posts: 105

Re: Use of ThirdLight Browser

Hi,

Are the missing files smaller than the dimensions permitted by the crop classes in your code above? If so that would be the likely explanation - the crop classes act as a filter and will remove any files that are smaller than the limits imposed by the above.

Best Regards,
Steve

Offline

#3 2018-09-05 12:37:34

François
Member
Registered: 2017-06-12
Posts: 10

Re: Use of ThirdLight Browser

Hello, thank you for your reply.
And Yes : it could be a good & logical explanation....
I'll check that - it sounds good...
Thank you again.
François.

Offline

#4 2018-09-05 12:45:53

steve
Third Light Staff
Registered: 2013-06-06
Posts: 105

Re: Use of ThirdLight Browser

Hi François,

As a quick test you could remove the crop classes definition in your code entirely so that it shows everything. I should probably also say that the ThirdLight Browser is generally just for image files so you might not see videos or word docs for example.

Best Regards,
Steve

Offline

Board footer