Tarih: 2007-06-11, 14:26:32 Mesaj konusu: Block boyutlarını nasıl birbirinden farklı yaparım?
Herkeze Merhaba;
Arkadaşlar ben iCGstation temasında blocks.html boyutlarını değiştirdim biraz blockların ikisininde boyutu büyüdü ama ben sadece sol blockların büyümesini istiyorum sağ blocklar aynı kalsın bunu nasıl yaparım ?
ac sımdı sol bloku left.html mesela orayı buyuk yapmak ıstıyorsun hemen ık satırında su yazar <table width= hemen yanında d 200 yazar 150 yazar yanı bı rakam yazar mesela solu buyuk gıstermek ıstıyorsun 200 yap sag bloku ac right.html yı onunda yanıdır kod aynı yerde onuda al 175 yap al sana odu sen ıstedıgın rakamı yaz
ac sımdı sol bloku left.html mesela orayı buyuk yapmak ıstıyorsun hemen ık satırında su yazar <table width= hemen yanında d 200 yazar 150 yazar yanı bı rakam yazar mesela solu buyuk gıstermek ıstıyorsun 200 yap sag bloku ac right.html yı onunda yanıdır kod aynı yerde onuda al 175 yap al sana odu sen ıstedıgın rakamı yaz
Dıııt yanlış cevap.. kardeş theme.php ye gir sağ ve sol blokları ayır ordan sagblok.html solblok.html diye sonra unları kafana göre yap ve temanın içine at nasıl yapacam dersen theme den o senin temana göre değişir örnek olarak SMN_C teması al burdaki sağ ve sol bloklar birbirinden ayrı..
Tarih: 2007-06-11, 19:01:19 Mesaj konusu: Re: Block boyutlarını nasıl birbirinden farklı yaparım?
MuratKiLiC :
Öncelikle kullanmış olduğunuz temanın theme.php dosyasını notepad aracılığıyla açınız.
Daha sonra bu dosya içerisinde aşağıdaki kodu aratınız.
Kod:
$tmpl_file = "themes/Temaniz/blocks.html";
büyük ihtimal en alttadır.
bu kısmı silip aşağıdaki kodları ekleyiniz.
Kod:
if ($swapleftorright=="0") { //SAG SOL BLOCK AYARLARI BLOCKLARIN YERINI DEGISTIRMEK ICIN 1 YAPIN
$tmpl_file = "themes/temanız/sagblok.html";
} else {
$tmpl_file = "themes/temanız/solblok.html";
}
daha sonra sagblok.html ve solblok.html dosyası hazırlayıp temanızın klasör içerisine gönderin. solblok.html'deki tableleri genişleterek istediğiniz sonuca ulaşabilirsiniz.
dıııt :d buda yanlıs. ilk basta theme.phpde swapleftorright değerini tanımlamanız gerekir. ben temalarımı icg üzerinden yapıyorum artisbaronla paylasmıstım. o theme.phpyi eklerse gözatabilirsiniz.
/************************************************************/
/* Function themeheader() */
/* */
/* Control the header for your site. You need to define the */
/* BODY tag and in some part of the code call the blocks */
/* function for left side with: blocks(left); */
/************************************************************/
function themeheader() {
global $admin, $user, $banners, $sitename, $slogan, $c o o k i e, $prefix, $db, $name, $nukeurl, $anonymous;
if ($banners == 1) {
$numrows = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_banner WHERE type='0' AND active='1'"));
/* Get a random banner if exist any. */
/* More efficient random stuff, thanks to Cristian Arroyo from http://www.planetalinux.com.ar */
$tmpl_file = "themes/GARGARA/left_center.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
e v a l($thefile);
print $r_file;
}
/************************************************************/
/* Function themefooter() */
/* */
/* Control the footer for your site. You don't need to */
/* close BODY and HTML tags at the end. In some part call */
/* the function for right blocks with: blocks(right); */
/* Also, $index variable need to be global and is used to */
/* determine if the page your're viewing is the Homepage or */
/* and internal one. */
/************************************************************/
function themefooter() {
global $index, $foot1, $foot2, $foot3, $foot4, $copyright, $totaltime, $footer_message;
if ($index == 1) {
$tmpl_file = "themes/GARGARA/center_right.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
e v a l($thefile);
}
$tmpl_file = "themes/GARGARA/footer.html";
$footer_message = "$foot1<br>$foot2<br>$foot4";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
e v a l($thefile);
print $r_file;
}
/************************************************************/
/* Function themeindex() */
/* */
/* This function format the stories on the Homepage */
/************************************************************/
/************************************************************/
/* Function themearticle() */
/* */
/* This function format the stories on the story page, when */
/* you click on that "Read More..." link in the home */
/************************************************************/
/************************************************************/
/* Function themesidebox() */
/* */
/* Control look of your blocks. Just simple. */
/************************************************************/
function themesidebox($title, $content) {
global $swapleftorright;
if ($swapleftorright=="0") {
$tmpl_file = "themes/GARGARA/bloksag.html";
} else {
$tmpl_file = "themes/GARGARA/bloksol.html";
}
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
e v a l($thefile);
print $r_file;
}
/************************************************************/
/* Function themeheader() */
/* */
/* Control the header for your site. You need to define the */
/* BODY tag and in some part of the code call the blocks */
/* function for left side with: blocks(left); */
/************************************************************/
function themeheader() {
global $admin, $user, $banners, $sitename, $slogan, $c o o k i e, $prefix, $db, $name, $nukeurl, $anonymous;
if ($banners == 1) {
$numrows = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_banner WHERE type='0' AND active='1'"));
/* Get a random banner if exist any. */
/* More efficient random stuff, thanks to Cristian Arroyo from http://www.planetalinux.com.ar */
$tmpl_file = "themes/GARGARA/left_center.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
e v a l($thefile);
print $r_file;
}
/************************************************************/
/* Function themefooter() */
/* */
/* Control the footer for your site. You don't need to */
/* close BODY and HTML tags at the end. In some part call */
/* the function for right blocks with: blocks(right); */
/* Also, $index variable need to be global and is used to */
/* determine if the page your're viewing is the Homepage or */
/* and internal one. */
/************************************************************/
function themefooter() {
global $index, $foot1, $foot2, $foot3, $foot4, $copyright, $totaltime, $footer_message;
if ($index == 1) {
$tmpl_file = "themes/GARGARA/center_right.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
e v a l($thefile);
}
$tmpl_file = "themes/GARGARA/footer.html";
$footer_message = "$foot1<br>$foot2<br>$foot4";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
e v a l($thefile);
print $r_file;
}
/************************************************************/
/* Function themeindex() */
/* */
/* This function format the stories on the Homepage */
/************************************************************/
/************************************************************/
/* Function themearticle() */
/* */
/* This function format the stories on the story page, when */
/* you click on that "Read More..." link in the home */
/************************************************************/
/************************************************************/
/* Function themesidebox() */
/* */
/* Control look of your blocks. Just simple. */
/************************************************************/
function themesidebox($title, $content) {
global $swapleftorright;
if ($swapleftorright=="0") {
$tmpl_file = "themes/GARGARA/bloksag.html";
} else {
$tmpl_file = "themes/GARGARA/bloksol.html";
}
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
e v a l($thefile);
print $r_file;
}
?>
bak icgnin theme.php si, (hemen hemen) bununla kendininkini karsılastır.
---BUL--------------
else {
blocks(left);
---Sonrasına Ekle----------------------------
global $swapleftorright;
$swapleftorright = "1";
$swapleftorright = "0";
}
---Bul------------------------------
/************************************************************/
/* Function themesidebox() */
/* */
/* Control look of your blocks. Just simple. */
/************************************************************/
(en sonda)
-----sonrasını şu şekilde değiştir------
function themesidebox($title, $content) {
global $swapleftorright;
if ($swapleftorright=="0") {
$tmpl_file = "themes/iCGstation/bloksag.html";
} else {
$tmpl_file = "themes/iCGstation/bloksol.html";
}
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
e v a l($thefile);
print $r_file;
}
?>
bunları yaptıktan sonra temanın içindeki blocks.html dosyasını bilgisayarına indir. Kopyasını olustur ve adlarını bloksag.html ve bloksol.html olarak değiştir. daha sonra üzerlerinde istediğin gibi oynama yapabilirsin.
/************************************************************/
/* Function themeheader() */
/* */
/* Control the header for your site. You need to define the */
/* BODY tag and in some part of the code call the blocks */
/* function for left side with: blocks(left); */
/************************************************************/
function themeheader() {
global $admin, $user, $banners, $sitename, $slogan, $c o o k i e, $prefix, $db, $nukeurl, $anonymous;
if ($banners == 1) {
$numrows = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_banner WHERE type='0' AND active='1'"));
if (!is_admin($admin)) {
$db->sql_query("UPDATE ".$prefix."_banner SET impmade=impmade+1 WHERE bid='$bid'");
}
if($numrows>0) {
$sql2 = "SELECT cid, imptotal, impmade, clicks, date FROM ".$prefix."_banner WHERE bid='$bid'";
$result2 = $db->sql_query($sql2);
$row2 = $db->sql_fetchrow($result2);
$cid = $row2[cid];
$imptotal = $row2[imptotal];
$impmade = $row2[impmade];
$clicks = $row2[clicks];
$date = $row2[date];
/* Check if this impression is the last one and print the banner */
if (($imptotal <= $impmade) AND ($imptotal != 0)) {
$db->sql_query("UPDATE ".$prefix."_banner SET active='0' WHERE bid='$bid'");
$sql3 = "SELECT name, contact, email FROM ".$prefix."_bannerclient WHERE cid='$cid'";
$result3 = $db->sql_query($sql3);
$row3 = $db->sql_fetchrow($result3);
$c_name = $row3[name];
$c_contact = $row3[contact];
$c_email = $row3[email];
if ($c_email != "") {
$from = "$sitename <$adminmail>";
$to = "$c_contact <$c_email>";
$message = ""._HELLO." $c_contact:\n\n";
$message .= ""._THISISAUTOMATED."\n\n";
$message .= ""._THERESULTS."\n\n";
$message .= ""._TOTALIMPRESSIONS." $imptotal\n";
$message .= ""._CLICKSRECEIVED." $clicks\n";
$message .= ""._IMAGEURL." $imageurl\n";
$message .= ""._CLICKURL." $clickurl\n";
$message .= ""._ALTERNATETEXT." $alttext\n\n";
$message .= ""._HOPEYOULIKED."\n\n";
$message .= ""._THANKSUPPORT."\n\n";
$message .= "- $sitename "._TEAM."\n";
$message .= "$nukeurl";
$subject = "$sitename: "._BANNERSFINNISHED."";
mail($to, $subject, $message, "From: $from\nX-Mailer: PHP/" . phpversion());
}
}
$showbanners = "<a href=\"banners.php?op=click&bid=$bid\" target=\"_blank\"><img src=\"$imageurl\" border=\"0\" alt='$alttext' title='$alttext'></a>";
}
}
c o o k i edecode($user);
$username = $c o o k i e[1];
if ($username == "") {
$username = "Anonyme";
}
echo "<body bgcolor=\"#000000\" text=\"#000000\" leftmargin=\"10\" topmargin=\"10\" marginwidth=\"10\" marginheight=\"10\">";
if ($username == "Anonyme") {
$theuser = " <a href=\"modules.php?name=Your_Account&op=new_user\">Siteye Kaydol!";
} else {
$theuser = " Bienvenue $username!";
}
$tmpl_file = "themes/Coldsteel/header.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
e v a l($thefile);
print $r_file;
blocks(left);
$tmpl_file = "themes/Coldsteel/left_center.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
e v a l($thefile);
print $r_file;
}
/************************************************************/
/* Function themefooter() */
/* */
/* Control the footer for your site. You don't need to */
/* close BODY and HTML tags at the end. In some part call */
/* the function for right blocks with: blocks(right); */
/* Also, $index variable need to be global and is used to */
/* determine if the page your're viewing is the Homepage or */
/* and internal one. */
/************************************************************/
function themefooter() {
global $index, $foot1, $foot2, $foot3, $foot4, $copyright, $totaltime;
if (defined('INDEX_FILE')) {
$tmpl_file = "themes/Coldsteel/center_right.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
e v a l($thefile);
print $r_file;
blocks(right);
}
$tmpl_file = "themes/Coldsteel/footer.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
e v a l($thefile);
print $r_file;
echo "<center>\n";
echo "<br>\n";
}
/************************************************************/
/* Function themeindex() */
/* */
/* This function format the stories on the Homepage */
/************************************************************/
/************************************************************/
/* Function themearticle() */
/* */
/* This function format the stories on the story page, when */
/* you click on that "Read More..." link in the home */
/************************************************************/
/************************************************************/
/* Function themesidebox() */
/* */
/* Control look of your blocks. Just simple. */
/************************************************************/
function themesidebox($title, $content) {
$tmpl_file = "themes/Coldsteel/blocks.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
e v a l($thefile);
print $r_file;
}
Bu forumda yeni başlıklar açamazsınız Bu forumdaki başlıklara cevap veremezsiniz Bu forumdaki mesajlarınızı değiştiremezsiniz Bu forumdaki mesajlarınızı silemezsiniz Bu forumdaki anketlerde oy kullanamazsınız