Lost Password?

Go Back   CodeCall Programming Forum > Web Development Forum > HTML Programming

HTML Programming Forum discussion covering HTML, XHTML, DHTML and all flavors of HTML. Hypertext Markup Language is used to create websites.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-12-2008, 12:05 PM
Latina.ecu's Avatar   
Latina.ecu Latina.ecu is offline
Newbie
 
Join Date: Mar 2008
Location: The Netherlands
Posts: 17
Rep Power: 2
Latina.ecu is on a distinguished road
Send a message via MSN to Latina.ecu
Default My first template code "newbie"

I am trying to build my first joomla template i have choosen the mozilla Komposer editor, cause i need a portable tool to work on it, someone told me that (the Joomla API and php. Kompozer isn't going to give me a WYSIWYG solution to making it work with the API.

Could please someone give me a brief better idea of what this really mean

this is the code, i hope someone point me out the right way to make a template with no deprecated code, the main meaning of making this is to learn actual programming languages.

I know dreamweaver would be the best, but i am looking for a second free option

This is my index.php

Code:
<?php 
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); 
$iso = split( '=', _ISO ); 
echo '<?xml version="1.0" encoding="'. $iso[1] .'"?' .'>'; 
?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head>
 <?php if ( $my->id ) initEditor(); ?> 
 <meta http-equiv="Content-Type" content="text/html; <?php echo _ISO; ?>" /> 
 <?php mosShowHead(); ?> 
 <link rel="stylesheet" type="text/css" href="<?php echo $GLOBALS['mosConfig_live_site']; ?>/templates/yourtemplatesname/css/template_css.css" /> 
 </head>
 <body> 
 </body> 
 </html>

Last edited by Latina.ecu; 03-12-2008 at 01:27 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 03-12-2008, 02:25 PM
Jordan's Avatar   
Jordan Jordan is online now
Administrator
 
Join Date: Nov 2005
Location: Hendersonville, NC
Age: 25
Posts: 4,514
Last Blog:
Zend: PHP Security Web...
Rep Power: 50
Jordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud of
Send a message via ICQ to Jordan Send a message via AIM to Jordan Send a message via MSN to Jordan
Default Re: My first template code "newbie"

Well, your first line of code is for older versions of Joomla! (Before 1.5):

HTML Code:
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); 
Which simply states that if this script isn't executed by Joomla! then die.

Joomla! 1.5 uses:
HTML Code:
defined( '_JEXEC' ) or die( 'Direct Access to this location is not allowed.' ); 
This line will also not work in Joomla! 1.5:
HTML Code:
 <?php if ( $my->id ) initEditor(); ?> 
Joomla 1.5:
HTML Code:
if( defined( '_JEXEC' )) {
        $user           =& JFactory::getUser();
        $my->gid = $user->get('aid', 0);
    }
I don't like Dreamweaver and I don't recommend it. It is slow, clunky and has memory leaks. Use notepad, notepad2, notepad++ or vi.
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog
Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 03-12-2008, 03:35 PM
Latina.ecu's Avatar   
Latina.ecu Latina.ecu is offline
Newbie
 
Join Date: Mar 2008
Location: The Netherlands
Posts: 17
Rep Power: 2
Latina.ecu is on a distinguished road
Send a message via MSN to Latina.ecu
Default Re: My first template code "newbie"

Thanks for your reply, i made the changes, actually my instalation is joomla 10.x but i am planning to upgrade to 1.5 i think is the best way to learn, i wonder if is necessary to change the encoding in this code cause i want to have the option to publish menu items and documents with different language characters, like Mandarin, Russian and others.

Code:
<?php 
defined( '_JEXEC' ) or die( 'Direct Access to this location is not allowed.' ); 
$iso = split( '=', _ISO ); 
echo '<?xml version="1.0" encoding="'. $iso[1] .'"?' .'>'; 
?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head>
<title>My website</title>
if( defined( '_JEXEC' )) { 
$user =& JFactory::getUser(); 
$my->gid = $user->get('aid', 0); 
}
 <meta http-equiv="Content-Type" content="text/html; <?php echo _ISO; ?>" /> 
 <?php mosShowHead(); ?> 
 <link rel="stylesheet" type="text/css" href="<?php echo $GLOBALS['mosConfig_live_site']; ?>/templates/yourtemplatesname/css/template_css.css" /> 
 </head>
 <body> 
 </body> 
 </html>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 03-12-2008, 04:27 PM
Latina.ecu's Avatar   
Latina.ecu Latina.ecu is offline
Newbie
 
Join Date: Mar 2008
Location: The Netherlands
Posts: 17
Rep Power: 2
Latina.ecu is on a distinguished road
Send a message via MSN to Latina.ecu
Default Re: My first template code "newbie"

i have added some code here, but i am getting one line as an error

Code:
'; ?> if( defined( '_JEXEC' )) { $user =& JFactory::getUser(); $my->gid = $user->get('aid', 0); }
this is the modified code, i am not sure if i am doing it right, actually the layout i am trying to get is something like this at least the first page or intro design

this is the code

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type" /><title>Welcome to my Website</title>

</head>
<body><?php 
defined( '_JEXEC' ) or die( 'Direct Access to this location is not allowed.' ); 
$iso = split( '=', _ISO ); 
echo '<?xml version="1.0" encoding="'. $iso[1] .'"?' .'>'; 
?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head>
<title>My website</title>
if( defined( '_JEXEC' )) { 
$user =& JFactory::getUser(); 
$my->gid = $user->get('aid', 0); 
}
 <meta http-equiv="Content-Type" content="text/html; <?php echo _ISO; ?>" /> 
 <?php mosShowHead(); ?> 
 <link rel="stylesheet" type="text/css" href="<?php echo $GLOBALS['mosConfig_live_site']; ?>/templates/yourtemplatesname/css/template_css.css" /> 
 </head>
 <body> <table width="700" border="0" cellpadding="0" cellspacing="0"> 
 <tr align="center"> 
 <td height="50" colspan="3">SITE NAME </td> 
 </tr> 
 <tr align="center"> 
 <td colspan="3">Pathway/breadcrumb</td> 
 </tr> 
 <tr> 
 <td width="150" valign="top">Left modules</td> 
 <td width="400" valign="top"><p>Main content</p> 
 <p>More main content</p></td> 
 <td width="150" valign="top">Right modules </td>
 </tr>
 <tr align="center"> 
 <td colspan="3">Some footer text. </td> 
 </tr> 
 </table> 
 </body> 
 </html>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 03-13-2008, 08:50 AM
Latina.ecu's Avatar   
Latina.ecu Latina.ecu is offline
Newbie
 
Join Date: Mar 2008
Location: The Netherlands
Posts: 17
Rep Power: 2
Latina.ecu is on a distinguished road
Send a message via MSN to Latina.ecu
Default Re: My first template code "newbie"

reading here and there it seems that tableless layout is the best choice but what are the other options to get a table looking layot without tables?

I have created already a template_css folder and file i gues i must do something there.

Code:
<?php 
defined( '_JEXEC' ) or die( 'Direct Access to this location is not allowed.' ); 
$iso = split( '=', _ISO ); 
echo '<?xml version="1.0" encoding="'. $iso[1] .'"?' .'>'; 
?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head>
<title>My website</title>
if( defined( '_JEXEC' )) { 
$user =& JFactory::getUser(); 
$my->gid = $user->get('aid', 0); 
}
 <meta http-equiv="Content-Type" content="text/html; <?php echo _ISO; ?>" /> 
 <?php mosShowHead(); ?> 
 <link rel="stylesheet" type="text/css" href="<?php echo $GLOBALS['mosConfig_live_site']; ?>/templates/yourtemplatesname/css/template_css.css" /> 
 </head>
 <body> 
 </body> 
 </html>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Basic Calculator AfTriX VB Tutorials 3 02-29-2008 08:53 AM
Generating executable machine code steffanp General Programming 5 02-03-2008 10:01 AM
Please Help With A C Program!! siren C and C++ 7 04-17-2007 08:45 AM


All times are GMT -5. The time now is 10:07 PM.

Contest Stats

John ........ 87.50000
dargueta ........ 75.00000
Xav ........ 50.00000
MeTh0Dz ........ 20.00000
gaylo565 ........ 18.00000
Johnnyboy ........ 3.00000

Contest Rules

Ads