Hallo,
ich bin absoluter Anfänger in PHP.
Ich habe mit neulich ein cms auf meiner homepage installiert. Funktioniert auch super, nur will ich nun noch ein Favicon einbinden.
(In den Einstellungen des CMS gab es keine Funktion)
Weis jemand wie das geht???
Hier der Quellecode von der index.php:(ich hoffe da kommt der Tag dann rein???)
PHP
<?php
/********************************************************************************
* phpComasy, Content Management System *
* http://www.phpcomasy.org *
* *
* Copyright (c) 2005 Emanuel Zuber ([url]www.noreality.ch)[/url] *
* *
* Released under the GNU General Public License *
********************************************************************************/
/* check if phpComasy is installed */
if (!file_exists("config.php")) { header('Location: install.php?step=1'); exit(); }
/* Includes */
require_once("config.php");
require_once("classes/class.web.php");
/* Start global session */
session_start();
// instance a web object
$web = new web(array_merge($_GET, $_POST));
// checks
if ($web->get_title(0) != '') {
$site_title = $web->settings->get_settings('global_system_name')." - ".$web->get_title(0);
}
else {
$site_title = $web->settings->get_settings('global_system_name');
}
// load and verify template
$attributes = array( 'style.css', // stylesheet
'style_custom.css', // stylesheet
'style_print.css', // printed stylesheet
'img/', // image path, please use only one "img/"
'__SITE_TITLE__',
'__VERSION__',
'__NOW__',
'__META_DATA__',
'__TITLE__',
'__TITLE_WITHOUT_HTML__',
'__CONTENT__',
'__NAVIGATION__',
'__ROOT_NAVIGATION__',
'__LANGUAGE_SWITCHER__',
'__NEXT_AND_PREVIOUS__',
'__PAGE_123__',
'__ADMINISTRATION_PANEL__',
'__MEMBER_PANEL__',
'__PROPERTY_FOREGROUND_COLOR__',
'__PROPERTY_BACKGROUND_COLOR__',
'__PHPSCRIPT__',
'__LOGIN_PANEL__',
'__PAGE_TOOLS__',
'__SEARCH_BOX__'
);
$replace_with = array( 'templates/'.$web->settings->get_settings('global_template').'/style.css', // stylesheet
'templates/'.$web->settings->get_settings('global_template').'/style_custom.css', // stylesheet
'templates/'.$web->settings->get_settings('global_template').'/style_print.css', // printed stylesheet
'templates/'.$web->settings->get_settings('global_template').'/img/', // image path
$site_title,
$web->settings->get_settings('global_system_version'),
$web->settings->get_settings('global_time_format'),
$web->get_meta_data(),
$web->get_title(1),
$web->get_title(0),
$web->get_content(),
$web->navigation->get_navigation(),
$web->navigation->get_root_navigation(),
$web->language->get_language_switcher(),
$web->get_next_previous(),
$web->get_page_123(),
$web->get_administration_panel(),
$web->get_member_panel(),
$web->get_property('foreground_color'),
$web->get_property('background_color'),
$web->get_phpscript(),
$web->get_login_panel(),
$web->get_page_tools(),
$web->get_search_box()
);
//$template = join("", file($web->settings->get_settings('global_absolute_path')."/templates/".$web->settings->get_settings('global_template')."/index.htm"));
$template = file_get_contents($web->settings->get_settings('global_absolute_path')."/templates/".$web->settings->get_settings('global_template')."/index.htm");
$html_temp = str_replace($attributes, $replace_with, $template);
/* dynamic pictures */
$parsing = explode("__", $html_temp);
$picture_to_replace = array();
$picture_replace_with = array();
$i = 0;
foreach ($parsing as $key => $value) {
if (strstr($value, 'PICTURE') != false) {
$picture_to_replace[$i] = "__".$value."__";
$picture_replace_with[$i] = $web->get_picture(substr($value, 8, -1));
$i++;
}
}
$html = str_replace($picture_to_replace, $picture_replace_with, $html_temp);
/* end dynamic pictures */
echo $html;
?>
Alles anzeigen
Vielen Dank im vorraus!!!1 ![]()