Author Topic: My Site's Template  (Read 5963 times)

Max C.

  • Guest
My Site's Template
« on: June 07, 2009, 08:17:18 AM »
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: [Select]
<?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>

Screen.css
Code: [Select]
/*
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;
}

Info.php
Code: [Select]
<?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;;

?>

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

Max

Offline BlackTiger

  • Posts: 166
  • Gender: Male
Re: My Site's Template
« Reply #1 on: June 07, 2009, 10:56:16 AM »
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

  • Guest
Re: My Site's Template
« Reply #2 on: June 07, 2009, 10:59:51 AM »
Hi

you have to modify all the paths to the right image folder like:
Code: [Select]
background:transparent url(../images/img2_copy.png) instead of
Code: [Select]
background:transparent url(images/img2_copy.png) as you did in your css file.

That should do the trick.

rgds

erpe

Offline BlackTiger

  • Posts: 166
  • Gender: Male
Re: My Site's Template
« Reply #3 on: June 07, 2009, 11:13:12 AM »
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: [Select]
background:transparent url(../../images/img2_copy.png)

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

regards
Michael

erpe0812

  • Guest
Re: My Site's Template
« Reply #4 on: June 07, 2009, 11:39:47 AM »
Quote
I think including the images in the template is the nicer way because they belong to the template and not to the site.
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

Max C.

  • Guest
Re: My Site's Template
« Reply #5 on: June 07, 2009, 08:52:09 PM »
Thank you guys for the help. I've just a few more questions though:

1) How do I get the menu bar here, http://crossfyr.com/pages/killbunny/bens/bens-pack-1/death-by-nailgun.php to look like the one here: http://crossfyr.com/pages/killbunny/bens/bens-pack-1.php ? Both menus are on the left side.

2) How can I display youtube videos with WB?

3) How can I center the footer, and change the text color, here: http://crossfyr.com

Thanks ;)

Max

Offline BlackTiger

  • Posts: 166
  • Gender: Male
Re: My Site's Template
« Reply #6 on: June 07, 2009, 09:59:04 PM »
Hi Max,

I don't know what you mean with your first point. At AMASP there is a droplet about Youtube and also a module. You can format the footer in the CSS-File of your template.

regards
Michael

Max C.

  • Guest
Re: My Site's Template
« Reply #7 on: June 07, 2009, 10:01:56 PM »
Thanks for the latter two points ;)

As for the first,  I meant that in one of the two links, the sub menus are visibly submenus with the indention. On the other, the sbmenus are just list under the parent one. How can I fix that?

Offline BlackTiger

  • Posts: 166
  • Gender: Male
Re: My Site's Template
« Reply #8 on: June 08, 2009, 09:03:22 PM »
Hi Max,

you have to build the menu with show_menu or show_menu2 (the latter has more options) in your index.php to get the links you want. Then you can style the output in the corresponding css file.

regards
Michael

Max C.

  • Guest
Re: My Site's Template
« Reply #9 on: June 08, 2009, 09:14:05 PM »
Hi Max,

you have to build the menu with show_menu or show_menu2 (the latter has more options) in your index.php to get the links you want. Then you can style the output in the corresponding css file.

regards
Michael

I'm not sure I follow... =/

Could you edit the index.php in the first post to show what you mean?

Offline BlackTiger

  • Posts: 166
  • Gender: Male
Re: My Site's Template
« Reply #10 on: June 08, 2009, 09:35:14 PM »
Hi Max,

the show_menu call in your index.php looks good, so you now have to layout the lists you get by css. The submenus can not be seen at the moment because their pages have a different template.

regards
Michael

Offline albatros

  • Posts: 696
  • Gender: Male
    • http://www.willingen-ferienhaus.de
OT
« Reply #11 on: June 09, 2009, 11:20:15 AM »
Hi Max C.,

don't know, if it's only my opinion. But don't you think, the grafic in your signature is a little bit too small :wink: :wink: :wink: for a signature in a forum?

Best regards

Uwe

أنا لست إرهابيا. ليس لدى أي ورشة عمل القنبلة في الطابق السفلي. ليس لدى أي مرض الجمرة الخبيثة أيضا. أريد شراء لا مادة الريسين. أنا سوف ابدأ السفر إلى الولايات المتحدة الأمريكية

Offline Argos

  • Posts: 2542
  • Gender: Male
    • Argos Media
Re: My Site's Template
« Reply #12 on: July 04, 2009, 12:21:25 AM »
Yes, very annoying sig. I skip posts with those kind of "screaming" sigs. They should be forbidden, if you ask me.
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
----------------------------------------------------------------
Please don't request personal support, use the forums!

Offline BerndJM

  • Posts: 1764
  • Gender: Male
Re: My Site's Template
« Reply #13 on: July 04, 2009, 03:18:25 AM »
Think now the signature is more "eye-friendly" ...  :-D
In theory, there is no difference between theory and practice. But, in practice, there is.

Offline Argos

  • Posts: 2542
  • Gender: Male
    • Argos Media
Re: My Site's Template
« Reply #14 on: July 04, 2009, 03:21:47 AM »
Think now the signature is more "eye-friendly" ...  :-D
It's very eye-friendly now  :-D
I'm glad he listened.
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
----------------------------------------------------------------
Please don't request personal support, use the forums!

Offline BerndJM

  • Posts: 1764
  • Gender: Male
Re: My Site's Template
« Reply #15 on: July 04, 2009, 03:23:52 AM »
He? listened nope
Me listened ....
In theory, there is no difference between theory and practice. But, in practice, there is.

Offline Argos

  • Posts: 2542
  • Gender: Male
    • Argos Media
Re: My Site's Template
« Reply #16 on: July 04, 2009, 03:26:48 AM »
Ah! Well, somebody listened anyway. That's better than no one LOL.
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
----------------------------------------------------------------
Please don't request personal support, use the forums!

Offline albatros

  • Posts: 696
  • Gender: Male
    • http://www.willingen-ferienhaus.de
Re: My Site's Template
« Reply #17 on: July 11, 2009, 01:52:27 PM »
Thanks a lot to both of you, Jurgen and Bernd!  :-)

Best Regards

Uwe
أنا لست إرهابيا. ليس لدى أي ورشة عمل القنبلة في الطابق السفلي. ليس لدى أي مرض الجمرة الخبيثة أيضا. أريد شراء لا مادة الريسين. أنا سوف ابدأ السفر إلى الولايات المتحدة الأمريكية