This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$regexstr = '~ | |
# Match Youtube link and embed code | |
(?: # Group to match embed codes | |
(?:<iframe [^>]*src=")? # If iframe match up to first quote of src | |
|(?: # Group to match if older embed | |
(?:<object .*>)? # Match opening Object tag | |
(?:<param .*</param>)* # Match all param tags | |
(?:<embed [^>]*src=")? # Match embed tag to the first quote of src | |
)? # End older embed code group | |
)? # End embed code groups |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* String nanoTpl (String template, Object data) | |
* | |
* Usage: nanoTpl('Hello ${name}! (not ${name}?)', { name: 'Gandalf' }) | |
* | |
* Result: Hello Gandalf! (not Gandalf?) | |
*/ | |
function nanoTpl (template, data) { | |
var result = template; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$ABS_FILE_NAME = $_SERVER["DOCUMENT_ROOT"]."/xml/demo.xml"; | |
$WORK_DIR_NAME = substr($ABS_FILE_NAME, 0, strrpos($ABS_FILE_NAME, "/")+1); | |
$obXMLFile = new CIBlockXMLFile; | |
// Удаляем результат предыдущей загрузки | |
$obXMLFile->DropTemporaryTables(); | |
// Подготавливаем БД | |
if($obXMLFile->CreateTemporaryTables()) | |
{ |
NewerOlder