PDA

Orijinalini görmek için tıklayınız : Joomla 1.0 Temasını Joomla 2.5 Temasına Dönüştürmek



nizamgl
06-01-2012, 15:46
Buradaki (http://forum.joomla.gen.tr/joomla-2-5-tema/218-joomla-gen-tr-2-5-tema-yapmak.html)başlıkta sorulmuştu o nedenle bu anlatımı hazırlıyorum temamız 1.0 teması olan JS_Lunar Eclipse ismli tema
Joomla 1.0 temalarını joomla 2.5 temasına dönüştürmek için bazı kodları değiştirmek gerekir bu kodlar yeni bir tema yapımında da kullanılan kodlardır

önce templateDetails.xml dosyasındaki düzenlemeleri yapalım


<?xml version="1.0" encoding="iso-8859-1"?>
<mosinstall type="template" version="4.5.1">
<name>JS_Lunar Eclipse</name>
<creationDate></creationDate>
<author>JoomlaShack</author>
<copyright>GNU/GPL</copyright>
<authorEmail>joomlashack@gmail.com</authorEmail>
<authorUrl>http://www.joomlashack.com</authorUrl>
<version>3.0</version>
<description>LunarEclipse is a tribute template to the ever popular SolarFlare template originated by rhuk with some modifications by JoomlaShack.</description>
<files>
<filename>scripts/moo.fx.js</filename>
<filename>scripts/moo.fx.pack.js</filename>
<filename>scripts/prototype.lite.js</filename>
<filename>index.php</filename>
<filename>templateDetails.xml</filename>
<filename>template_thumbnail.png</filename>
<filename>js/template.css.php</filename>
</files>
<images>
<filename>images/advertisement.png</filename>
<filename>images/arrow.png</filename>
<filename>images/bodouterbg.png</filename>
<filename>images/bullet.png</filename>
<filename>images/emailButton.png</filename>
<filename>images/header_short.jpg</filename>
<filename>images/header_short.png</filename>
<filename>images/indent1.png</filename>
<filename>images/indent2.png</filename>
<filename>images/indent3.png</filename>
<filename>images/indent4.png</filename>
<filename>images/menu_bg.png</filename>
<filename>images/pdf_button.png</filename>
<filename>images/printButton.png</filename>
<filename>images/rating_star.png</filename>
<filename>images/rating_star_blank.png</filename>
<filename>images/sechdr1bg.png</filename>
<filename>images/sechdr2bg.png</filename>
<filename>images/sechdrbg.png</filename>
<filename>images/showhide.jpg</filename>
<filename>images/showhide.png</filename>
<filename>images/spacer.png</filename>
<filename>images/subhead_bg.png</filename>
<filename>images/Thumbs.db</filename>
</images>
<css>
<filename>css/editor_content.css</filename>
<filename>css/template_css.css</filename>
</css>
</mosinstall>

kodları 2.5 ye göre değiştirelim burada modül pozisyonları tanımlanmamış onları da ekleyelim


<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE install PUBLIC "-//Joomla! 1.6//DTD template 1.0//EN" "http://www.joomla.org/xml/dtd/1.6/template-install.dtd">
<extension version="2.5" type="template" client="site">
<name>JS_Lunar Eclipse</name>
<creationDate></creationDate>
<author>JoomlaShack</author>
<copyright>GNU/GPL</copyright>
<authorEmail>joomlashack@gmail.com</authorEmail>
<authorUrl>http://www.joomlashack.com</authorUrl>
<version>3.0</version>
<description>LunarEclipse is a tribute template to the ever popular SolarFlare template originated by rhuk with some modifications by JoomlaShack.</description>
<files>
<filename>scripts/moo.fx.js</filename>
<filename>scripts/moo.fx.pack.js</filename>
<filename>scripts/prototype.lite.js</filename>
<filename>index.php</filename>
<filename>templateDetails.xml</filename>
<filename>template_thumbnail.png</filename>
<filename>js/template.css.php</filename>
</files>
<images>
<filename>images/advertisement.png</filename>
<filename>images/arrow.png</filename>
<filename>images/bodouterbg.png</filename>
<filename>images/bullet.png</filename>
<filename>images/emailButton.png</filename>
<filename>images/header_short.jpg</filename>
<filename>images/header_short.png</filename>
<filename>images/indent1.png</filename>
<filename>images/indent2.png</filename>
<filename>images/indent3.png</filename>
<filename>images/indent4.png</filename>
<filename>images/menu_bg.png</filename>
<filename>images/pdf_button.png</filename>
<filename>images/printButton.png</filename>
<filename>images/rating_star.png</filename>
<filename>images/rating_star_blank.png</filename>
<filename>images/sechdr1bg.png</filename>
<filename>images/sechdr2bg.png</filename>
<filename>images/sechdrbg.png</filename>
<filename>images/showhide.jpg</filename>
<filename>images/showhide.png</filename>
<filename>images/spacer.png</filename>
<filename>images/subhead_bg.png</filename>
<filename>images/Thumbs.db</filename>
</images>
<css>
<filename>css/editor_content.css</filename>
<filename>css/template_css.css</filename>
</css>
<positions>
<position>user1</position>
<position>user2</position>
<position>user3</position>
<position>user4</position>
<position>top</position>
<position>banner</position>
<position>left</position>
<position>right</position>
<position>debug</position>
</positions>
</extension>

kalın kısımlar değitirdiğimiz kısımlar bu dosyayı düzenliyerek temamızın 2.5 e kurulabilmesini sağladık

şimdi de index.php dosyasındaki değişiklikleri yapalım

dosyanın tepesindeki

<?php
defined( '_VALID_MOS' ) or die( 'Restricted access' );
// needed to seperate the ISO number from the language file constant _ISO
$iso = explode( '=', _ISO );
// xml prolog
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">
<script type="text/javascript" src="<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->getTemplate(); ?>/scripts/prototype.lite.js"></script>
<script type="text/javascript" src="<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->getTemplate(); ?>/scripts/moo.fx.js"></script>
<script type="text/javascript" src="<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->getTemplate(); ?>/scripts/moo.fx.pack.js"></script>
<script type="text/javascript">
window.onload = function() {
fadesize = new fx.FadeSize('left_outer', {duration: 500});
}
</script>
<head>
<?php mosShowHead(); ?>
<?php
if ( $my->id ) {
initEditor();
}

?>
<meta http-equiv="Content-Type" content="text/html; <?php echo _ISO; ?>" />
<link href="<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->getTemplate(); ?>/css/template_css.css" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="<?php echo $mosConfig_live_site;?>/images/favicon.ico" />
</head>

kodlarını


<?php defined( '_JEXEC' ) or die( 'Restricted access' );?>
<!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>
<jdoc:include type="head" />
<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template?>/scripts/prototype.lite.js"></script>
<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template?>/scripts/moo.fx.js"></script>
<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template?>/scripts/moo.fx.pack.js"></script>
<script type="text/javascript">
window.onload = function() {
fadesize = new fx.FadeSize('left_outer', {duration: 500});
}
</script>

<?php
if ( $my->id ) {
initEditor();
}

?>
<link href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template?>/css/template_css.css" rel="stylesheet" type="text/css" />
</head>

ile değiştirelim

tema dosyaları yolunu tanımlayan alttaki kodları


<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->getTemplate(); ?>

yeni kodlarla değiştirelim bu kodlar temadan temaya değişiklik gösterse de ben bu kodları kullanıyorum


<?php echo $this->baseurl ?>/templates/<?php echo $this->template?>

modülleri eklemek için
1.0 da kullanılan kodları


<?php mosLoadModules ( 'user3', -1 ); ?>

2.5 de kullanılanlarla değiştirelim burda dikkat edeceğimiz konu pozisyon isimlerini aynı yapmak yani bu kodlarda user3 olarak tanımlanan pozisyonu yeni kodlarda da user3 olarak tanımlamak

<jdoc:include type="modules" name="user3" style="xhtml" />

ve pozisyonda modül yoksa o pozisyonu tanımlayan html kodlarının görünmemesi için


<?php if($this->countModules('user3')) : ?>
<div id="buttons_outer">
<div id="buttons_inner">
<div id="buttons">
<jdoc:include type="modules" name="user3" style="xhtml" />
</div>
</div>
</div>
<?php endif; ?>

<?php if($this->countModules('pozisyonadı')) : ?>
html kodlar
<?php endif; ?>

kodlarını ekliyelim

içerikleri göstermek için kullanılan


<?php mosMainBody(); ?>

kodunu değiştirelim hata mesajları için <jdoc:include type="message" /> kodlarını da ekleyelim



<jdoc:include type="message" />
<jdoc:include type="component" />

index.php dosyasının en son hali ise


<?php defined( '_JEXEC' ) or die( 'Restricted access' );?>
<!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>
<jdoc:include type="head" />
<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template?>/scripts/prototype.lite.js"></script>
<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template?>/scripts/moo.fx.js"></script>
<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template?>/scripts/moo.fx.pack.js"></script>

<script type="text/javascript">
window.onload = function() {
fadesize = new fx.FadeSize('left_outer', {duration: 500});
}
</script>

<link href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template?>/css/template_css.css" rel="stylesheet" type="text/css" />
</head>
<body>

<table border="0" cellpadding="0" cellspacing="0" width="908" align="center">
<tr>
<td class="outline">
<table width="902" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>
<?php if($this->countModules('user3')) : ?>
<div id="buttons_outer">
<div id="buttons_inner">
<div id="buttons">
<jdoc:include type="modules" name="user3" style="xhtml" />
</div>
</div>
</div>
<?php endif; ?>
<?php if($this->countModules('user4')) : ?>
<div id="search_outer">
<div id="search_inner">
<jdoc:include type="modules" name="user4" style="xhtml" />
</div>
</div>
<?php endif; ?>
</td>
</tr>
<tr>
<td>
<div id="header_outer">
<div id="header">
<div id="pathway_text">
<a href="#" onclick="opacity.toggle();"></a>
<a href="#" onclick="fadesize.toggle('width');"><img src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template?>/images/showhide.png" id="showhide" border="0"></a>
</div>
</div>
<?php if($this->countModules('top')) : ?>
<div id="top_outer">
<div id="top_inner">
<jdoc:include type="modules" name="top" style="xhtml" />
</div>
</div>
<?php endif; ?>
</div>
</td>
</tr>
<tr>
<td id="main_area">
<table width="902" cellpadding="0" cellspacing="0">
<tr>
<?php if($this->countModules('left')) : ?>
<td id="left_side">
<div id="left_outer">
<div id="left_inner">
<jdoc:include type="modules" name="left" style="xhtml" />
</div>
</div>
</td>
<?php endif; ?>
<td id="main_body">
<?php if($this->countModules('banner')) : ?>
<div id="banner_inner">
<jdoc:include type="modules" name="banner" style="xhtml" />
</div>
<?php endif; ?>

<table width="100%" border="0" cellspacing="0" cellpadding="0" >
<tr>
<?php if($this->countModules('user1')) : ?>
<td width="50%">
<div class="user1_inner">
<jdoc:include type="modules" name="user1" style="xhtml" />
</div>
</td>
<?php endif; ?>
<?php if($this->countModules('user2')) : ?>
<td width="50%">
<div class="user2_inner">
<jdoc:include type="modules" name="user2" style="xhtml" />
</div>
</td>
<?php endif; ?>
</tr>
</table>

<div id="body_outer">
<jdoc:include type="message" />
<jdoc:include type="component" />
<div class="clr"></div>
</div>
</td>
<?php if($this->countModules('right')) : ?>
<td id="right_side">
<div id="right_outer">
<div id="right_inner">
<jdoc:include type="modules" name="right" style="xhtml" />
</div>
</div>
</td>
<?php endif; ?>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<div align="center" class="dd">original solarflare design by <a href="http://www.jamboworks.com/">rhuk</a><br />
<a href="http://www.joomlashack.com/">joomla templates by joomlashack</a>
</div>
<?php include("js/template.css.php"); ?>
<jdoc:include type="modules" name="debug" style="xhtml" />
</body>
</html>


Bu anlatım genel olarak temayı 2.5 e dönüştüren bir anlatımdır 2.5 dönüşen temamızda detayları ise css dosyasınaki kodarla oynayarak düzenlememiz gerekir ki mutlaka css den kaynaklı uyumsuzluklar çıkacaktır

temayı ben lokalde test ettim ve anlatımı böyle hazırladım temamız 2.5 e sorunsuz bir şekilde kuruldu

132

İlyas
06-01-2012, 16:30
mantığı kavramak adına güzel bir ders sağolun sıfırdan tema tasarlamak noktasında bir ders de olacak mı?

nizamgl
06-01-2012, 16:32
mantığı kavramak adına güzel bir ders sağolun sıfırdan tema tasarlamak noktasında bir ders de olacak mı?zaten aynı kodlar kullanılıyor ama sıfırdan basit haliyle bir tema yapımı da anlatılabilir zaman bulursam o nu da eklerim

Akar
06-01-2012, 16:34
Eline sağlık Nizam. Başlığı Joomla 1.0 temasını 2.5 teması yapmak diye değiştireyim mi?

nizamgl
06-01-2012, 16:41
Eline sağlık Nizam. Başlığı Joomla 1.0 temasını 2.5 teması yapmak diye değiştireyim mi?ben onu düşünemedim hocam o şekilde daha uygun olur

Akar
06-01-2012, 16:41
Tamamdır, tweet de attım.

nizamgl
06-01-2012, 16:45
Eline sağlık Nizam. Başlığı Joomla 1.0 temasını 2.5 teması yapmak diye değiştireyim mi?
bir de iletiyi düzenleyip kaydedince
<filename>images/advertisement.png</filename>
buraya alttaki koyu kısımdaki kodları otomatik ekliyor
<filename>http://forum.joomla.gen.tr/images/advertisement.png</filename>

tekil
06-01-2012, 23:32
Eline sağlık. Mantığı kavramak açısından çok yararlı bir ders olmuş.

simplex
07-01-2012, 01:19
Süper paylaşım süper anlatım sağolun. Bu Forumda kimsenin sırtı yere gelmez saygılar kolay gelsin.

ugurus
02-02-2012, 18:11
arkadaşım ilk iki kutucuktaki şeyi anlamadım.
nasıl neye göre değiştiriyoruz ?
3 tane temam var. bir tanesini dönüştürmek istiyorum 1.0 dan 2.5 a.


ilk iki kutucuğu anlayamadığim için diğer kutucuklara odaklanamadım. ilk ikutucuğu anlayıncada gerisini anlayacağımın garantisi yok yani. :)

Akar
02-02-2012, 18:35
arkadaşım ilk iki kutucuktaki şeyi anlamadım.
nasıl neye göre değiştiriyoruz ?
3 tane temam var. bir tanesini dönüştürmek istiyorum 1.0 dan 2.5 a.


ilk iki kutucuğu anlayamadığim için diğer kutucuklara odaklanamadım. ilk ikutucuğu anlayıncada gerisini anlayacağımın garantisi yok yani. :)Bir tane 2.5 temasına (mesela 2.5.0 paketini indirip içinden çıkan temaya) bakıp, xml dosyasının onunkine göre düzenleyin demek istemiş arkadaş. Örneklemeyi yapmamış, herhangi bir 2.5 temasından bakılabilir diye :)

ugurus
03-02-2012, 13:15
böyle birşey oluyorsa mümkünse yapıcaz artık. bir kaç tema var çok seviyorum. onları değiştirebilsem gerçekten güzel olur 2.5 için.

nizamgl
03-02-2012, 14:43
ilk kutucuktaki kodlar temanın orjinal joomla 1.0 sürümü için olan kodlar
ikinci kutucuk ta joomla 2.5 sürümü için düzenlenmiş hali

1.0 sürümü için kodlar

<?xml version="1.0" encoding="iso-8859-1"?>
<mosinstall type="template" version="4.5.1">


</mosinstall>

2.5 sürümü için değiştir

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE install PUBLIC "-//Joomla! 1.6//DTD template 1.0//EN" "http://www.joomla.org/xml/dtd/1.6/template-install.dtd">
<extension version="2.5" type="template" client="site">


</extension>

1.0 sürümünde templatedetail.xml dosyasında pozisyon adları belirtilmez
2.5 sürümünde bu dosya da pozisyon adlarını belitrmeniz gerekir
yani alttaki kodları eklemelisiniz


<positions>
<position>user1</position>
<position>user2</position>
<position>user3</position>
<position>user4</position>
<position>top</position>
<position>banner</position>
<position>left</position>
<position>right</position>
<position>debug</position>
</positions>

ikinci kutucuğu incelersen kodların nerede olduğunu görebilirsin sadece belirttiğim kodları değiştiriyoruz diğer kısımlar aynı kalıyor

hugeboss
18-03-2012, 02:14
Hocam anlatım için teşekkürler.

1.0 için demişsiniz, peki 1,5 - 1,6 - 1,7 temalar içinde geçerlimi anlattıklarınız ?

Özellikle 1,7 için geçerlimidir ? eğer geçerliyse 1,7 çıktığında baya bi 1,7 tema editlemiştim bunları 2,5 yapabilirsek eğer süper olur :)

Yardımlarınız için teşekkür ederim.

ekremyahya
12-04-2012, 20:26
İletiniz warez içerik içerdiğinden dolayı silinmiştir.

ekremyahya
12-04-2012, 23:37
merhaba 1.0.15 ja procyon temasını Joomla 2.5.4 ya uyarlayabılırmısınız lutfen yapamadım bı turlu. acıl yardım :( :(

Akar
13-04-2012, 01:35
merhaba 1.0.15 ja procyon temasını Joomla 2.5.4 ya uyarlayabılırmısınız lutfen yapamadım bı turlu. acıl yardım :( :(Konu temalarınızı çevireyim diye açılmamış :) buna bakarak siz de temanızı çevirebilirsiniz diye açılmış. Siz de temanızı buna göre çevirebilir ya da üreticisinden isteyebilirsiniz. Ayrıca arkadaşa özel mesaj göndererek bu işi ücretli olarak yapıp yapmayacağını sorabilirsiniz. Temanızın burada dönüştürülmesi, lisansı açısından mümkün değil.

Ümit
08-05-2012, 22:00
Joomla.org 'da yayınlanan Joomla 1.5 temayı Joomla 2.5 'e dönüştürme dersi de faydalı olacaktır.

How to convert Joomla 1.5 template to Joomla 2.5 template (http://magazine.joomla.org/issues/Issue-May-2012/item/740-How-to-convert-Joomla-15-template-to-Joomla-25)