#1428 - Javascript to customise attachment defaults

This is a spacer post for a website comment topic. The content this topic relates to: #1428 - Javascript to customise attachment defaults
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;
Hi Chris,

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

Cheers
Ade
They refer to the auto-injected parameters of the attachment tag, and also the defaults fed into the form if show_overlay is true.
So if I want "Embed directly if possible" how do I find out what default.type needs to be set to ?
Oh whoops, did I leave it as 'island'?

Try:
defaults.type='inline';

If it doesn't work right away, I will have another look.
That worked fine thanks - the experience of adding an image with syndicating out to photobucket is really smooth and uncomplicated - thanks
0 guests and 0 members have recently viewed this.