WebsiteBaker Support (2.8.x) > Templates, Menus & Design

My Site's Template

(1/4) > >>

Max C.:
Ok guys, its me again :P

Well, I've been working aroung with a few things and I really love this software!! It is amazing :D

Ok... now my problem. I am trying to create a new template for my site. It should look like this: http://solidcorruption.com

Instead it looks like this: http://crossfyr.com

I honestly don't know what the problem is, or could be =/

I have no intentions of putting this theme in the archives or whatever its called, I just want to use it for my own site.

Here are the codes that I have up, please correct them if I've made a mistake:

Index.php

--- Code: ---<?php

// $Id: index.php 691 2008-02-10 13:17:15Z doc $

/*

 WebsiteBaker Project <http://www.WebsiteBaker.org/>
 Copyright (C) 2004-2008, Ryan Djurovich

 WebsiteBaker 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.

 WebsiteBaker 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
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with WebsiteBaker; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

*/

if(!defined(&#39;WB_URL&#39;)) {
    header(&#39;Location: ../index.php&#39;);
    exit(0);
}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Design by Free CSS Templates
http://www.freecsstemplates.org
Released for free under a Creative Commons Attribution 2.5 License
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title><?php page_title(); ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php if(defined(&#39;DEFAULT_CHARSET&#39;)) { echo DEFAULT_CHARSET; } else { echo &#39;utf-8&#39;; }?>" />
<meta name="keywords" content="<?php page_keywords(); ?>" />
<meta name="description" content="<?php page_description(); ?>" />
<link href="<?php echo TEMPLATE_DIR; ?>/screen.css" rel="stylesheet" type="text/css" media="screen" />
<?php
// this allows to include the optional module files (frontend.css, frontend.js) into the head section
if(function_exists(&#39;register_frontend_modfiles&#39;)) {
  register_frontend_modfiles(&#39;css&#39;);
  register_frontend_modfiles(&#39;js&#39;);
} ?>
<?php 
// this allows to add custom information to the head section of your template (WB-->Settings-->Website Header)
echo WEBSITE_HEADER; 
?>
</head>
<body>
<div id="header">
</div>
<div id="menu">
    <?php if(SHOW_MENU) { /* Only shown menu if we need to */ ?>    
            Menu: <br />
            <?php show_menu(); ?>
        <?php } ?>
       
        <?php if(SHOW_SEARCH) { /* Only show search box if search is enabled */ ?>
</div>
<div id="content">
    <div id="colOne">
        <h2>Search</h2>
        <br />
            <form name="search" action="<?php echo WB_URL; ?>/search/index.php" method="get">
                <input type="text" name="string" style="width: 100%;" />
                <input type="submit" name="submit" value="<?php echo $TEXT[&#39;SEARCH&#39;]; ?>" style="width: 100%;" />
            </form>
        <?php } ?>
       
        <br />
        <a href="http://www.WebsiteBaker.org" target="_blank">Powered by <br /> WebsiteBaker</a>
        </div>
    <div id="colTwo">
        <?php page_content(); ?>
    </div>
    <div id="colThree">
        <h2>Google Ads</h2>
        <script type="text/javascript"><!--
google_ad_client = "pub-5181234032780060";
/* SCsidebar ad */
google_ad_slot = "0590794784";
google_ad_width = 120;
google_ad_height = 240;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
    </div>
    <div style="clear: both;">&nbsp;</div>
</div>
<div id="footer">
    <?php page_footer(); ?>
</div>
</body>
</html>
--- End code ---

Screen.css

--- Code: ---/*
Design by Free CSS Templates
http://www.freecsstemplates.org
Released for free under a Creative Commons Attribution 2.5 License
*/

body {
    margin: 11px 0 0 0;
    padding: 0;
    background: #000000 url(images/img1.gif) repeat-x;
    font: normal small Arial, Helvetica, sans-serif;
    color: #999999;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    padding: 0;
    text-transform: uppercase;
    letter-spacing: .2em;
    color: #000000;
}

p, ul, ol, blockquote {
    margin-top: 0;
    line-height: 160%;
}

a {
    text-decoration: none;
    color: #9ED738;
}

a:hover {
    text-decoration: underline;
}

/* Header */

#header {
    width: 720px;
    height: 161px;
    margin: 0 auto;
    background: url(images/img2_copy.png) no-repeat;
}

#header * {
    text-decoration: none;
    text-align: center;
    color: #000000;
}

#header h1 {
    padding-top: 55px;
    font-size: 3em;
}

#header h2 {
    font-size: 1.2em;
}

/* Menu */

#menu {
    width: 720px;
    height: 55px;
    margin: 0 auto;
}

#menu ul {
    margin: 0;
    padding: 0;
    list-style: none;
    line-height: normal;
}

#menu li {
    display: inline;
}

#menu a {
    display: block;
    float: left;
    width: 142px;
    height: 21px;
    padding: 7px 1px 0 1px;
    background: url(images/img3.gif) no-repeat center center;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: .2em;
    font-size: x-small;
    font-weight: bold;
    color: #CCCCCC;
}

#menu a:hover, #menu .active a {
    background-image: url(images/img4.gif);
    color: #FFFFFF;
}

/* Content */

#content {
    width: 720px;
    margin: 0 auto;
}

#colOne {
    float: left;
    width: 160px;
}

#colTwo {
    float: left;
    width: 360px;
    padding: 0 20px;
}

#colThree {
    float: left;
    width: 160px;
}

/* Content Elements */

#content h2 {
    height: 21px;
    margin-bottom: 20px;
    padding: 9px 0 0 10px;
    background: url(images/img6.gif);
    letter-spacing: normal;
    font-size: .9em;
}

#content h3 {
    text-transform: uppercase;
    letter-spacing: normal;
    font-size: x-small;
    color: #FFFFFF;
}

#content ul {
    margin-left: 0;
    padding-left: 0;
    list-style: square inside;
}

/* Footer */

#footer {
    height: 70px;
    padding: 7px 0 0 0;
    background: url(images/img5.gif) repeat-x;
}

#footer * {
    color: #000000;
}

#footer p {
    text-align: center;
    font-size: smaller;
}
--- End code ---

Info.php

--- Code: ---<?php

// $Id: info.php 519 2007-12-23 14:37:02Z Ruebenwurzel $

/*

 WebsiteBaker Project <http://www.WebsiteBaker.org/>
 Copyright (C) 2004-2008, Ryan Djurovich

 WebsiteBaker 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.

 WebsiteBaker 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
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with WebsiteBaker; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

*/

$template_directory = &#39;element&#39;;
$template_name = &#39;Primitive Element&#39;;
$template_version = &#39;1.0&#39;;
$template_platform = &#39;2.6.x&#39;;
$template_author = &#39;Max Cosme&#39;;
$template_license = &#39;GNU General Public License&#39;;
$template_description = &#39;This template is designed for Solid Corruption, the website. It was translated by the free web template, Primitive Element on freecsstemplates.com.&#39;;

?>
--- End code ---

I am not familiar with php, so any help here would be appreciated. ;)

Max

BlackTiger:
Hi Max,

I think the main problem are missing images of your original design. Just put the images folder from the old layout inside the template dir.

regards
Michael

erpe0812:
Hi

you have to modify all the paths to the right image folder like:

--- Code: ---background:transparent url(../images/img2_copy.png)
--- End code ---
instead of

--- Code: ---background:transparent url(images/img2_copy.png)
--- End code ---
as you did in your css file.

That should do the trick.

rgds

erpe

BlackTiger:
Hi erpe,

I think including the images in the template is the nicer way because they belong to the template and not to the site.

If you change the path, I think it should look like


--- Code: ---background:transparent url(../../images/img2_copy.png)

--- End code ---

to work in the given environment because the images folder is in the root directory not in /templates

regards
Michael

erpe0812:

--- Quote ---I think including the images in the template is the nicer way because they belong to the template and not to the site.
--- End quote ---
Yes, you are right.

But this was the fastest way to get images shown............ :-D because the images are there right now.

Normally all my templates have the structure:
index.php
info.php
folder css
folder img

But someone else will do it in another way. It depends also on the numbers of css and img files.

rgds

erpe

Navigation

[0] Message Index

[#] Next page

Go to full version