Фото:
CJSCore::RegisterExt('your_js', array( 'js' => '/bitrix/js/your_module/functions.js', 'css' => '/bitrix/js/your_module/css/functions.css', 'lang' => '/bitrix/modules/your_module/lang/'.LANGUAGE_ID.'/functions_js.php', 'rel' => array('popup', 'ajax', 'fx', 'ls', 'date', 'json') )); |
<?CJSCore::Init(array('your_js'));?> |
<? $MESS["YM_TEXT_1"] = "Текст 1"; $MESS["YM_TEXT_2"] = "Текст 2"; ?> |
BX.message('YM_TEXT_1'); |
push_stream_shared_memory_size 128M; push_stream_max_subscribers_per_channel 50; push_stream_max_messages_stored_per_channel 100; push_stream_max_channel_id_length 32; push_stream_max_number_of_channels 100000; push_stream_shared_memory_cleanup_objects_ttl 60; push_stream_message_ttl 86400; |
server { listen 8893; include bx/node_host.conf; server_name_in_redirect off; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $host:8893; # Errors include bx/conf/errors.conf; location ^~ /bitrix/sub/ { proxy_pass location ^~ /bitrix/subwin/ { proxy_pass location ^~ / { deny all; } } server { listen 8894; include bx/node_host.conf; include bx/conf/ssl.conf; server_name_in_redirect off; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $host:8894; proxy_set_header HTTPS YES; # Errors include bx/conf/errors.conf; location ^~ /bitrix/sub/ { proxy_pass location ^~ /bitrix/subwin/ { proxy_pass location ^~ / { deny all; } } # Server for push and pull server { listen 127.0.0.1:8895; include bx/node_host.conf; server_name_in_redirect off; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $host:8896; location ^~ /bitrix/pub/ { push_stream_publisher admin; set $push_stream_channel_id $arg_CHANNEL_ID; push_stream_store_messages on; push_stream_keepalive off; allow 127.0.0.0/8; deny all; } location ^~ /bitrix/sub/ { push_stream_subscriber long-polling; set $push_stream_channels_path $arg_CHANNEL_ID; push_stream_last_received_message_tag $arg_tag; push_stream_longpolling_connection_ttl 40; push_stream_keepalive on; push_stream_authorized_channels_only on; push_stream_content_type "text/html; charset=utf-8"; push_stream_message_template "#!NGINXNMS!#{"id":~id~,"tag":"~tag~","time":"~time~","text":~text~}#!NGINXNME!#"; } location ^~ /bitrix/subwin/ { push_stream_subscriber long-polling; set $push_stream_channels_path $arg_CHANNEL_ID; push_stream_last_received_message_tag $arg_tag; push_stream_longpolling_connection_ttl 40; push_stream_keepalive on; push_stream_authorized_channels_only on; push_stream_content_type "text/html; charset=windows-1251"; push_stream_message_template "#!NGINXNMS!#{"id":~id~,"tag":"~tag~","time":"~time~","text":~text~}#!NGINXNME!#"; } location ^~ / { deny all; } # Errors include bx/conf/errors.conf; } |