Wersje 1.9 i starsze - [problem]z umieszeniem linków z linkorna
Cobratay - 09-01-2006, 19:20 Temat postu: [problem]z umieszeniem linków z linkorna nie moge znaleśc w pliku includes/page_tail.php lini
$template->pparse('overall_footer'); któa wedlug isnitrukcji powinna byc. I zeby nei było to raz mi się udało to zrobić na tym forum ale zapomnaiłem jak. Prosze o szybka pomoc
Kod: | 2.6 Instalacja dla forum phpBB
Rozpakuj archiwum. Pliki Linkora umieść w głównym katalogu swojej strony. Plikowi linkor.txt nadaj prawa zapisu dla wszystkich: chmod 666. (przykład nadania chmod 666 dla pliku linkor.txt znajdziesz tutaj).
Następnie w pliku includes/page_tail.php przed linią:
$template->pparse('overall_footer');
dodaj kod:
ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
include_once ('linkor.php');
$template->assign_vars(array('LINKOR' => $linkor_links[0][0]));
$template->assign_vars(array('LINKOR1' => $linkor_links[1][0]));
$template->assign_vars(array('LINKOR2' => $linkor_links[2][0]));
$template->assign_vars(array('LINKOR3' => $linkor_links[3][0]));
$template->assign_vars(array('LINKOR4' => $linkor_links[4][0]));
W pliku templates/NazwaSzablonu/overall_footer.tpl dodaj na końcu przed tagiem </body> następujący kod:
{LINKOR} {LINKOR1} {LINKOR2} {LINKOR3} {LINKOR4} |
Jack.Ketcham - 09-01-2006, 19:31
... ech BO jak szukasz Kod: | $template->pparse('overall_footer'); |
to bez ostatniego średnika - wpisz tak: Kod: | $template->pparse('overall_footer') | .
Albo masz przykład:
Cytat: |
<?php
/***************************************************************************
* page_tail.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
* modification : (C) 2003 Przemo http://www.przemo.org
* date modification : ver. 1.9 2003/05/14 15:50
*
* $Id: page_tail.php,v 1.27.2.1 2002/05/12 00:47:41 psotfx Exp $
*
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
if ( !defined('IN_PHPBB') )
{
die('Hacking attempt');
}
//
// Show the overall footer.
//
$banner_bottom = ($board_config['banner_bottom_enable']) ? $board_config['banner_bottom'] : ''; $bo = ( $userdata['session_logged_in'] && ($userdata['user_level'] == ADMIN || is_jr_admin($userdata['user_id']))) ? '<a href="admin/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Admin_panel'] . '</a><br /><br />' : '';
if ( $portal_page && $custom_footer )
{
$banner_bottom = $custom_footer;
}
$template->set_filenames(array(
'overall_footer' => ( empty($gen_simple_header) ) ? 'overall_footer.tpl' : 'simple_footer.tpl')
);
if ( $board_config['generate_time'] && (!$board_config['generate_time_admin'] || ($board_config['generate_time_admin'] && $userdata['user_level'] == ADMIN) ))
{
$time_end = microtime_float();
$generated_time = round(($time_end - $time_start), 2);
$generated_time = ($generated_time > 200 || $generated_time < 0) ? '0.01' : $generated_time;
$generate_time = '<table align="right"><tr><td align="right"><span class="gensmall">' . $lang['generate_time'] . ' ' . $generated_time . ' ' . (($generated_time <= 2) ? $lang['second'] : $lang['seconds']) . '. ' . $lang['generate_queries'] . ': ' . $db->num_queries . '</span></td></tr></table>';
}
else
{
$generate_time = '';
}
$template->assign_vars(array(
'LOADING_FOOTER' => ($board_config['cload']) ? "<script language=\"JavaScript\" type=\"text/javascript\">\n<!--\nhideLoadingPage();\n//-->\n</script>" : '',
'CLICK_HERE_TO_VIEW' => $bo,
'BANNER_BOTTOM' => $banner_bottom,
'GENERATE_TIME' => $generate_time,
'TRANSLATION_INFO' => (isset($lang['TRANSLATION_INFO'])) ? $lang['TRANSLATION_INFO'] : '') );
$template->pparse('overall_footer');
//
// Close our DB connection.
//
$db->sql_close();
//
// Compress buffered output if required and send to browser
//
if ( $do_gzip_compress )
{
//
// Borrowed from php.net!
//
$gzip_contents = ob_get_contents();
ob_end_clean();
$gzip_size = strlen($gzip_contents);
$gzip_crc = crc32($gzip_contents);
$gzip_contents = gzcompress($gzip_contents, 9);
$gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4);
echo "\x1f\x8b\x08\x00\x00\x00\x00\x00";
echo $gzip_contents;
echo pack('V', $gzip_crc);
echo pack('V', $gzip_size);
}
exit;
?>
|
|
|
|