Показать сообщение отдельно
Старый 22.05.2008, 13:31   #1
margol
Senior Member
 
Аватар для margol
 
Регистрация: 09.07.2007
Адрес: Волгоград
Сообщений: 322
Отправить сообщение для margol с помощью ICQ
По умолчанию Вставка php кода

В setup шаблона:
PHP код:
сonfig.includeLibrary fileadmin/php_files/include.inc
...
lib.news_hpb PHP_SCRIPT
lib
.news_hpb fileadmin/php_files/date_echo.inc 
include.inc:
PHP код:
<?php
include ("fileadmin/php_files/date.inc");
?>
date.inc:
PHP код:
<?php
 
class hello_world {
    function 
theMessage () {
        
//$d = date("d.m.y");
        
return "hello world! hello world! hello world! ";
        }
    }
?>
date_echo.inc
PHP код:
$hello_world_object = new hello_world// New instance is created
$contentBefore $this->cObjGetSingle($conf["cObj"],$conf["cObj."]);
$content $contentBefore.$hello_world_object->theMessage();
$content $this->stdWrap($content,$conf["stdWrap."]); 
В общем пример взят из TSref но не работает!
Может кто увидит ошибку...
Помогите, очень надо!
ИЛИ Подкиньте рабочий вариант вставки php кода...
margol вне форума   Ответить с цитированием