pragmaMx Support Forum

pragmaMx => Türkçe (Turkish) => Language Specific Support => Yabancı Modüller => Thema gestartet von: Ciwan_ in 07 Januar 2010, 06:51:02

Titel: block manset haber
Beitrag von: Ciwan_ in 07 Januar 2010, 06:51:02
<?php

if ( !defined('BLOCK_FILE') ) {
    
Header("Location: ../index.php");
    die();
}

global 
$prefix$module_name$multilingual$currentlang$db$textcolor2$bgcolor1;

$i 0;
$content1 "";
$content3 "";
$content '<center><SCRIPT language=javascript type=text/javascript>
function dgid(obj)
{
return document.getElementById(obj);
} // function dgid(obj)

function displayDIVBlock(id) {
var obj = document.getElementById(id);
if (obj != null) obj.style.display = "block"
}

function hideDIVBlock(id) {
var obj = document.getElementById(id);
if (obj != null) obj.style.display = "none"
}
var secili_manset = 0;
var manset_sayisi = 10;
var manset_degisme_suresi = 5000;
var mansetTimeout =1;
function manset_goster() {
for(i=0;i<manset_sayisi;i++) {
if (i == secili_manset) {
dgid("manset_"+i).style.display = "block";
dgid("manset_serit_"+i).className = "serit_aktif";
}
else
{
dgid("manset_"+i).style.display = "none";
dgid("manset_serit_"+i).className = "serit_pasif";
} //if
} //for
} //function
function manset_degistir(mansetId) {
if (mansetId >= 0) {
clearTimeout(mansetTimeout);
secili_manset = mansetId;
manset_goster();
}
else 
{
manset_goster();
secili_manset = secili_manset + 1;
if(secili_manset >= manset_sayisi) secili_manset = 0;

mansetTimeout = setTimeout("manset_degistir(-1)", manset_degisme_suresi);
} //if
} //function
mansetTimeout = setTimeout("manset_degistir(-1)", manset_degisme_suresi);
</SCRIPT>
         <style>
.yatay_manset { DISPLAY: none}
#manset_0 { DISPLAY: block}
.serit_pasif { BACKGROUND-COLOR: #cccaca}
.serit_aktif { BACKGROUND-COLOR: #EB1D1F}
A {TEXT-DECORATION: none}
A:active {TEXT-DECORATION: none}
A:link {TEXT-DECORATION: none}
A:hover {TEXT-DECORATION: underline}
.el { CURSOR: pointer}
DIV.transparan {FILTER: alpha(opacity=80); opacity: .80; moz-opacity: 0.8}
  </style>
<table width="482" border="0" cellpadding="0" cellspacing="0"><tr><td width="482" align="center" valign="middle">  
<DIV style="padding:0px;">
<TABLE cellSpacing=0 cellPadding=0 border=0><TR><TD style="PADDING-LEFT: 0px" valign="top" align=middle>'
;

$sql "SELECT sid, title, hometext, bodytext, haberresim, comments, counter, time FROM nuke_stories $querylang ORDER BY sid DESC LIMIT 0,10";
$result $db->sql_query($sql);
while (
$row $db->sql_fetchrow($result)) {
    
$sid $row['sid'];
    
$title $row['title'];
    
$hometext $row['hometext'];
    
$bodytext $row['bodytext'];
  $haberresim $row['haberresim'];
    
$comtotal $row['comments'];
    
$counter $row['counter'];
    
$time $row['time'];
    
    
$content1 .= '<DIV class=yatay_manset id=manset_'.$i.' style="WIDTH:482px; POSITION: relative; HEIGHT: 188px;"><a href="haberoku'.$sid.'/" ><img   src="'.$haberresim.'" width="482" border="0" height="188"  alt="'.$title.'" onmouseover=manset_degistir('.$i.');  onmouseout=manset_degistir(-1); ></a>
    <DIV style="Z-INDEX:99; LEFT:0px;WIDTH:482px;BOTTOM:0px; POSITION:absolute; HEIGHT:40px; TEXT-ALIGN:left">
    <DIV style="MARGIN-TOP: 8px; FONT-WEIGHT: bold; FONT-SIZE: 20px; MARGIN-LEFT: 10px; COLOR: #ffffff; FONT-FAMILY: Tahoma; TEXT-ALIGN: left">'
.$title.'</DIV>
    </DIV><DIV class=transparan style="LEFT: 0px; WIDTH: 482px; BOTTOM: 0px; POSITION: absolute; HEIGHT: 40px; BACKGROUND-COLOR: #000000; TEXT-ALIGN: left">
    <DIV style="MARGIN-TOP: 8px; FONT-WEIGHT: bold; FONT-SIZE: 20px; MARGIN-LEFT: 10px; COLOR: #ffffff; FONT-FAMILY: Tahoma; TEXT-ALIGN: left"> </DIV>
    </DIV></DIV>'
;
    
    
$content3 .= '<TD style="padding-top:5px;" width="44" >
    <A href="haberoku'
.$sid.'/" >
    <IMG src="'
.$haberresim.'" alt="'.$title.'" width=40 height=40 border="0" class=el style="BORDER-RIGHT: #010002 1px solid; BORDER-TOP: #010002 1px solid; MARGIN: 0px 2px 2px; BORDER-LEFT: #010002 1px solid; BORDER-BOTTOM: #010002 1px solid"
    title="'
.$title.'" onmouseover=manset_degistir('.$i.') onmouseout=manset_degistir(-1);></A></TD>';

    
$i++;
}

$content2 '</TD>
</TR>
<TR>
  <TD style="PADDING-LEFT:0px" align=middle><DIV style="WIDTH:482px;HEIGHT:50px">
      <TABLE cellSpacing=0 cellPadding=0 align=center border=0 width="482">
        <TR  width="482">
          <TD height="5"></TD>
          <TD height="5"></TD>
          <TD height="5"></TD>
          <TD height="5"></TD>
          <TD height="5"></TD>
          <TD height="5"></TD>
          <TD height="5"></TD>
          <TD height="5"></TD>
          <TD height="5"></TD>
          <TD height="5"></TD>
        </TR>
        <TR  width="482" style="BACKGROUND-COLOR: #F0F0F0;">
          <TD width="43"  class=serit_aktif  id=manset_serit_0 height="5"></TD>
          <TD width="44"   id=manset_serit_1 height="5"></TD>
          <TD width="44"   id=manset_serit_2 height="5"></TD>
          <TD width="44"   id=manset_serit_3 height="5"></TD>
          <TD width="44"   id=manset_serit_4 height="5"></TD>
          <TD width="44"   id=manset_serit_5 height="5"></TD>
          <TD width="44"   id=manset_serit_6 height="5"></TD>
          <TD width="44"   id=manset_serit_7 height="5"></TD>
          <TD width="44"   id=manset_serit_8 height="5"></TD>
          <TD width="43"   id=manset_serit_9 height="5"></TD>
        </TR>
        <TR  width="482">'
;

$content .= $content1.$content2.$content3.'</TR></TABLE></DIV></TD></TR></TABLE></DIV></td></tr></table></center>';



?>


Ben Bu Blocku Pragmaya nasil uyarliyabilirim resim kismina img images topics ne denediysem olmadi bu blocku calistirabilecek arkadas varsa sevinirim saygilar
indirmek isteyenler icin

link: http://www.4shared.com/file/190260976/b7aaf3ae/block-mansethaber.html (http://www.4shared.com/file/190260976/b7aaf3ae/block-mansethaber.html)
Titel: Re: block manset haber
Beitrag von: ahura in 08 Januar 2010, 12:11:52
resim sorunu var.  sen de uğraş ben de uğraşacam kim önce çözerse :P

<?php

defined
('mxMainFileLoaded') or die('access denied');

global 
$prefix$module_name$multilingual$currentlang$db$textcolor2$bgcolor1;

$i 0;
$content1 "";
$content3 "";
$content '<center><SCRIPT language=javascript type=text/javascript>
function dgid(obj)
{
return document.getElementById(obj);
} // function dgid(obj)

function displayDIVBlock(id) {
var obj = document.getElementById(id);
if (obj != null) obj.style.display = "block"
}

function hideDIVBlock(id) {
var obj = document.getElementById(id);
if (obj != null) obj.style.display = "none"
}
var secili_manset = 0;
var manset_sayisi = 10;
var manset_degisme_suresi = 5000;
var mansetTimeout =1;
function manset_goster() {
for(i=0;i<manset_sayisi;i++) {
if (i == secili_manset) {
dgid("manset_"+i).style.display = "block";
dgid("manset_serit_"+i).className = "serit_aktif";
}
else
{
dgid("manset_"+i).style.display = "none";
dgid("manset_serit_"+i).className = "serit_pasif";
} //if
} //for
} //function
function manset_degistir(mansetId) {
if (mansetId >= 0) {
clearTimeout(mansetTimeout);
secili_manset = mansetId;
manset_goster();
}
else 
{
manset_goster();
secili_manset = secili_manset + 1;
if(secili_manset >= manset_sayisi) secili_manset = 0;

mansetTimeout = setTimeout("manset_degistir(-1)", manset_degisme_suresi);
} //if
} //function
mansetTimeout = setTimeout("manset_degistir(-1)", manset_degisme_suresi);
</SCRIPT>
         <style>
.yatay_manset { DISPLAY: none}
#manset_0 { DISPLAY: block}
.serit_pasif { BACKGROUND-COLOR: #cccaca}
.serit_aktif { BACKGROUND-COLOR: #EB1D1F}
A {TEXT-DECORATION: none}
A:active {TEXT-DECORATION: none}
A:link {TEXT-DECORATION: none}
A:hover {TEXT-DECORATION: underline}
.el { CURSOR: pointer}
DIV.transparan {FILTER: alpha(opacity=80); opacity: .80; moz-opacity: 0.8}
  </style>
<table width="482" border="0" cellpadding="0" cellspacing="0"><tr><td width="482" align="center" valign="middle">  
<DIV style="padding:0px;">
<TABLE cellSpacing=0 cellPadding=0 border=0><TR><TD style="PADDING-LEFT: 0px" valign="top" align=middle>'
;

$sql "SELECT sid, title, hometext, bodytext,  comments, counter, time FROM ".$prefix."_stories $querylang ORDER BY sid DESC LIMIT 0,10";
$result $db->sql_query($sql);
while (
$row $db->sql_fetchrow($result)) {
    
$sid $row['sid'];
    
$title $row['title'];
    
$hometext $row['hometext'];
    
$bodytext $row['bodytext'];
  $haberresim $row['haberresim'];
    
$comtotal $row['comments'];
    
$counter $row['counter'];
    
$time $row['time'];
    
    
$content1 .= '<DIV class=yatay_manset id=manset_'.$i.' style="WIDTH:482px; POSITION: relative; HEIGHT: 188px;"><a href="haberoku'.$sid.'/" ><img   src="'.$haberresim.'" width="482" border="0" height="188"  alt="'.$title.'" onmouseover=manset_degistir('.$i.');  onmouseout=manset_degistir(-1); ></a>
    <DIV style="Z-INDEX:99; LEFT:0px;WIDTH:482px;BOTTOM:0px; POSITION:absolute; HEIGHT:40px; TEXT-ALIGN:left">
    <DIV style="MARGIN-TOP: 8px; FONT-WEIGHT: bold; FONT-SIZE: 20px; MARGIN-LEFT: 10px; COLOR: #ffffff; FONT-FAMILY: Tahoma; TEXT-ALIGN: left">'
.$title.'</DIV>
    </DIV><DIV class=transparan style="LEFT: 0px; WIDTH: 482px; BOTTOM: 0px; POSITION: absolute; HEIGHT: 40px; BACKGROUND-COLOR: #000000; TEXT-ALIGN: left">
    <DIV style="MARGIN-TOP: 8px; FONT-WEIGHT: bold; FONT-SIZE: 20px; MARGIN-LEFT: 10px; COLOR: #ffffff; FONT-FAMILY: Tahoma; TEXT-ALIGN: left"> </DIV>
    </DIV></DIV>'
;
    
    
$content3 .= '<TD style="padding-top:5px;" width="44" >
    <A href="haberoku'
.$sid.'/" >
    <IMG src="'
.$haberresim.'" alt="'.$title.'" width=40 height=40 border="0" class=el style="BORDER-RIGHT: #010002 1px solid; BORDER-TOP: #010002 1px solid; MARGIN: 0px 2px 2px; BORDER-LEFT: #010002 1px solid; BORDER-BOTTOM: #010002 1px solid"
    title="'
.$title.'" onmouseover=manset_degistir('.$i.') onmouseout=manset_degistir(-1);></A></TD>';

    
$i++;
}

$content2 '</TD>
</TR>
<TR>
  <TD style="PADDING-LEFT:0px" align=middle><DIV style="WIDTH:482px;HEIGHT:50px">
      <TABLE cellSpacing=0 cellPadding=0 align=center border=0 width="482">
        <TR  width="482">
          <TD height="5"></TD>
          <TD height="5"></TD>
          <TD height="5"></TD>
          <TD height="5"></TD>
          <TD height="5"></TD>
          <TD height="5"></TD>
          <TD height="5"></TD>
          <TD height="5"></TD>
          <TD height="5"></TD>
          <TD height="5"></TD>
        </TR>
        <TR  width="482" style="BACKGROUND-COLOR: #F0F0F0;">
          <TD width="43"  class=serit_aktif  id=manset_serit_0 height="5"></TD>
          <TD width="44"   id=manset_serit_1 height="5"></TD>
          <TD width="44"   id=manset_serit_2 height="5"></TD>
          <TD width="44"   id=manset_serit_3 height="5"></TD>
          <TD width="44"   id=manset_serit_4 height="5"></TD>
          <TD width="44"   id=manset_serit_5 height="5"></TD>
          <TD width="44"   id=manset_serit_6 height="5"></TD>
          <TD width="44"   id=manset_serit_7 height="5"></TD>
          <TD width="44"   id=manset_serit_8 height="5"></TD>
          <TD width="43"   id=manset_serit_9 height="5"></TD>
        </TR>
        <TR  width="482">'
;

$content .= $content1.$content2.$content3.'</TR></TABLE></DIV></TD></TR></TABLE></DIV></td></tr></table></center>';



?>
Titel: Re: block manset haber
Beitrag von: Ciwan_ in 09 Januar 2010, 02:23:52
temam eyi bu arada http://www.pragmamx.org/Forum-topic-30752-start-msg195838.html#new  burdakinede bak onlada ugras gece gundur ugrasiyorum kimsede yardim etmedi sagolsun  :mad2: hayde pamuk eller klawyeye :P
Titel: Re: block manset haber
Beitrag von: Ciwan_ in 09 Januar 2010, 05:04:35
Unknown column 'resim' in 'field list'
resim,resimler,images.img yani ne yazsam hata degismedi resimleri hem gostermedi bi tanesindede gosterdi boyutu kucuk sql databasese baktim resim diye bisey bulamadim bu konuda sitki abi navroz arkadas bir el atsa bu kisma ne yazilmasi gerek bildirseler sevinirim
$haberresim = $row['haberresim'];
Titel: Re: block manset haber
Beitrag von: ahura in 09 Januar 2010, 15:41:25
veritabanında zaten resim yok. resmi hometext ten ayırıp $resim olarak almak lazım. :)
Titel: Re: block manset haber
Beitrag von: ahura in 09 Januar 2010, 15:50:01
şöyle bişey olsa gerek. çalışır halde görmediğim için tamolarak olup olmadığını bilmiyorum  :BD:

<?php

defined
('mxMainFileLoaded') or die('access denied');

global 
$prefix$module_name$multilingual$currentlang$db$textcolor2$bgcolor1;

$i 0;
$content1 "";
$content3 "";
$content '<center><SCRIPT language=javascript type=text/javascript>
function dgid(obj)
{
return document.getElementById(obj);
} // function dgid(obj)

function displayDIVBlock(id) {
var obj = document.getElementById(id);
if (obj != null) obj.style.display = "block"
}

function hideDIVBlock(id) {
var obj = document.getElementById(id);
if (obj != null) obj.style.display = "none"
}
var secili_manset = 0;
var manset_sayisi = 10;
var manset_degisme_suresi = 5000;
var mansetTimeout =1;
function manset_goster() {
for(i=0;i<manset_sayisi;i++) {
if (i == secili_manset) {
dgid("manset_"+i).style.display = "block";
dgid("manset_serit_"+i).className = "serit_aktif";
}
else
{
dgid("manset_"+i).style.display = "none";
dgid("manset_serit_"+i).className = "serit_pasif";
} //if
} //for
} //function
function manset_degistir(mansetId) {
if (mansetId >= 0) {
clearTimeout(mansetTimeout);
secili_manset = mansetId;
manset_goster();
}
else 
{
manset_goster();
secili_manset = secili_manset + 1;
if(secili_manset >= manset_sayisi) secili_manset = 0;

mansetTimeout = setTimeout("manset_degistir(-1)", manset_degisme_suresi);
} //if
} //function
mansetTimeout = setTimeout("manset_degistir(-1)", manset_degisme_suresi);
</SCRIPT>
         <style>
.yatay_manset { DISPLAY: none}
#manset_0 { DISPLAY: block}
.serit_pasif { BACKGROUND-COLOR: #cccaca}
.serit_aktif { BACKGROUND-COLOR: #EB1D1F}
A {TEXT-DECORATION: none}
A:active {TEXT-DECORATION: none}
A:link {TEXT-DECORATION: none}
A:hover {TEXT-DECORATION: underline}
.el { CURSOR: pointer}
DIV.transparan {FILTER: alpha(opacity=80); opacity: .80; moz-opacity: 0.8}
  </style>
<table width="482" border="0" cellpadding="0" cellspacing="0"><tr><td width="482" align="center" valign="middle">  
<DIV style="padding:0px;">
<TABLE cellSpacing=0 cellPadding=0 border=0><TR><TD style="PADDING-LEFT: 0px" valign="top" align=middle>'
;

$sql "SELECT sid, title, hometext, bodytext,  comments, counter, time FROM ".$prefix."_stories $querylang ORDER BY sid DESC LIMIT 0,10";
$result $db->sql_query($sql);
while (
$row $db->sql_fetchrow($result)) {
    
$sid $row['sid'];
    
$title $row['title'];
    
$hometext $row['hometext'];
    
$bodytext $row['bodytext'];
  $haberresim $row['haberresim'];
    
$comtotal $row['comments'];
    
$counter $row['counter'];
    
$time $row['time'];
    
preg_match('#<\s*img [^\>]*src\s*=\s*(["\'])(.*?)\1#im'$hometext$image);
    if (
is_array($image) && !empty($image)) {
        
            
$resim=$image[2];
        
    } else {
//blank news image
$resim MX_BASE_URL."media/images/blank_news.jpg";
}

    
$content1 .= '<DIV class=yatay_manset id=manset_'.$i.' style="WIDTH:482px; POSITION: relative; HEIGHT: 188px;"><a href="haberoku'.$sid.'/" ><img   src="'.$resim.'"  width="482" border="0" height="188"  alt="'.$title.'" onmouseover=manset_degistir('.$i.');  onmouseout=manset_degistir(-1); ></a>
    <DIV style="Z-INDEX:99; LEFT:0px;WIDTH:482px;BOTTOM:0px; POSITION:absolute; HEIGHT:40px; TEXT-ALIGN:left">
    <DIV style="MARGIN-TOP: 8px; FONT-WEIGHT: bold; FONT-SIZE: 20px; MARGIN-LEFT: 10px; COLOR: #ffffff; FONT-FAMILY: Tahoma; TEXT-ALIGN: left">'
.$title.'</DIV>
    </DIV><DIV class=transparan style="LEFT: 0px; WIDTH: 482px; BOTTOM: 0px; POSITION: absolute; HEIGHT: 40px; BACKGROUND-COLOR: #000000; TEXT-ALIGN: left">
    <DIV style="MARGIN-TOP: 8px; FONT-WEIGHT: bold; FONT-SIZE: 20px; MARGIN-LEFT: 10px; COLOR: #ffffff; FONT-FAMILY: Tahoma; TEXT-ALIGN: left"> </DIV>
    </DIV></DIV>'
;
    
    
$content3 .= '<TD style="padding-top:5px;" width="44" >
    <A href="haberoku'
.$sid.'/" >
    <IMG src="'
.$resim.'" alt="'.$title.'" width=40 height=40 border="0" class=el style="BORDER-RIGHT: #010002 1px solid; BORDER-TOP: #010002 1px solid; MARGIN: 0px 2px 2px; BORDER-LEFT: #010002 1px solid; BORDER-BOTTOM: #010002 1px solid"
    title="'
.$title.'" onmouseover=manset_degistir('.$i.') onmouseout=manset_degistir(-1);></A></TD>';

    
$i++;
}

$content2 '</TD>
</TR>
<TR>
  <TD style="PADDING-LEFT:0px" align=middle><DIV style="WIDTH:482px;HEIGHT:50px">
      <TABLE cellSpacing=0 cellPadding=0 align=center border=0 width="482">
        <TR  width="482">
          <TD height="5"></TD>
          <TD height="5"></TD>
          <TD height="5"></TD>
          <TD height="5"></TD>
          <TD height="5"></TD>
          <TD height="5"></TD>
          <TD height="5"></TD>
          <TD height="5"></TD>
          <TD height="5"></TD>
          <TD height="5"></TD>
        </TR>
        <TR  width="482" style="BACKGROUND-COLOR: #F0F0F0;">
          <TD width="43"  class=serit_aktif  id=manset_serit_0 height="5"></TD>
          <TD width="44"   id=manset_serit_1 height="5"></TD>
          <TD width="44"   id=manset_serit_2 height="5"></TD>
          <TD width="44"   id=manset_serit_3 height="5"></TD>
          <TD width="44"   id=manset_serit_4 height="5"></TD>
          <TD width="44"   id=manset_serit_5 height="5"></TD>
          <TD width="44"   id=manset_serit_6 height="5"></TD>
          <TD width="44"   id=manset_serit_7 height="5"></TD>
          <TD width="44"   id=manset_serit_8 height="5"></TD>
          <TD width="43"   id=manset_serit_9 height="5"></TD>
        </TR>
        <TR  width="482">'
;

$content .= $content1.$content2.$content3.'</TR></TABLE></DIV></TD></TR></TABLE></DIV></td></tr></table></center>';



?>
Titel: Re: block manset haber
Beitrag von: Ciwan_ in 10 Januar 2010, 11:27:32
guzel guzel olmuss :BD: bide diyer modulede care bulsak