![]() |
#1 |
Новичок
Регистрация: 04.04.2009
Сообщений: 5
Вес репутации: 0
![]() |
![]() Столкнулся с проблемой при установке на данный движок.
http://piwigo.org/ Кратко суть, хочу установить код сапы, ссылки должны отображаться в футер страницы например about.php для этого в файл about.php в самое начало вставляю код Код:
<?php if (!defined('_SAPE_USER')){ define('_SAPE_USER', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); } require_once($_SERVER['DOCUMENT_ROOT'].'/'._SAPE_USER.'/sape.php'); $sape = new SAPE_client(); ?> Код:
<?php if (!defined('_SAPE_USER')){ define('_SAPE_USER', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); } require_once($_SERVER['DOCUMENT_ROOT'].'/'._SAPE_USER.'/sape.php'); $sape = new SAPE_client(); ?> //----------------------------------------------------------- include define('PHPWG_ROOT_PATH','./'); include_once( PHPWG_ROOT_PATH.'include/common.inc.php' ); // +-----------------------------------------------------------------------+ // | Check Access and exit when user status is not ok | // +-----------------------------------------------------------------------+ check_status(ACCESS_GUEST); //----------------------------------------------------- template initialization // // Start output of page // $title= l10n('about_page_title'); $page['body_id'] = 'theAboutPage'; include(PHPWG_ROOT_PATH.'include/page_header.php'); /** * set in ./language/en_UK.iso-8859-1/local.lang.php (maybe to create) * for example for clear theme: $lang['Theme: clear'] = 'This is the clear theme based on yoga template. '. ' A standard template/theme of PhpWebgallery.'; * * Don't forget php tags !!! * * Another way is to code it thru the theme itself in ./themeconf.inc.php */ @include(PHPWG_ROOT_PATH.'template/'.$user['template']. '/theme/'.$user['theme'].'/themeconf.inc.php'); $template->set_filenames( array( 'about'=>'about.tpl', ) ); if ( isset($lang['Theme: '.$user['theme']]) ) { $template->assign( 'THEME_ABOUT',l10n('Theme: '.$user['theme']) ); } $template->assign('ABOUT_MESSAGE', load_language('about.html','', array('return'=>true)) ); $template->pparse('about'); include(PHPWG_ROOT_PATH.'include/page_tail.php'); ?> <? echo $sape->return_links($n); ?> получается примерно следующее: Код:
{* $Id: footer.tpl 3196 2009-03-13 23:37:34Z plg $ *} <div id="copyright"> <a name="EoP"></a> <!-- End of Page --> {if isset($debug.TIME) } {'generation_time'|@translate} {$debug.TIME} ({$debug.NB_QUERIES} {'sql_queries_in'|@translate} {$debug.SQL_TIME}) - {/if} {* Please, do not remove this copyright. If you really want to, contact us on http://piwigo.org to find a solution on how to show the origin of the script... *} {'powered_by'|@translate} <a href="{$PHPWG_URL}" class="Piwigo"> <span class="Piwigo">Пивиго</span></a> <? echo $sape->return_links($4); ?> {$VERSION} {if isset($CONTACT_MAIL)} - {'send_mail'|@translate} <a href="mailto:{$CONTACT_MAIL}?subject={'title_send_mail'|@translate|@escape:url}">{'Webmaster'|@translate}</a> {/if} {if isset($footer_elements)} {foreach from=$footer_elements item=v} {$v} {/foreach} {/if} </div> <!-- the_page --> {if isset($debug.QUERIES_LIST)} <div id="debug"> {$debug.QUERIES_LIST} </div> {/if} </div> <!-- copyright --> </body> </html> Вопрос что делаю не так? Да кстати в папке со скином есть ещё файл about.tpl есть смысл пробывать в него вставлять: Код:
<?php if (!defined('_SAPE_USER')){ define('_SAPE_USER', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); } require_once($_SERVER['DOCUMENT_ROOT'].'/'._SAPE_USER.'/sape.php'); $sape = new SAPE_client(); ?> |
![]() |
![]() |
![]() |
#2 |
Добрый модератор
Регистрация: 09.07.2007
Адрес: глобус Украины
Сообщений: 27,600
Вес репутации: 1040
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]() судя по "return_links($4)" в пхп вы вообще ничего не понимаете...
вставляете пхп код в место, где пхп не исполняется.
__________________
Правильный хостинг. В личке бесплатно не отвечаю обычно. |
![]() |
![]() |
![]() |
#3 | |
Новичок
Регистрация: 04.04.2009
Сообщений: 5
Вес репутации: 0
![]() |
![]() Цитата:
что-то типо этого? <?php echo $sape->return_links($4); ?> Спасибо вам за ответ. Последний раз редактировалось TeXiCo; 26.08.2009 в 01:48. |
|
![]() |
![]() |
![]() |
#4 |
Добрый модератор
Регистрация: 09.07.2007
Адрес: глобус Украины
Сообщений: 27,600
Вес репутации: 1040
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]() Нет, что то типа этого:
<? echo $sape->return_links(); ?>
__________________
Правильный хостинг. В личке бесплатно не отвечаю обычно. |
![]() |
![]() |
![]() |
#5 |
Специалист
|
![]() PHP код:
или в оригинале у вас всё же не так? |
![]() |
![]() |