• 23-05-2009, 03:21:11
    #1
    Kimlik doğrulama veya yönetimden onay bekliyor.
    dökümanları okuyarak yapdığım bir xml çıkdı sayfası var ama çalışmıyor sorunun nerde olduğunu bulamadım.
    Orjinal php kodum.xml olmadan
    <?php
    include("baglan.php");
    $sorgu = mysql_query ("SELECT * FROM gallery");
    while ($kayit=mysql_fetch_array ($sorgu)){
    $icerik =$kayit["imgoriginalname"];
    $icerik2 = $kayit["imgthumbname"];
    echo "$icerik<br>";}	
    ?>
    Xml yapmaya çalıştığım kodlar.
    <?php  
    include("baglan.php");
    $sorgu = mysql_query ("SELECT * FROM gallery");
    while ($kayit=mysql_fetch_array ($sorgu)){
    $icerik =$kayit["imgoriginalname"];
    $icerik2 = $kayit["imgthumbname"];
    ?>
    <?php echo('<?xml version="1.0" encoding="UTF-8"?>'); ?>
    <gallery>
        <album lgPath="album1/images/" tnPath="album1/thumb/" title="Album title" description="Album description" tn="album1/preview.jpg">
    <img src="$icerik" title="" caption="" link="" target="_blank" pause="" />
    </gallery>
    Verdiği hatada : Parse error: syntax error, unexpected $end in /home/siteismi/public_html/ahmt/images.php on line 41
    Buda istediğim xml şekli.
    <?xml version="1.0" encoding="UTF-8"?>
    <gallery>
        <album lgPath="album1/images/" tnPath="album1/thumb/" title="Album title" description="Album description" tn="album1/preview.jpg">
            <img src="1.jpg" title="" caption="" link="" target="_blank" pause="" />
    		<img src="1.jpg" title="" caption="" link="" target="_blank" pause="" />
    		<img src="1.jpg" title="" caption="" link="" target="_blank" pause="" />
    		<img src="1.jpg" title="" caption="" link="" target="_blank" pause="" />
    		<img src="1.jpg" title="" caption="" link="" target="_blank" pause="" />
        </album>
    </gallery>
  • 23-05-2009, 03:59:08
    #2
    <?php  
    header('Content-Type: text/xml');
    echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
    echo "<?xml-stylesheet type=\"text/xsl\" href=\"http://www.realoyuncu.com/wp-content/plugins/google-sitemap-generator/sitemap.xsl\"?>\n";
    echo "<urlset xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd\" xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\n"; 
    include("baglan.php");
    $sorgu=mysql_query("SELECT *  FROM gallery ORDER BY id DESC");
    
    echo '<gallery>
    
            <album lgPath="album1/images/" tnPath="album1/thumb/" title="Album title" description="Album description" tn="album1/preview.jpg">';
    while($sonuc=mysql_fetch_assoc($sorgu)){		  
    		  echo '<img src="'.$sonuc["imgoriginalname"].'" title="" caption="" link="" target="_blank" pause="" />';
    }		  
    		echo '</album>
    
    </gallery>\n';
    
    echo '</urlset>';
    ?>
  • 23-05-2009, 09:22:14
    #3
    Üyeliği durduruldu
    header('Content-Type: text/xml');

    yapmazsaniz text/html olarak algilanir o zamanda xml calisa bile xml formatinda görmezsiniz
  • 24-05-2009, 18:21:19
    #4
    Teşekkürler Arkadaşlar kodlar çalışıyor.bi sorum daha olacak aynı başlıktan sorayım.




    catid kısmında 5 olanları sorgulamak istiyorum ne yapmalıyım.değiştirdiğim kodlarım aşağıdadır.

    Alıntı
    <?php
    header('Content-Type: text/xml');
    echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
    include("baglan.php");
    $sorgu=mysql_query("SELECT * FROM jos_datsogallery ORDER BY id DESC");

    echo '<gallery>

    <album lgPath="http://bulancakatakoy.com/components/com_datsogallery/img_pictures/" tnPath="http://bulancakatakoy.com/components/com_datsogallery/img_thumbnails/" title="Album title" description="Album description" tn="album1/preview.jpg">';
    while($sonuc=mysql_fetch_assoc($sorgu)){
    echo '<img src="'.$sonuc["imgoriginalname"].'" caption="l" link="" target="_blank" pause="" />
    ';
    }
    echo '</album>

    </gallery>';


    ?>
  • 24-05-2009, 18:49:44
    #5
    <?php
    header('Content-Type: text/xml');
    echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
    include("baglan.php");
    $sorgu=mysql_query("SELECT * FROM jos_datsogallery WHERE catid='5' ORDER BY id DESC");
    echo '<gallery>
    <album lgPath="http://bulancakatakoy.com/components/com_datsogallery/img_pictures/" tnPath="http://bulancakatakoy.com/components/com_datsogallery/img_thumbnails/" title="Album title" description="Album description" tn="album1/preview.jpg">';
    while($sonuc=mysql_fetch_assoc($sorgu)){
    echo '<img src="'.$sonuc["imgoriginalname"].'" caption="l" link="" target="_blank" pause="" />
    ';
    }
    echo '</album>
    </gallery>';
    ?>
  • 24-05-2009, 23:40:07
    #6
    Tam olarak istediğim bu değildi. bunda sorgu yapınca tüm sayfada aynı sorgu oluyor tam olarak istediğimi örnekle göstereyim.
    Çıkdım bu şekilde olacak
    <?xml version="1.0" encoding="UTF-8"?>
    <gallery>
    Burada id 6'daki resimleri listeleteceğim
    <album lgPath="album1/images/" tnPath="album1/thumb/" title="Album title" description="Album description" tn="album1/preview.jpg">
    <img src="1.jpg" title="" caption="" link="" target="_blank" pause="" />
    <img src="1.jpg" title="" caption="" link="" target="_blank" pause="" />
    <img src="1.jpg" title="" caption="" link="" target="_blank" pause="" />
    <img src="1.jpg" title="" caption="" link="" target="_blank" pause="" />
    <img src="1.jpg" title="" caption="" link="" target="_blank" pause="" />
    </album>
    Burda mesela id 5 dekileri çekeceğim.
    <album lgPath="album1/images/" tnPath="album1/thumb/" title="Album title" description="Album description2" tn="album1/preview.jpg">
    <img src="1.jpg" title="" caption="" link="" target="_blank" pause="" />
    <img src="1.jpg" title="" caption="" link="" target="_blank" pause="" />
    <img src="1.jpg" title="" caption="" link="" target="_blank" pause="" />
    <img src="1.jpg" title="" caption="" link="" target="_blank" pause="" />
    <img src="1.jpg" title="" caption="" link="" target="_blank" pause="" />
    </album>
    </gallery>


    Şuanki çıkdım http://www.bulancakatakoy.com/ahmt/images.xml
  • 25-05-2009, 00:23:43
    #7
    <?php
    header('Content-Type: text/xml');
    echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
    include("baglan.php");
    $sorgu=mysql_query("SELECT * FROM jos_datsogallery WHERE catid='6' ORDER BY id DESC");
    $sorgu2=mysql_query("SELECT * FROM jos_datsogallery WHERE catid='5' ORDER BY id DESC");
    echo '<gallery>
    <album lgPath="http://bulancakatakoy.com/components/com_datsogallery/img_pictures/" tnPath="http://bulancakatakoy.com/components/com_datsogallery/img_thumbnails/" title="Album title" description="Album description" tn="album1/preview.jpg">';
    while($sonuc=mysql_fetch_assoc($sorgu)){
    echo '<img src="'.$sonuc["imgoriginalname"].'" caption="l" link="" target="_blank" pause="" />';
    }
    
    echo '<album lgPath="http://bulancakatakoy.com/components/com_datsogallery/img_pictures/" tnPath="http://bulancakatakoy.com/components/com_datsogallery/img_thumbnails/" title="Album title" description="Album description" tn="album1/preview.jpg">';
    while($sonuc2=mysql_fetch_assoc($sorgu2)){
    echo '<img src="'.$sonuc2["imgoriginalname"].'" caption="l" link="" target="_blank" pause="" />';
    }
    echo '</album>
    </gallery>';
    ?>
  • 25-05-2009, 02:09:23
    #8
    Warning: Cannot modify header information - headers already sent by (output started at /home/bulancak/public_html/ahmt/images.php:1) in /home/bulancak/public_html/ahmt/images.php on line 2


    http://www.bulancakatakoy.com/ahmt/images.php

    hata verdi
  • 25-05-2009, 02:19:40
    #9
    Yapdım tamamdır çalışan kodlar aşağıdadır Benden sonra başkasına lazım olursa diye ekliyorum.burda yapdığım flash galeriyle joomla datso galeri birleştirmedir.böylelikle normal joomla yönetim panelinden eklenen resimler direk flash galeride görünecekdir.böylelikle üyelerinde resim eklemesi sorunsuzca gerçekleşecekdir.Joomla dbye sorgu yapıp gereken yerleri çekip xml formatında arkadaşlar sayesinde yazdırdım.Dosyanın .xml olmasınıda .htaccess sayesinde yapdım.

    Çalışan örnek.
    Resim Galerisi

    Kodlama

    <?php  
    header('Content-Type: text/xml');  
    echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";  
    include("baglan.php");  
    $sorgu=mysql_query("SELECT * FROM jos_datsogallery WHERE catid='5' ORDER BY id DESC");
    $sorgu2=mysql_query("SELECT * FROM jos_datsogallery WHERE catid='6' ORDER BY id DESC");
    
    echo '<gallery>
    
            <album lgPath="http://bulancakatakoy.com/components/com_datsogallery/img_pictures/" tnPath="http://bulancakatakoy.com/components/com_datsogallery/img_thumbnails/" title="Album title" description="Album description" tn="album1/preview.jpg">';
    while($sonuc=mysql_fetch_assoc($sorgu)){          
    echo '<img src="'.$sonuc["imgoriginalname"].'"  caption="l" link="" target="_blank" pause="" />
    ';
    }          
            echo '</album>
    
    
            <album lgPath="http://bulancakatakoy.com/components/com_datsogallery/img_pictures/" tnPath="http://bulancakatakoy.com/components/com_datsogallery/img_thumbnails/" title="Album title" description="Album description" tn="album1/preview.jpg">';
    while($sonuc2=mysql_fetch_assoc($sorgu2)){       
    echo '<img src="'.$sonuc2["imgoriginalname"].'"  caption="l" link="" target="_blank" pause="" />
    ';
    }          
            echo '</album>
    
    </gallery>';
    
    
    ?>