блин, там куча условий 🙂 (в самом файле в смысле) где он должен быть?))
{{if !\IPS\Request::i()->isAjax()}}
{{$maxImageDims = \IPS\Settings::i()->attachment_image_size ? explode( 'x', \IPS\Settings::i()->attachment_image_size ) : array( 1000, 750 );}}
<script type='text/javascript'>
var ipsDebug = {{if ( \IPS\IN_DEV and \IPS\DEV_DEBUG_JS ) or \IPS\DEBUG_JS}}true{{else}}false{{endif}};
{{if \IPS\IN_DEV}}
var CKEDITOR_BASEPATH = '{url="applications/core/dev/ckeditor" base="none" protocol="\IPS\Http\Url::PROTOCOL_RELATIVE"}/';
{{else}}
var CKEDITOR_BASEPATH = '{url="applications/core/interface/ckeditor/ckeditor" base="none" protocol="\IPS\Http\Url::PROTOCOL_RELATIVE"}/';
{{endif}}
var ipsSettings = {
{{if \IPS\Dispatcher::hasInstance() and \IPS\Dispatcher::i()->controllerLocation == 'admin'}}
isAcp: true,
{{endif}}
{{if \IPS\COOKIE_DOMAIN !== NULL}}
cookie_domain: "{expression="\IPS\COOKIE_DOMAIN"}",
{{endif}}
cookie_path: "{expression="\IPS\Request::getCookiePath()"}",
{{if \IPS\COOKIE_PREFIX !== NULL}}
cookie_prefix: "{expression="\IPS\COOKIE_PREFIX"}",
{{endif}}
{{if mb_substr( \IPS\Settings::i()->base_url, 0, 5 ) == 'https' AND \IPS\COOKIE_BYPASS_SSLONLY !== TRUE}}
cookie_ssl: true,
{{else}}
cookie_ssl: false,
{{endif}}
upload_imgURL: "{resource="notifyIcons/upload.png" location="front"}",
message_imgURL: "{resource="notifyIcons/message.png" location="front"}",
notification_imgURL: "{resource="notifyIcons/notification.png" location="front"}",
baseURL: "{expression="\IPS\Http\Url::baseUrl( \IPS\Http\Url::PROTOCOL_RELATIVE )"}",
jsURL: "{expression="rtrim( \IPS\Http\Url::baseUrl( \IPS\Http\Url::PROTOCOL_RELATIVE ), '/' )"}/applications/core/interface/js/js.php",
csrfKey: "{expression="\IPS\Session::i()->csrfKey"}",
antiCache: "{expression="\IPS\Theme::i()->cssCacheBustKey()"}",
jsAntiCache: "{expression="\IPS\Output\Javascript::javascriptCacheBustKey()"}",
disableNotificationSounds: true,
useCompiledFiles: {{if \IPS\IN_DEV}}false{{else}}true{{endif}},
links_external: {{if \IPS\Settings::i()->links_external }}true{{else}}false{{endif}},
memberID: {expression="( \IPS\Member::loggedIn()->member_id ) ? \IPS\Member::loggedIn()->member_id : 0"},
lazyLoadEnabled: {{if \IPS\Settings::i()->lazy_load_enabled}}true{{else}}false{{endif}},
blankImg: "{expression="\IPS\Text\Parser::blankImage()"}",
analyticsProvider: "{expression="\IPS\Settings::i()->ipbseo_ga_provider"}",
viewProfiles: {{if \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'members' ) )}}true{{else}}false{{endif}},
mapProvider: {{if \IPS\Settings::i()->googlemaps and \IPS\Settings::i()->google_maps_api_key}}'google'{{elseif \IPS\Settings::i()->mapbox and \IPS\Settings::i()->mapbox_api_key}}'mapbox'{{else}}'none'{{endif}},
mapApiKey: {{if \IPS\Settings::i()->googlemaps and \IPS\Settings::i()->google_maps_api_key}}"{expression="\IPS\Settings::i()->google_maps_api_key"}"{{elseif \IPS\Settings::i()->mapbox and \IPS\Settings::i()->mapbox_api_key}}"{expression="\IPS\Settings::i()->mapbox_api_key"}"{{else}}''{{endif}},
pushPublicKey: {{if \IPS\Notification::webPushEnabled()}}"{expression="\IPS\Settings::i()->vapid_public_key"}"{{else}}null{{endif}},
relativeDates: {{if \IPS\Settings::i()->relative_dates_enable}}true{{else}}false{{endif}}
};
{{if \IPS\Settings::i()->ipbseo_ga_provider == 'custom' && \IPS\Settings::i()->ipbseo_ga_paginatecode && \IPS\Dispatcher::hasInstance() && \IPS\Dispatcher::i()->controllerLocation == 'front'}}
ipsSettings['paginateCode'] = {setting="ipbseo_ga_paginatecode"};
{{endif}}
{{if !empty( $maxImageDims[0] ) AND !empty( $maxImageDims[1] ) AND ( \intval( $maxImageDims[0] ) !== 0 || \intval( $maxImageDims[1] ) !== 0 ) }}
ipsSettings['maxImageDimensions'] = {
width: {$maxImageDims[0]},
height: {$maxImageDims[1]}
};
{{endif}}
</script>
{{endif}}
{{if !\IPS\Request::i()->isAjax() and \IPS\Dispatcher::hasInstance() and \IPS\Dispatcher::i()->controllerLocation == 'front' and \IPS\Settings::i()->fb_pixel_enabled and \IPS\Settings::i()->fb_pixel_id}}
{{$pixelId = \IPS\Settings::i()->fb_pixel_id;}}
<!-- Facebook Pixel Code -->
<script>
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
document,'script','https://connect.facebook.net/en_US/fbevents.js');
setTimeout( function() {
fbq('init', '{$pixelId}');
{{if $pixels = \IPS\core\Facebook\Pixel::i()->output()}}
{$pixels|raw}
{{endif}}
}, {expression="\intval( \IPS\Settings::i()->fb_pixel_delay * 1000 )"} );
</script>
<!-- End Facebook Pixel Code -->
{{endif}}
{{foreach array_unique( array_filter( \IPS\Output::i()->jsFiles ), SORT_STRING ) as $js}}
{{$js = \IPS\Http\Url::external( $js );}}
<script type='text/javascript' src='{{if $js->data['host'] == parse_url( \IPS\Settings::i()->base_url, PHP_URL_HOST )}}{expression="$js->setQueryString( 'v', \IPS\Output\Javascript::javascriptCacheBustKey() )"}{{else}}{expression="$js"}{{endif}}' data-ips></script>
{{endforeach}}
{{foreach array_unique( \IPS\Output::i()->jsFilesAsync, SORT_STRING ) as $js}}
<script type="text/javascript" src="{expression="\IPS\Http\Url::external( $js )->setQueryString( 'v', \IPS\Output\Javascript::javascriptCacheBustKey() )"}" async></script>
{{endforeach}}
{{if !\IPS\Request::i()->isAjax() and ( \count( \IPS\Output::i()->jsVars ) || \IPS\Output::i()->headJs)}}
<script type='text/javascript'>
{{foreach \IPS\Output::i()->jsVars as $k => $v}}
ips.setSetting( '{$k}', {{if ! \is_array( $v )}}jQuery.parseJSON('{expression="json_encode( $v, JSON_HEX_APOS )" raw="true"}'){{else}}{expression="json_encode( $v, JSON_HEX_APOS )" raw="true"}{{endif}} );
{{endforeach}}
{expression="\IPS\Output::i()->headJs" raw="true"}
</script>
{{endif}}
{{if \count( \IPS\Output::i()->jsonLd )}}
{{foreach \IPS\Output::i()->jsonLd as $object}}
<script type='application/ld+json'>
{expression="json_encode( $object, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS )" raw="true"}
</script>
{{endforeach}}
{{endif}}