Onarcade 2.2.0 SEF Sorunu - Google Fan Webmaster Forum
Google Fan Webmaster Forum  
herşeyi sana yazdım

Geri git   Google Fan Webmaster Forum > Genel Programlama > Web tabanlı uygulamalar
KEY
Kayıt ol Articles Sosyal Gruplar Forumları Okundu Kabul Et

Cevapla
 
LinkBack Seçenekler
  1  
Alt 03-04-2010, 04:03:27
 
Standart Onarcade 2.2.0 SEF Sorunu

Arkadaşlar Onarcade 2.2.0 versiyonunda SEF linklerde Türkçe karakterler çıkması üzerine Functions.php den karakterleri ayarladım. acak .htaccess i ayarlayamıyorum. linkleri ayarladım ancak linklere tıklayınca not found uyarısı geliyor. acaba ben biyerlerde yanlış mı yaptım diye Functions.php ve .Htaccess dosyalarımı buraya ekliyorum. kontrol ederseniz veya düzeltirseniz çok sevinirim. teşekkür ederim.


HTACCESS Kodları

Kod:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^game/([0-9]+)/.+\.html$ file.php?f=$1
RewriteRule ^category/([0-9]+)/.+/([0-9]+)\.html$ browse.php?c=$1&p=$2
RewriteRule ^category/([0-9]+)/.+/?$ browse.php?c=$1
RewriteRule ^profile/([0-9]+)/.+\.html$ profile.php?u=$1
RewriteRule ^page/([0-9]+)\.html$ page.php?p=$1
RewriteRule ^scores/([0-9]+)/([0-9]+)\.html$ scores.php?f=$1&p=$2
RewriteRule ^game/[0-9]+/(newscore|index)\.php$ $1.php
RewriteRule ^game/[0-9]+/arcade/gamedata/(.*)$ arcade/gamedata/$1 [L]
</IfModule>

Functions.php Kodları

Kod:
<?php
/**
 * onArcade 2.2.0
 * Copyright © 2006-2009 Hans Mäesalu & Eveterm OÜ, All Rights Reserved
 **
 * ONARCADE IS NOT FREE SOFTWARE!
 * http://www.onarcade.com
 **
 * Global onArcade functions are located here.
 **/

// Strip HTML dags
function nohtml($message) {
	$message = preg_replace("#&(?!\#[0-9]+;)#si", "&amp;", $message);
	$message = str_replace("<","&lt;", $message);
	$message = str_replace(">","&gt;", $message);
	$message = str_replace("\"","&quot;", $message);
	return $message;
}

// Generate file URL
function fileurl($file_id, $file_title) {
	global $settings;

	if ($settings['sefriendly'] == 1) {
		$replace = array(' ', '\'', ':', '(', ')', '&', 'ä', 'ö', 'ü', 'ğ', 'ş', 'ç', 'ı', 'Ö', 'Ü', 'Ğ', 'Ş', 'Ç', 'İ', );
		$replacement = array('_', '', '-', '8', '9', 'and', 'a', 'o', 'u', 'g', 's', 'c', 'i', 'O', 'U', 'G', 'S', 'C', 'I');
		$file_title = str_replace($replace, $replacement, $file_title);

        return $settings['siteurl'] .'/'. $settings['fileurl'] .'/'. $file_id .'/'. $file_title .'.html';
    } else
	    return $settings['siteurl'] .'/file.php?f='. $file_id;
}

// Generate category URL
function categoryurl($category_id, $category_title, $page = 1) {
	global $settings;

	if ($settings['sefriendly'] == 1) {
		$replace=array ("!","^","'","%","&","[","]","(",")","?","=","*",",",".","~","%","#","@","ç","Ç","ş","Ş","ğ","Ğ","ü","Ü","İ","ı","ö","Ö","ı","Å?","ü","ç","ö","Ä?","ÅŸ","Ç","İ","ÄŸ","Å?","Ö","Ü","ı","Å?","ç","ö","Ä?","ÅŸ","Ç","İ","ÄŸ","Å?","Ö","Ü","ü","ÄŸ","@",";","~","=");  
        $replacement=array("","","","","","","","","","","","","","","","","","","c","C","s","S","g","G","u","U","i","i","o","O","i","s","u","c","o","g","s","C","i","g","S","O","U","i","s","c","o","g","s","C","i","g","S","o","U","u","g","","","","-");  
		$category_title = str_replace($replace, $replacement, $category_title);

        return $settings['siteurl'] .'/'. $settings['categoryurl'] .'/'. $category_id .'/'. $category_title .'/'. $page .'.html';
    } else
	    return $settings['siteurl'] .'/browse.php?c='. $category_id .'&amp;p='. $page;
}

// Generate profile URL
function profileurl($userid,$username) {
	global $settings;

	if ($settings['sefriendly'] == 1) {
		$replace=array ("!","^","'","%","&","[","]","(",")","?","=","*",",",".","~","%","#","@","ç","Ç","ş","Ş","ğ","Ğ","ü","Ü","İ","ı","ö","Ö","ı","Å?","ü","ç","ö","Ä?","ÅŸ","Ç","İ","ÄŸ","Å?","Ö","Ü","ı","Å?","ç","ö","Ä?","ÅŸ","Ç","İ","ÄŸ","Å?","Ö","Ü","ü","ÄŸ","@",";","~","=");  
        $replacement=array("","","","","","","","","","","","","","","","","","","c","C","s","S","g","G","u","U","i","i","o","O","i","s","u","c","o","g","s","C","i","g","S","O","U","i","s","c","o","g","s","C","i","g","S","o","U","u","g","","","","-");  
		$username = str_replace($replace, $replacement, $username);

	    $profileurl = $settings['siteurl'] .'/'. $settings['profileurl'] .'/'. $userid .'/'. $username .'.html';
	} else {
		$profileurl = $settings['siteurl'] .'/profile.php?u='. $userid;
    }
    return $profileurl;
}

// Generate score URL
function scoresurl($scores_id, $scores_page = 1) {
	global $settings;

	if ($settings['sefriendly'] == 1)
        return $settings['siteurl'] .'/'. $settings['scoresurl'] .'/'. $scores_id .'/'. $scores_page .'.html';
    else
	    return $settings['siteurl'] .'/scores.php?f='. $scores_id .'&amp;p='. $scores_page;
}

// Get avatar URL
function avatar_url($avatar, $avatar_uploaded) {
	global $settings;

	if (empty($avatar))
		$avatar_url = $settings['siteurl'] .'/images/noavatar.gif';
	else {
		if ($avatar_uploaded == '1')
			$avatar_url = $settings['siteurl'] .'/images/avatars/'. $avatar;
		elseif ($avatar_uploaded == '2')
			$avatar_url = $settings['siteurl'] .'/images/avatars/galleries/'. $avatar;
		else
			$avatar_url = $avatar;
	}
	return $avatar_url;
}

// file image URL
function file_image_url($image_name, $image_location) {
	global $settings;

	if ($image_location == 1)
		return $settings['siteurl'] .'/files/image/'. $image_name;
	else
		return $image_name;
}

// BB Code
function bbcode($text, $extended = false) {
	global $settings;

	$text = preg_replace('/\[b\](.*?)\[\/b\]/is', '<b>$1</b>', $text);
	$text = preg_replace('/\[u\](.*?)\[\/u\]/is', '<u>$1</u>', $text);
	$text = preg_replace('/\[i\](.*?)\[\/i\]/is', '<i>$1</i>', $text);
	$text = preg_replace('/\[s\](.*?)\[\/s\]/is', '<s>$1</s>', $text);
    $text = str_replace(':)','<img src="'. $settings['siteurl'] .'/images/happy.gif" alt="" />',$text);
    $text = str_replace(':(','<img src="'. $settings['siteurl'] .'/images/sad.gif" alt="" />',$text);
    $text = str_replace(';)','<img src="'. $settings['siteurl'] .'/images/wink.gif" alt="" />',$text);
    $text = str_replace(':@:','<img src="'. $settings['siteurl'] .'/images/@.gif" alt="" />',$text);
    $text = str_replace(':8','<img src="'. $settings['siteurl'] .'/images/cool.gif" alt="" />',$text);
    $text = str_replace(':wave:','<img src="'. $settings['siteurl'] .'/images/wave.gif" alt="" />',$text);
    $text = str_replace(':think:','<img src="'. $settings['siteurl'] .'/images/think.gif" alt="" />',$text);
    $text = str_replace(':clap:','<img src="'. $settings['siteurl'] .'/images/clap.gif" alt="" />',$text);
    
    // some extra BB code, we only want this on some pages
    if ($extended == true) {
		while (preg_match('/\[quote\](.*?)\[\/quote\]/is', $text))
			$text = preg_replace('/\[quote\](.*?)\[\/quote\]/is', '<div class="quote">$1</div>', $text);
		$text = preg_replace('/\[img\]([a-z0-9_\-?\/:\.]*?)\[\/img\]/is', '<img src="$1" />', $text);
		$text = preg_replace('/\[url=([a-z0-9_\-?\/:\.]*?)\](.*?)\[\/url\]/is', '<a href="$1" target="_blank">$2</a>', $text);
	}

    return $text;
}

// Filter bad words
function word_filter($text) {
	global $settings;

	if ($settings['bad_word_filter'] == 1) {
    	$text = preg_replace('/('. $settings['bad_words'] .')/i', '***', $text);
    }

    return $text; 
}

// shorten file description
function shorten_description($description, $length) {
	if (strlen($description) > $length)
		return substr($description , 0, ($length - 3)) .'...';
	else
		return $description;
}

// Generate real date from UNIX timestamp
function mod_date($time, $format = 1) {
	global $lang;

	switch ($format) {
	case 1:
		$day = date('j', $time);
		$month = $lang['datetime'][date('F', $time)];
		$year = date('Y', $time);
		return $day .' '. $month .' '. $year;
		break;
	case 2:
		$day = date('j', $time);
		$month = $lang['datetime'][date('F', $time)];
		return $day .' '. $month .' '. date('Y G:i', $time);
		break;
	case 3:
		return date('r', $time);
		break;
	case 4:
		return date('d-m-Y G:i', $time);
		break;
	}
}

// generate stars
function rating_stars($rating) {
	global $settings;

	$rating_b = $rating + 0.25;
	$rating_c = (int)($rating + 0.75);
	$stars = '';
	for ($i = 1; $i <= 5; ++$i) {
		if ($i <= $rating_b)
			$stars .= '<img src="'. $settings['siteurl'] .'/images/star.png" id="rate_'. $i .'" alt="'. $rating .'" /> ';
		elseif ($i == $rating_c)
			$stars .= '<img src="'. $settings['siteurl'] .'/images/star_half.png" id="rate_'. $i .'" alt="'. $rating .'" /> ';
		else
			$stars .= '<img src="'. $settings['siteurl'] .'/images/star_empty.png" id="rate_'. $i .'" alt="'. $rating .'" /> ';
	}
	return $stars;
}

// Get the number of stars (index page)
function stars($stars) {
	if ($stars < 0.50)
		$stars = 0;
	elseif ($stars < 1.50)
		$stars = 1;
	elseif ($stars < 2.50)
		$stars = 2;
	elseif ($stars < 3.50)
		$stars = 3;
	elseif ($stars < 4.50)
		$stars = 4;
	else
		$stars = 5;
	return $stars;
}

// Load categories
function menu_categories() {
	global $tbl_prefix, $settings, $session;

	$menu_categories = get_cache('menu_categories_'. $session->info['status']);
	if (!$menu_categories) {
		if ($session->info['status'] == 1)
			$categories_menu_query = mysql_query("SELECT name, catid FROM ". $tbl_prefix ."categories WHERE status = '1' && parentcategory = 0 ORDER BY catorder, name");
		else
			$categories_menu_query = mysql_query("SELECT name, catid FROM ". $tbl_prefix ."categories WHERE status = '1' && permissions = '1' && parentcategory = 0 ORDER BY catorder, name");

		$menu_categories = array();
		while ($categories_menu_row = mysql_fetch_assoc($categories_menu_query)) {
    		$menu_categories[] = array (
				'url'	=>	categoryurl($categories_menu_row['catid'], $categories_menu_row['name'], 1),
				'title'	=>	$categories_menu_row['name'],
				'last'	=>	false
			);
		}

		// last category in array
		$last = count($menu_categories) - 1;
		if ($last >= 0)
			$menu_categories[$last]['last'] = true;

		// Write cache file
		write_cache('menu_categories_'. $session->info['status'], $menu_categories);
	}

	return $menu_categories;
}

// Get news
function news() {
	global $tbl_prefix, $settings;

	$news = get_cache('news');
	if (!$news) {
		if ($settings['news'] == 2)
			$news_query = mysql_query("
				SELECT
					r.title, r.message, r.date_posted AS date
				FROM
					". $tbl_prefix ."forums_topics AS t
					LEFT JOIN ". $tbl_prefix ."forums_replies AS r ON (t.topic_id = r.topic_id && first_post = 1)
				WHERE
					t.forum_id = ". $settings['news_forum'] ."
				ORDER BY t.topic_id DESC
				LIMIT ". $settings['news_index']
			);
		else
			$news_query = mysql_query("SELECT title, message, date FROM ". $tbl_prefix ."news WHERE status = '1' ORDER BY newsid DESC LIMIT ". $settings['news_index']);
		$news = array();
		while ($news_row = mysql_fetch_assoc($news_query)) {
			$news[] = array (
				'title'	=>	nohtml($news_row['title']),
				'text'	=>	bbcode(nl2br(nohtml($news_row['message'])), true),
				'date'	=>	mod_date($news_row['date'])
			);
		}

		write_cache('news', $news);
	}

	return $news;
}

/**
* onArcade 2.2 cache engine
**/
function get_cache($file_name) {
	global $settings, $u_time;
	$cache_file = 'cache/'. $file_name .'.cache';

	if ($settings['cache'] == 1 && file_exists($cache_file) && filemtime($cache_file) > ($u_time - ($settings['cache_expire'] * 60))) {
    	return unserialize(file_get_contents($cache_file));
	} else
    	return false;
}
function write_cache($file_name, $file_content) {
	global $settings;
	if ($settings['cache'] == 1) {
		// Some important variables
		$cache_file = 'cache/'. $file_name .'.cache';
		$file_content = serialize($file_content);

		// And lets write the file
		$open_cache_file = fopen($cache_file, "w");
		fwrite($open_cache_file, $file_content);
		fclose($open_cache_file);
	}
}

// make sure username is valid
function verify_username($username) {
	if (preg_match('#^[a-zA-Z0-9._-]{3,25}$#', $username))
		return true;
	else
		return false;
}

// make sure email is valid
function verify_email($email) {
	if (preg_match('#^[a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z]{2,4}$#', $email))
		return true;
	else
		return false;
}

// new PM notification
function new_pm() {
	global $lang, $session, $header_add, $tbl_prefix;
	
	if ($session->info['newpm'] == 1) {
		$header_add .= '
<script type="text/javascript">
  addLoadEvent(function() { if (window.confirm("'. $lang['new_pm_click_ok_cancel'] .'")) window.location = siteurl + "/privatemessages.php"; });
</script>';

		mysql_query("UPDATE ". $tbl_prefix ."users SET newpm = '0' WHERE userid = ". $session->info['id'] ." LIMIT 1");
	}

	if ($session->info['new_friend'] == 1) {
		$header_add .= '
<script type="text/javascript">
  addLoadEvent(function() { if (window.confirm("'. $lang['new_friend_ok_cancel'] .'")) window.location = siteurl + "/usercp.php?a=friends&type=invites"; });
</script>';

		mysql_query("UPDATE ". $tbl_prefix ."users SET new_friend = '0' WHERE userid = ". $session->info['id'] ." LIMIT 1");
	}
}

// check if we have correct HTTP_REFERER
function http_referer($alternative = '') {
	global $settings;
	if (substr($_SERVER['HTTP_REFERER'], 0, strlen($settings['siteurl'])) == $settings['siteurl'])
		return $_SERVER['HTTP_REFERER'];
	else
		return $settings['siteurl'] . $alternative;
}

// count the number of rows in database
function count_rows($table_name, $variables = null) {
	if ($variables == NULL)
		$sql = "SELECT count(*) FROM ". $table_name;
	else
		$sql = "SELECT count(*) FROM ". $table_name ." WHERE ". $variables;
	$query = mysql_query($sql);
	$row = mysql_fetch_assoc($query);

	return $row['count(*)'];
}

// make "unserializing" easier
function unserialize2($data) {
	if (strlen($data))
		return unserialize($data);
	else
		return array();
}

// convert json data to array
function json_array($json) {
	$json = str_replace('\\/', '/', $json);
	$json = str_replace(array('":', '{', '}', '[', ']'), array('"=>', 'array(', ')', 'array(', ')'), $json);
	@eval("\$json_array = ". $json .";");
	return $json_array;
} 

// JSON output
function json_o($json_array) {
	header("Content-type: text/json; charset=utf-8"); // header
	echo json_encode($json_array); // output
	exit(); // and exit
}

?>
Alıntı ile Cevapla
  2  
Alt 03-04-2010, 11:41:55
 
Standart

kimse yokmu yardımcı olacak
Alıntı ile Cevapla
  3  
Alt 06-12-2010, 02:49:51
 
Standart

bende bunu bir türlü yapamadım varmı bilen arkadaşlar
Alıntı ile Cevapla
  4  
Alt 09-12-2010, 19:05:07
 
Standart

şuan onarcade sistemiyle uğraşmaktayım.tema - modifiye - sef - versiyon 1 den versiyon 2 geçiş vs. gibi işler. dilerseniz destek verebilirim.
__________________
Şapkalı Çocuk - Onarcade Hizmetleri - Tema Giydirme
Alıntı ile Cevapla
Cevapla


Bookmarks

Seçenekler

Yetkileriniz
Konu Acma Yetkiniz Yok
Cevap Yazma Yetkiniz Yok
Eklenti Yükleme Yetkiniz Yok
Mesajınızı Değiştirme Yetkiniz Yok

BB code is Açık
Smileler Açık
[IMG] Kodları Açık
HTML-Kodu Kapalı
Trackbacks are Kapalı
Pingbacks are Kapalı
Refbacks are Açık



Tüm Zamanlar GMT +3 Olarak Ayarlanmış. Şuanki Zaman: 10:50:11.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.

“İnsanların en hayırlısı, insanlara faydalı olandır”. H.Ş

Hosting by Radore Hosting

İçerik sağlayacı paylaşım sitelerinden biri olan R10.net WebMaster Forum Adresimizde 5651 Sayılı Kanun’un 8. Maddesine ve T.C.K’nın 125. Maddesine göre TÜM ÜYELERİMİZ yaptıkları paylaşımlardan sorumludur. R10.net hakkında yapılacak tüm hukuksal Şikayetler adresi ile iletişime geçilmesi halinde ilgili kanunlar ve yönetmelikler çerçevesinde en geç 1 (Bir) Hafta içerisinde R10.net yönetimi olarak tarafımızdan gereken işlemler yapılacak ve Avukatlarımız size dönüş yapacaktır.
ARGUS_OK

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252