Jamit Software Forum
Welcome, Guest. Please login or register.
January 18, 2018, 05:39:48 pm

Login with username, password and session length
Search:     Advanced search
May 5th, 2010 - Jamit Software Launches the Market!
3,080 Posts in 791 Topics by 1,398,606 Members
Latest Member: AnitraClay
* Home Help Search Login Register
+  Jamit Software Forum
|-+  General Boards
| |-+  General Discussion
| | |-+  Quick Template Guide
« previous next »
Pages: [1] Print
Author Topic: Quick Template Guide  (Read 27752 times)
jamitmodules
Guest
« on: June 30, 2009, 03:27:03 pm »

When designing your own site this is how I got about doing it. I find it is the easiest way and the quickest way. The template should be the LAST thing you do.

1) use the default these and get all prices plans and everything inside the admin how you want it first. Place test ad after test ad on both ends. From the resumes to the employers.

2) When you have everything working the way it should we will move to making a template now. I would even go as far as making a backup of the database and files before messing with the templates.

****************************
Template Customization
****************************

1) User your FTP and goto /include/themes/
2) Make a new folder in themes calling it what you like. Keep it all one word and short.
3) We now need 4 files to begin. Get these files from include\themes\classic
and upload them to your new theme folder.
index-header.php
index-home.php
index-footer.php
main.css
4) Upload these files to new theme folder.
5) log into admin MAIN CONFIG scroll down to Theme Settings select your new theme from the drop down box.

****************************
Begin Edit Header - index-header.php
****************************
1) Open the index-header.php into a text editor.

This line is needed so jamit knows where to find the files so keep this always.
<base href="<?php echo JB_BASE_HTTP_PATH; ?>">

This is simply telling jamit to use the MAIN.CSS file keep this too
<link rel="StyleSheet" type="text/css" href="<?php echo JB_get_maincss_url(); ?>" >

This is just place the SEO tags into it. title, keywords,and meta description keep this line too.
<?php echo JB_echo_index_meta_tags();?>

Now ussually what I will do is copy the rest to a temp file. BAC_OLD_TEMP so I can call on the other tags if I need them while I work. When your doing this you have to think of this as 3 sections of a puzzle and when they are joined it will make one big piece. So our HEADER should be only code that will display all thru the whole web site. The FOOTER only the code that will display all thru the whole web site. Then the MIDDLE is the meat and potatoes. *smile*

You don't need to keep all of jamit tags you can mix them up in your templates. To call a certain image for example. You will see something like this below.

<img src="<?php echo JB_THEME_URL?>images/logo.gif" alt="">

If you look at the code above and break it down you will see how it comes all together. <img src=" <--- HTML CODE
<?php echo JB_THEME_URL?> <----PHP CODE
images/logo.gif" alt=""> <----HTML CODE

So we are using a combination of both. I know it sounds confusing but it really isn't if you just think about it. lets explain now and you will see.

<?php <----- BEGINS tag or php code.
?> <----ENDS tag or php code.

So from the example above it shows you where the state and finish is. So when I copy a section of code I always grab everything from top to bottom.

<img src="<?php echo JB_THEME_URL?>images/logo.gif" alt="">
Now look at the code above again.

You see this below THEME URL so this simple is putting in the direct link for you which in other words would be
<?php echo JB_THEME_URL?>
http://YOURDOMAIN.com/include/themes/YOURTHEME/

As you can this simple piece of code is saving us time. It simply puts the direct URL in for the THEME we are using. So lets put it all together now.

The code below is calling and image
<img src="<?php echo JB_THEME_URL?>images/logo.gif" alt="">
If we spell it out it would look like this.
<img src="http://YOURDOMAIN.com/include/themes/YOURTHEME/images/logo.gif" alt="">

So as you can see Adam simply used a piece of php code to call the item all thru the web site. Smile

****************************
THE CENTER - index-home.php
****************************

Lets say all I want to display is the adds nothing else no searches nothing. I would use this code.

Code:
<?php
// list premium jobs. Comment if you do not want to have it displayed
JBPLUG_do_callback(&#39;index_home_list_premium_jobs&#39;, $A = false);
JB_list_jobs ("PREMIUM");
JBPLUG_do_callback(&#39;index_home_list_jobs&#39;, $A = false);
// List all jobs
JB_list_jobs ("ALL");
JBPLUG_do_callback(&#39;index_home_end_list_jobs&#39;, $A = false);
?>


Now remember in the header I explained <?php and ?> open and close tags. You will where they begin and end here. This piece simply means. Display PREMIUM jobs if any and then display the list of jobs after. Simple right.

The below code will display a search box.
Code:
<?php
JB_render_box_top
(100$label[&#39;index_search_box_heading&#39;], &#39;#EDF8FC&#39;);
// the following call will display a search form: JB_display_dynamic_search_form(form_id, columns)
JB_display_dynamic_search_form (1,1);
JB_render_box_bottom();
?>


So as you can see making a template is not all that hard. You only need to know basic html code. Then you can simply copy and paste into place. You don't need to know php you only need to know where it begins and ends.

****************************
THE FOOTER - index-footer.php
****************************

The footer really needs no code at all. This is nothing more then you bottom links.


Now the above information will get a basic site but we have a much more to do. If you click on a category you will notice your pretty template is now gone. *sigh* but not to worry this is controled by another file we need to edit.
index-category.php would to be edit now to have the look of the site. It will always pull the header and the footer. So we are not adding this into it.

As you click around the site you will find the odd thing missing. Look in the theme folder include\themes\default this has all the files. edit one and upload it to yours slapp a long line of letters in it..... for example

IS THIS THE TEMPLATE I NEED PLEASE BE IT. *smile*

Ftp it up and refresh. If you don't see the wording then guess what. I have the wrong one. Go get another and run another test. Over time you will learn which ones are tied in.

*****************************
WARNING WARNING WARNING
*****************************
Now if you hire someone they WILL edit your main index.php because they want the job done fast. If they have not worked on Jamit then they have no clue what they are doing. You will believe I have a nice site and everything runs smooth. But when jamit brings and upgrade out it will detroy the whole site. That is always why you WORK in the template folder of the NEW template you made. This way when and upgrade comes out you don't loose the look.


*****************************
CHANGING COLORS
*****************************
Changing colors is done in the CSS file. Open it and read it over. One question I see alot of is how do I know what color that is in the CSS file. EASY!!!
view the site in your browser then VIEW SOURCE. Now find that section your seeing. So lets say I see this in the source below.

<h2 class="title">WOW WHAT A GREAT SITE/h2>

Now notice you see CLASS="title" so this is being called in the CSS file called title.

Heres another.... CLASS is what I am looking for and then what it EQUALS the name. Then I go back to the main.css and look for this name and bingo I know which color to change.
<tr class='list_day_of_week'>

*****************************
ENDING NOTES
*****************************

Now this is just a basic guide to get you going but I really believe it is enough to make it all happen. When you see the pages changing you will get the idea quickly. Just try to remember "inch by inch it is a cinch but yard by yard it is to hard" Jamit will not tell you where to fix your code that is your responsibility. But I am hoping by writing this quick guide it points you in the right direction. I do not get and A for spelling after all I am a programmer not and English major. Smile If you have found this useful please send me and email to [email protected] I may write some more.

Lance Prevost
http://www.jamitmodules.com
Logged
szabcsee
Jammers
Hero Member
*
Posts: 115


« Reply #1 on: February 01, 2011, 10:27:03 am »

As i can see this post is from 2009 I would like to know if anything has changed with the new 3.6.X versions?

thanks.

szabcsee  Wink
Logged
Think4yourself
Jammers
Newbie
*
Posts: 3


« Reply #2 on: February 07, 2011, 01:12:53 am »



If I want to make a custom search box, how do I edit the text fields and properties for it? (I am trying to change "Find Jobs" in the search box)

Thank you




The below code will display a search box.
Code:
<?php
JB_render_box_top
(100$label[&#39;index_search_box_heading&#39;], &#39;#EDF8FC&#39;);
// the following call will display a search form: JB_display_dynamic_search_form(form_id, columns)
JB_display_dynamic_search_form (1,1);
JB_render_box_bottom();
?>


So as you can see making a template is not all that hard. You only need to know basic html code. Then you can simply copy and paste into place. You don't need to know php you only need to know where it begins and ends.
Lance Prevost
http://www.jamitmodules.com
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.052 seconds with 17 queries.