Recent Topics

Attaching Files Target='_blank'

started by on Feb 16, 2017 – Last touched: Jun 05, 2017

Feb 16, 2017 22:56    

Could a future release please allow a setting to change attached (inline) links target setting?

such in _misc.func.php

case 'file': // valid file types: image, video, audio, other

/* 

some code

*/


					$target_types = array( $Blog->get_setting('...') );
					
					$target = ( in_array( $File->get_ext(), $target_types ) ? $Blog->get_setting('...') : '' );

					$inlines[$current_inline] = '<a target="'.$target.'" href="'.$File->get_url().'"'
						.( empty( $current_file_params['class'] ) ? '' : ' class="'.$current_file_params['class'].'"' )
						.'>'.$File->get_icon( $current_file_params ).$current_file_params['title'].'</a>';


Feb 19, 2017 01:08

Can you make an annotated screenshot of what setting you would expect where in the UI?

Thanks.

Feb 19, 2017 14:32

When in file type view, click the file type edit settings opens this pane

Mar 05, 2017 22:43

@achillis not sure if a global parameter is the best place for such an option like this.

@fplanque @achillis What do you think about to include the target of the link into the shortag syntax itself, let's say: [file:123:caption:blank] ? It may make the syntax more complex but it let the user decide how to display each link at post and not site level.

Mar 06, 2017 16:01

@mgsolipa for me personally I think that is a great option, but for other users they may just prefer it to be a global setting. If you ask me, allow both, with the syntax able to override the global setting?

Mar 06, 2017 19:29

1) the most logical place for is to handle this is where @achillis has pointed it out in the file type setting.

2) or view type offers option to "open in a popup". If you add a link type that says "open in self" or "open in blank", what does it mean? A whole lot of confusion!

So this requires more thinking about what we really want to do.

Maybe a link type with options: pop up / self / blank

3) I got stuck at trying to understand what "open with external app (no pop up)" + the note talking about a popup means.

@mgsolipa can you do a few tests with a .doc file in different browsers to see what this option is really doing now? Pop up or not?

Thanks

Jun 05, 2017 00:08

I did some tests and I can not see what these settings actually does.

If the file is inserted as attachment it gets downloaded, if it is inserted in-line it is viewed in the browser


Form is loading...

powered by b2evolution CMS – This forum is powered by b2evolution CMS, a complete engine for your website.