• 23-10-2013, 16:56:01
    #1
    Reveloper
    announcementsrss.php içerisindeki Türkçe karakter problemini çözmemizin tek bir yolu var oda açık kaynak arkadaşlar

    aşağıdaki dosyaları değiştirirsiniz announcementsrss.php içeriğiyle:

    <?php
    /**
     * Announcements RSS System
     *
     * @package    WHMCS
     * @author     WHMCS Limited <development@whmcs.com>
     * @copyright  Copyright (c) WHMCS Limited 2005-2013
     * @license    http://www.whmcs.com/license/ WHMCS Eula
     * @version    13 burti -tr
     * @link       http://www.whmcs.com/
     */
    function replace_tr($text) {
    $text = trim($text);
    $search = array('&Uuml;','&Ouml;','&Ccedil;','&uuml;','&ouml;','&ccedil;');
    $replace = array('Ü','Ö','Ç','ü','ö','ç');
    $new_text = str_replace($search,$replace,$text);
    return $new_text;
    }
    define("CLIENTAREA",true);
    require "init.php";
    
    if ($whmcs->get_req_var( "lcinfo" )) {
    	echo "<textarea cols=100 rows=4>License Key: ".$whmcs->get_license_key( )."\nSystem URL: ".$CONFIG['SystemURL']."\nSystem SSL URL: ".$CONFIG['SystemSSLURL']."</textarea>";
    	exit();
    }
    $language = (( isset( $_REQUEST["language"] ) && in_array( $_REQUEST["language"], $whmcs->getValidLanguages() ) ) ? $_REQUEST["language"] : "");
    header( "Content-Type: application/rss+xml" );
    echo "<?xml version=\"1.0\" encoding=\"".$CONFIG['Charset']."\" ?>\n<rss version=\"2.0\" xmlns:atom=\"http://www.w3.org/2005/Atom\">\n<channel>\n<atom:link href=\"".$CONFIG['SystemURL']."/announcementsrss.php\" rel=\"self\" type=\"application/rss+xml\" />\n<title><![CDATA[".iconv("UTF-8","ISO-8859-9",$CONFIG['CompanyName'])."]]></title>\n<description><![CDATA[".iconv("UTF-8","ISO-8859-9",$CONFIG['CompanyName'])." ".$_LANG['announcementstitle']." ".$_LANG['rssfeed']."]]></description>\n<link>".$CONFIG['SystemURL']."/announcements.php</link>";
    $result = select_query( "tblannouncements", "*", array( "published" => "on" ), "date", "DESC" );
    
    while ($data = mysql_fetch_array( $result )) {
    	$id = $data["id"];
    	$date = $data["date"];
    	$title = replace_tr(iconv("UTF-8","ISO-8859-9",$data["title"]));
    	$announcement = replace_tr(iconv("UTF-8","ISO-8859-9",$data["announcement"]));
    	$result2 = select_query( "tblannouncements", "", array( "parentid" => $id, "language" => $language ) );
    	$data = mysql_fetch_array( $result2 );
    
    	if ($data["title"]) {
    		$title = $data["title"];
    	}
    
    
    	if ($data["announcement"]) {
    		$announcement = $data["announcement"];
    	}
    
    	$year = substr( $date, 0, 4 );
    	$month = substr( $date, 5, 2 );
    	$day = substr( $date, 8, 2 );
    	$hours = substr( $date, 11, 2 );
    	$minutes = substr( $date, 14, 2 );
    	$seconds = substr( $date, 17, 2 );
    	echo "\n<item>\n\t<title><![CDATA[".$title."]]></title>\n\t<link>".$CONFIG['SystemURL']."/announcements.php?id=".$id."</link>\n    <guid>".$CONFIG['SystemURL']."/announcements.php?id=".$id."</guid>\n\t<pubDate>".date( "r", mktime( $hours, $minutes, $seconds, $month, $day, $year ) )."</pubDate>\n\t<description><![CDATA[".$announcement."]]></description>\n</item>";
    }
    
    echo "\n</channel>\n</rss>";
    ?>

    özel istek @BellaSwan
  • 24-10-2013, 12:26:51
    #2
    İlgi için teşekkürler burak hocam.Bilgi paylaştıkça çoğalır