VDS- - .
Sape - , 80/.
Trustlink - , 60/.
Telderi - .

v2 DLE 9.3

    v2  DLE 9.3

, , 9.3 youtube, - , . 9.3 ( , ).

:

- /engine/classes/parse.class.php

1. :
$source = preg_replace( "#[media=([^]]+)]#ies", "$this->build_media('\1')", $source );


1.1. :
$source = preg_replace( "#[vk=([^]]+)]#ies", "$this->build_vk('\1')", $source );


2. :
$txt = preg_replace( "#<!--dle_youtube_begin:(.+?)-->(.+?)<!--dle_youtube_end-->#is", '[media=\1]', $txt );


2.1. :
$txt = preg_replace( "#<!--dle_vk_begin:(.+?)-->(.+?)<!--dle_vk_end-->#is", '[vk=\1]', $txt );


3. :
function build_url($url = array()) {


3.1. :
function build_vk($url) {
$url = $this->clear_url( urldecode( $url ) );
$url = str_replace("&amp;","&", $url );
if( $url == "" ) return;
$source = @parse_url ( $url );
$source['host'] = str_replace( "www.", "", strtolower($source['host']) );
if ($source['host'] != "vk.com" AND $source['host'] != "vkontakte.ru") return "[vk=".$url."]";
return '<!--dle_vk_begin:'.$url.'--><center><iframe src="'.$url.'" width="585" height="360" frameborder="0"></iframe></center><!--dle_vk_end-->';
}


width height , .

- /addnews.tpl :
<script language="javascript" type="text/javascript">
/*<![CDATA[*/
document.onmouseup = function(){

var t =document.getElementsByTagName('textarea');
var short_scrollTop = document.getElementById('short_story').scrollTop;
var short_scrollLeft = document.getElementById('short_story').scrollLeft;
var full_scrollTop = document.getElementById('full_story').scrollTop;
var full_scrollLeft = document.getElementById('full_story').scrollLeft;

for (var i=0; i<t.length; i++){
t[i].value=t[i].value.replace(/<iframe src="(.*?)".*?</iframe>/gim, '[vk=$1]');
}

document.getElementById('short_story').scrollLeft = short_scrollLeft;
document.getElementById('short_story').scrollTop = short_scrollTop;
document.getElementById('full_story').scrollLeft = full_scrollLeft;
document.getElementById('full_story').scrollTop = full_scrollTop;
}
/*]]>*/

</script>


( , jquery )


- /engine/skins/default.skin.php

:
</body>


:
<script language="javascript" type="text/javascript">
/*<![CDATA[*/
document.onmouseup = function(){

var t =document.getElementsByTagName('textarea');
var short_scrollTop = document.getElementById('short_story').scrollTop;
var short_scrollLeft = document.getElementById('short_story').scrollLeft;
var full_scrollTop = document.getElementById('full_story').scrollTop;
var full_scrollLeft = document.getElementById('full_story').scrollLeft;

for (var i=0; i<t.length; i++){
t[i].value=t[i].value.replace(/<iframe src="(.*?)".*?</iframe>/gim, '[vk=$1]');
}

document.getElementById('short_story').scrollLeft = short_scrollLeft;
document.getElementById('short_story').scrollTop = short_scrollTop;
document.getElementById('full_story').scrollLeft = full_scrollLeft;
document.getElementById('full_story').scrollTop = full_scrollTop;
}
/*]]>*/

</script>


..)


: , ,

: