Aleksandr Mekal'

???°???µ, ?‚?µ???µ???? ???????????°?µ?‚ ?????‹?»???? ???· ?‚?µ?????‚?° (???????‚?µ?????‚???‹?µ ?????‹?»????, ???????µ?????????‚?µ?????‚)

???°???µ, ?‚?µ???µ???? ???????????°?µ?‚ ?????‹?»???? ???· ?‚?µ?????‚?° (???????‚?µ?????‚???‹?µ ?????‹?»????, ???????µ?????????‚?µ?????‚)
???????‚?µ?????‚???°?? ???µ???»?°???° – ???????»??-?????????°?¶?° ?????‹?»???? ???°???????????? ???· ?????‰?µ???‚???????‰???… ?‚?µ?????‚???? ???‚???°?????†. ?’??-???µ?????‹?…, ???‚?? ???‹?????????? ?‚?µ??, ???‚?? ???????????°?µ?‚ ?????‹?»????, ?‚?°?? ???°?? ?±???»?????µ ???°???????? ?‡?‚?? ???° ???µ?µ ???»?????????‚. ?’??-???‚?????‹?…, ???»?? ???µ?±???°???‚?µ??????, ?????‚?????‹?µ ?????????°???‚ ?????‹?»???? ?????????? ?? ?‚?µ?????‚?° ?? ???‚?? ???µ ?‚?°?? “???°?»????????” ???µ???µ?? ???????????????‹???? ???????‚?µ???°????.
?”?°?»?µ?µ ?? ???°?????????? ???°?? ?????‚?°?????????‚?? ???‚?? ???µ???»?°???? ???° ???????? ???°???‚ ???° ???????????µ ???????¶???° WordPress:

?•???‚?? 4 ???°???°

1) ?”?»?? ???°?·???µ?‰?µ?????? ???????‚?µ?????‚???‹?… ?????‹?»???? ???° ???????µ?? ???°???‚?µ, ?’?°?? ?? ???µ???????? ???‡?µ???µ???? ?????‚???µ?±???µ?‚???? ???±?????????‚?? ???µ???????????‹?? ???????????‚ sape.php, ?????°?‡?°?‚?? ?????‚?????‹?? ?????¶???? ?? ???°?·???µ?»?µ ?«???°???‚???????????» ?’?°???µ?? ???»???‰?°??????.

?’???????°?????µ: ?’?°?? ???????‚?°?‚???‡???? ???‚?µ???µ?‚?? ???‚?°???‹?? ?„?°???» sape.php ?? ?·?°???????°?‚?? ???° ?µ???? ???µ???‚?? ?????????? ???µ????????. ???????»?µ ???±???????»?µ?????? sape.php ???±???·?°?‚?µ?»?????? ?????°?»???‚?µ ?„?°???» links.db (???????‹?? ?????·???°???‚???? ?°???‚?????°?‚???‡?µ?????? ?‡?µ???µ?· ???µ?????‚???????µ ?????µ????) ?? ?????????‚?????µ?????‚?µ???? ?? ?‚????, ?‡?‚?? ???° ???°?????? ?? ?????????? ???‹???‚?°???»?µ???‹ ?????°???° ???????‚?????° 777.

2) ???»?µ???????‰???? ???‚?°?????? ???µ???±?…?????????? ???±?????????‚?? ?????? ???‹?·?????° ?????‹?»???? ???° ???‚???°?????†?‹ ???°???‚?°.
?”?»?? ?????????µ???‚?????? ???????µ?????°?†???? ???‚???°?????† ???????‚?µ?????? ?? ???»?? ?????°?????»?????????? ???‚???±???°?¶?µ?????? ?????‹?»????, ?? ?????…?????????? ???????µ ?‚?µ?… ???‚???°?????†, ???° ?????‚?????‹?… ???‹ ???»?°?????????µ?‚?µ ???°?·???µ?‰?°?‚?? ???????‚?µ?????‚???‹?µ ?????‹?»????, ?????±?°?????‚?µ ?? ???°?????µ ???°?‡?°?»?? (???? ???‹???????° ?‚?µ???° body ?? ???µ?·???»???‚?????????‰???? html-???????????µ???‚) ???»?µ???????‰???? ??????:

< ?php if (!defined('_SAPE_USER')){ define('_SAPE_USER', '???°??_?…?µ??_??????'); } require_once($_SERVER['DOCUMENT_ROOT'].'/'._SAPE_USER.'/sape.php'); $sape_context = new SAPE_context(); ?>

?’?°?¶????: ?•???»?? ???°???µ?µ ?? ???°?? ???¶?µ ?±?‹?» ?????‚?°???????»?µ?? ?????? ???»?? ???‚???±???°?¶?µ?????? ???±?‹?‡???‹?… ?????‹?»????, ?‚?? ???°?? ???»?µ?????µ?‚ ?·?°???µ?????‚?? ?„???°?????µ?‚ ???????°:

define(‘_SAPE_USER’, ‘???°??_?…?µ??_??????’);

???°

if (!defined(‘_SAPE_USER’)){
define(‘_SAPE_USER’, ‘???°??_?…?µ??_??????’);
}

?”?°?»?µ?µ, ???µ???µ?? ???‹?????????? ???°?¶???????? ?„???°?????µ???‚?° ?‚?µ?????‚?° ???‚???°?????†?‹, ???· ?????‚?????????? ?’?‹ ?…???‚???‚?µ ?????????°???°?‚?? ?????‹?»????, ???µ???±?…?????????? ?????µ?????°?????‚?µ?»?????? ???±???°?±???‚?°?‚?? ???°?????‹?? ?„???°?????µ???‚ ?„???????†???µ?? replace_in_text_segment.

?????????µ??:

< ? $text = '?’ ???°???????? ?„???°?????µ???‚?µ ?‚?µ?????‚?° ???‚???°?????†?‹ ?????µ???? ???°???‚?° ?? ?…???‡?? ?????????°???°?‚?? ???????‚?µ?????‚???‹?µ ?????‹?»????'; $text = $sape_context->replace_in_text_segment($text);
echo $text;
?>

?’?°?¶????: ?„???????†???? replace_in_text_segment ?????¶???? ???‹?·?‹???°?‚?? ???µ???±?…???????????µ ?????»???‡?µ???‚???? ???°?· ???»?? ???°?¶???????? ???· ???‚???µ?»?????? ???°???????»???¶?µ?????‹?… ???° ???‚???°?????†?µ ?„???°?????µ???‚???? ?‚?µ?????‚?°, ???· ?????‚?????‹?… ?’?‹ ???»?°?????????µ?‚?µ ?????????°???°?‚?? ?????‹?»????.

?’?°?¶????: ???????†???°?»???·?????????‰?°?? php-?????‚?°?????° ?????»?¶???° ???°???????»?°???°?‚?????? ?? php-?„?°???»?µ ???‹???µ ???µ?????????? ???‹?·?????° ?„???????†???? replace_in_text_segment.

?’?°?¶????: ?????? ?????????»???·?????°?????? ???°?????????? ???°?????°???‚?° ???????° ???‹???????° ???????‚?µ?????‚???‹?… ?????‹?»???? ???µ ?‚???µ?±???µ?‚???? ?????????‚?°???»???‚?? ?‚?µ???? sape_index.

?”?»?? ???»?µ???????‰???… ???????¶?????? ?’?‹ ?????¶?µ?‚?µ ?????°?‡?°?‚?? ???»?°???????‹ :
???»?°?????? ???»?? WordPress – http://www.sape.ru/user_files/plugins/context/wordpress.zip (?·?°???°?????°?? ?????‹?»???°)
???»?°?????? ???»?? Joomla – http://www.sape.ru/user_files/plugins/context/joomla.zip (?·?°???°?????°?? ?????‹?»???°)

3) ???????»?µ ???‹?????»???µ?????? ???µ?????‹?… ???????… ???°??????, ???µ???±?…?????????? ???µ???µ???‚?? ???° ?????»?°?????? ?«???????‚?µ?????‚???‹?µ ???‚???°?????†?‹?» (?? ?????????µ????, ???°???????‚???? ?’?°???µ?? ???»???‰?°??????, ???° ???‚???°?????†?µ ?«?????? ???»???‰?°???????») ?? ???????‚?°?????‚?? ???°???‚ ?? ???‡?µ???µ???? ???° ???????µ?????°?†???? ???‚???°?????† ?? ?????????? ???°?·???µ?‰?µ?????? ???????‚?µ?????‚???‹?… ?????‹?»????, ???°?¶?°?? ???° ???????‚???µ?‚???‚???????‰???? ????????????. ? ???±???‚ ???????‚?µ???‹ ?? ?????????????µ ???±?‰?µ?? ???‡?µ???µ???? ?????????µ?????‚ ???°?»???‡???µ ???????‚?µ?????‚???????? ???????° ???° ???‚???°?????†?°?… ???°???‚?°, ???¶?µ ?????±?°???»?µ?????‹?… ?? ???????‚?µ???? ???»?? ???°?·???µ?‰?µ?????? ???±?‹?‡???‹?… ?????‹?»????, ???????»?µ ?‡?µ???? ???? ?????»?°?????µ ?«???????‚?µ?????‚???‹?µ ???‚???°?????†?‹?» ?????¶???? ?±?????µ?‚ ???°???‚?? ???????‚???µ?‚???‚???????‰???? ???????????? ???‚???°?????†, ?????? ???° ?????‚?????‹?… ?????°?»?????? ???±???°?????¶???‚??.

4) ???°???????µ?†, ???° ?????»?°?????µ ?«???????‚?µ?????‚???‹?µ ???‚???°?????†?‹?» ?????‚???µ?±???µ?‚???? ?°???‚?????????????°?‚?? ?‚?µ ???‚???°?????†?‹, ???° ?????‚?????‹?… ???‹ ???»?°?????????µ?‚?µ ???°?·???µ?‰?°?‚?? ?????‹?»???? ???· ???????‚?µ???‚?° (?µ?‰?µ ???°?· ???±???°?‰?°?µ?? ?’?°???µ ?????????°?????µ, ?‡?‚?? ???????‚?µ???‚ ???° ???‚???… ???‚???°?????†?°?… ?????»?¶?µ?? ?±?‹?‚?? ???µ???·???µ?????‹?? ???? ?????µ???µ????). ???·???µ???µ?????µ ?†?µ?? ???° ???°?·???µ?‰?µ?????µ ???????‚?µ?????‚???‹?… ?????‹?»???? ???????‰?µ???‚???»???µ?‚???? ???? ???‚???°?????†?‹ ?«???????°???»?µ?????µ ?†?µ???°?????» ?????‚?µ?? ???‹???‚?°???»?µ?????? ???????„?„???†???µ???‚?° ?????»???‚?????»?????°?†???? (???‚ 1 ???? 2) ???‚?????????‚?µ?»?????? ?±?°?·???????? ???‚???????????‚?? ???°?·???µ?‰?µ?????? ???±?‹?‡?????? ?????‹?»???? ???° ???‚???°?????†?µ.

???????»?µ ???‹?????»???µ?????? ?????µ?… ???‹???µ?????°?·?°?????‹?… ???µ?????‚??????, ???»???‰?°?????° ???‚?°?????????‚???? ???????‚?????????? ?????‚???????·?°?‚?????°??, ???»?? ???°?·???µ?‰?µ?????? ???° ???µ?? ???????‚?µ?????‚???‹?… ?????‹?»????.

?’???????°?????µ
, ???µ ???‹?‚?°???‚?µ???? ???°???‚?? ???????? ?????±???‚???µ?????‹?µ ???»???‰?°?????? ?‡?µ???µ?· ?????????? ???? ???????µ???? ?°?????°?????‚?°. ???????? ???»???‰?°?????? ?????‹???»?µ?????? ???µ ???‚???±???°?¶?°???‚???? ?? ???µ?·???»???‚?°?‚?°?… ???????????°, ???? ???·?±?µ?¶?°?????µ ???????±????.

?’???????°?????µ: ???»?? ???±?????¶???µ?????? ???????????????? ???? ?????‚?°?????????µ ???????° ???°?·???µ?‰?µ?????? ???????‚?µ?????‚???‹?… ?????‹?»???? ???° ???°?·?»???‡???‹?µ ?????????»???????‹?µ ???????¶????, ?????°?·?°?????? ???·?°???????????????‰??, ?????±?»?????°?†???? ?±?°??-???µ???????‚???? ?? ?‚.??. ???° ???°???µ?? ?„?????????µ ?±?‹?» ?????·???°?? ?????µ?†???°?»?????‹?? ???°?·???µ?»http://forum.sape.ru/forumdisplay.php?f=28.

???????‚???????†???? ?±?‹?»?° ???·???‚?° ???µ?????????µ?????‚???µ?????? ?? ???°???‚?° ???°???‹

?•???»?? ?±???????‚ ???°?????µ-?‚?? ?????????????‹ – ?·?°???°???°???‚?µ, ?? ???µ?±?µ ???‚?? ???¶?µ ???????‚?°?????» ?? ?·?°???°?·?°?» ???????µ?????°?†????, ???????????‚?????? ???°?????µ?‚ ?»?? ?????? ?????µ ?‡?‚?? ?????µ ???°???? :)

Written by mekal

February 1st, 2008 at 11:06 pm

Posted in WordPress