Bild in Template einfügen

Ein CMSimple Support Forum für deutsch sprechende Nutzer und Entwickler
Post Reply
Nelli
Posts: 3
Joined: Sat Feb 20, 2010 9:35 am

Bild in Template einfügen

Post by Nelli » Tue Feb 23, 2010 11:50 am

Hallo,
ich probiere gerade einen neuen Style für ein neues Projekt aus. Ich hab den Style msninsp2 und möchte oben, wo der Name der Seite reinkommt,
noch gerne ein Hintergrundbild mit reinbringen. Kann mir jemand sagen, wie und an welche Strelle in der Vorlage-Datei?
<?php
/*
CMSimple version 2.4 - February 27. 2005
Small - simple - smart
© 1999-2005 Peter Andreas Harteg - peter@harteg.dk
##################################################################################
# this template for cmsimple.dk was downloaded from www.cmsimple-styles.com #
#--------------------------------------------------------------------------------#
# please do not remove the links on the template! #
# if you want to remove them, buy a template license! #
# please visit www.cmsimple-styles.com for more information. #
##################################################################################
This program is free software; you can redistribute it and/or modify it under the terms of the Affero General Public License (AGPL) as published by Affero, Inc. version 1. All files in the CMSimple distribution (except other language files than English and Danish) are covered by this license.
IMPORTANT NOTICE: As covered by the AGPL Section 2(d), the "Powered by CMSimple"-link to cmsimple.dk must under no circumstances be removed from pages generated by this program (except in print facility). If you want to remove or hide this link from your pages, you must purchase CMSimple under a commercial license. This also applies testing purposes and setup at an intranet or internal network.
Please be aware, that the AGPL in Section 2(d) requires, that any modified version of the program runned public (ie. on the Internet) must have an additional download facility for the modified version. This also applies to any modification of the template. Therefore you should purchase a commercial license, if you do not want the design of your internet site to fall under the AGPL license.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the AGPL for more details.
A copy of the Affero General Public License is available at http://www.cmsimple.dk/?License:AGPL, if not, write to Affero, Inc., 510 Third Street, Suite 225, San Francisco, CA 94107 USA.
This copyright note must under no circumstances be removed from this file and any distribution of code covered by this license.
For further information about this license and how to purchase a commercial license, please see http://www.cmsimple.dk/?License
For downloads and information about installation, please see http://www.cmsimple.dk
*/
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<?php echo head();?>
<link rel="stylesheet" href="./jax_calendar/css/default.css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>
<body bgcolor="#B2C7E5" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"<?php echo onload();?>>
<a name="top"></a>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><table width="100%" border="0" cellpadding="4" cellspacing="0" class="locator">
<tr>
<td class="locator" bgcolor="#FFFFFF"><?php echo locator();?></td>
</tr>
</table>
<table class="top" width="100%" height="75" border="0" align="center" cellpadding="10" cellspacing="0" background="<?php echo $pth['folder']['templateimages']?>top1.jpg" bgcolor="white">
<tr>
<td class="sitename"><font color="white"><?php echo sitename();?></font></td>
<td valign="top" align="right">
<td valign="middle" align="right" class="searchbox"><?php echo searchbox();?>
</td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="10" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td valign="top" width="160">
<table align="center" width="100%" border="0" cellpadding="5" cellspacing="0">
<tr>
<td valign="top"> <?php echo toc();?> </td>
</tr>
<tr>
<td valign="top" class="menu"><?php echo printlink();?></td>
</tr>
<tr>
<td valign="top" class="menu"><?php echo languagemenu();?></td>
</tr>
<tr>
<td valign="top" class="login"><?php echo loginlink();?></td>
</tr>
<tr>
<td valign="top" class="menu"><?php echo lastupdate();?></td>
</tr>
<tr>
<td valign="top">
<?php include("./jax_calendar/modules/calendar.inc.php"); ?>
</td>
</tr>
<tr>
<td valign="top"> </td>
</tr>
</table>
</td>
<td valign="top" style="border-left-color:#5493B4; border-width:1px;border-style:solid;">
<?php echo editmenu();?> <?php echo content();?> <?php echo submenu();?>
<p> </p>
</td>
<td valign="top" align="middle" width="160" style="border-left-color:#5493B4; border-width:1px;border-style:solid;">
<p> <a target="_blank" href="http://www.wetter.com/home/extern/ex_se ... 7138"><img src="http://www.wetter.com/home/woys/woys.ph ... EPLZ,47138" border="0" alt=""></a>
</p>

<P> </p>
</tr>
</td>
</tr>
</table>
<table width="100%" height="50" border="0" cellpadding="0" cellspacing="0" class="end">
<tr>
<td valign="top">
<div align="center">
<table width="100%" border="0" cellpadding="5" cellspacing="0">
<tr>
<td><div align="left"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">powered
by <a href="http://www.cmsimple.dk" target="_blank"><strong>cmsimple.dk</strong></a>
- template by <a href="http://www.cmsimple-styles.com" target="_blank"><strong>cmsimple-styles.com</strong></a></font></div></td>
</tr>
</table>
</div></td>
<td valign="top"><table border="0" align="right" cellpadding="4" cellspacing="0">
<tr>
<td class="navigatorgradient" valign="top"> </td>
<td class="navigator" valign="top"> <?php echo previouspage();?> </td>
<td align="center" class="navigator" valign="top"> <a href="#top" class="navigator"><?php echo top();?></a>
</td>
<td align="right" class="navigator" valign="top"> <?php echo nextpage();?>
</td>
</tr>
</table></td>
</tr>
</table>
</body></html>

mvwd
Posts: 299
Joined: Tue Jun 17, 2008 10:35 pm
Location: Baden Württemberg / Germany
Contact:

Re: Bild in Template einfügen

Post by mvwd » Sun Mar 14, 2010 11:38 am

Der Seitenname wird über folgenden Code eingefügt:

Code: Select all

<?php echo sitename();?>
In Deinem Beispiel taucht dieser Aufruf innerhalb einer Tabellenzelle auf:

Code: Select all

<td class="sitename"><font color="white"><?php echo sitename();?></font></td>
Das gewünschte Hintergrundbild kann also:
  1. über CSS eingebracht werden => .sitename { background-image:url(./images/name_des_bildes.jpg); } * in Stylesheet einfügen/ersetzen.
  2. direkt in die Tabellenzelle (als CSS) geschrieben werden: <td class="sitename" style="background-image:url(./images/name_des_bildes.jpg);"><font color="white"><?php echo sitename();?></font></td>
mvwd.

* Bild liegt in ./templates/msninsp2/images/ !

Post Reply