Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Making A Template
12-03-2011, 05:38 AM (This post was last modified: 01-04-2011 09:38 AM by Punktured.)
Post: #1
Making A Template
FOLDER STRUCTURE

start by making a new folder in the template folder.
for now, we will call our template "mytemplate".

for me, the file path would be:
/home/freeadultscript/public_html/template/mytemplate

in the folder, create another folder named "images"
for me, the path would be:
/home/freeadultscript/public_html/template/mytemplate/images

CSS FILES

most templates come with three css files, so people can choose between:
two column - cift.css
left column only - sol.css
right column only - sag.css

Now that we have all three css files, we can use this piece of code in our template, so that the template knows which one to use.
This is an example "left_side" menu:
Code:
<? if ($kolonlar=="cift.css" || $kolonlar=="sol.css") { ?>
<div id="sidebar1" class="sidebar">
<ul>
<? left_side(); ?>
</ul>
</div>
<? } ?>

FUNCTIONS

the functions used in the index.php file are what adds our content to our templates.
the functions are:
call_metalar()
Quote:This adds our meta tags to our page header.
tepe()
Quote:This is our site logo/title, which is defined in the "Free HTML Areas".
call_menuler()
Quote:This calls for our menu, and displays it accordingly.
tepe_reklam()
Quote:This is our top ad, which usually appears under our menu.
left_side()
Quote:This adds our rleft side menus.
center_up()
Quote:This adds our center content which should go above "content()".
content()
Quote:This adds our main content to our page.
center_down()
Quote:This adds our center content which should go under "content()".
right_side()
Quote:This adds our right side menus.
footer()
Quote:This adds our page footer, along with the copyright for FreeAdultScript.

When your adding these functions into HTML code, you have to encase them in php tags.
example:
Code:
<div class="post">
<div class="entry">

<?=center_up();?>    
<?=content();?>
<?=center_down();?>

</div>
</div>

SCREENSHOT

This is used for the admin panel, for when people are choosing their template.
It has to be named "default.jpg" and it should be the size of "200 x 105".

NOTES

If you have any questions or suggestions, or any general tips for other users, please feel free to add to this tutorial.

Thank you.

Custom HTML/CSS/PHP
http://theorderofindividualacceptance.co...p.php?id=1
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Making A Template - Punktured - 12-03-2011 05:38 AM
RE: making a template (tutorial) - admin - 13-03-2011, 04:20 PM

Forum Jump: