View Issue Details

IDProjectCategoryView StatusLast Update
0001428Composrcore_rich_mediapublic2013-10-21 22:20
ReporterChris GrahamAssigned ToChris Graham 
SeverityFeature-request 
Status resolvedResolutionfixed 
Product Version 
Fixed in Version 
Summary0001428: Javascript to customise attachment defaults
DescriptionInclude in a Javascript snippet (from a separate template) that can be customised to define what rendering defaults particular attachment file extensions will be given. Allow it to define whether the options overlay should automatically appear or not.
TagsNo tags attached.
Time estimation (hours)0.5
Sponsorship open


If users wish to sponsor this issue (optional, some issues are implemented without sponsorship)...
If users wish to sponsor this issue (optional, some issues are implemented without sponsorship)...

Activities

Chris Graham

2013-10-21 21:46

administrator   ~0001840

ATTACHMENT_UI_DEFAULTS.tpl implemented (made possible via changes in JAVASCRIPT_POSTING.tpl).
The default is...

/*
This file is intended for customising the way the attachment UI operates/defaults.

The following variables are defined:
 is_image (boolean)
 is_video (boolean)
 is_audio (boolean)
 is_archive (boolean)
 ext (the file extension, with no dot)
*/

// Add any defaults into URL
defaults.thumb='1';
defaults.type=''; // =autodetect rendering type

// Shall we show the options overlay?
show_overlay=!is_archive;


Deployed for sponsorer as...

/*
This file is intended for customising the way the attachment UI operates/defaults.

The following variables are defined:
 is_image (boolean)
 is_video (boolean)
 is_audio (boolean)
 is_archive (boolean)
 ext (the file extension, with no dot)
*/

// Add any defaults into URL
defaults.thumb='0';
defaults.type='';

// Shall we show the options overlay?
show_overlay=false;

Lhasadreams

2013-10-21 21:58

reporter   ~0001841

Hi Chris,

What are the different defaults.type that can be specified ?

Cheers
Ade

Chris Graham

2013-10-21 22:03

administrator   ~0001842

They refer to the auto-injected parameters of the attachment tag, and also the defaults fed into the form if show_overlay is true.

Lhasadreams

2013-10-21 22:07

reporter   ~0001843

So if I want "Embed directly if possible" how do I find out what default.type needs to be set to ?

Chris Graham

2013-10-21 22:12

administrator   ~0001844

Oh whoops, did I leave it as 'island'?

Try:
defaults.type='inline';

If it doesn't work right away, I will have another look.

Lhasadreams

2013-10-21 22:20

reporter   ~0001845

That worked fine thanks - the experience of adding an image with syndicating out to photobucket is really smooth and uncomplicated - thanks

Issue History

Date Modified Username Field Change