0
여기에 URL을 형성 코드, 내가 현서 friendli URL을 원하는입니다하지만 내 언어 그루지야하고 내 URL을 그루지야, 내가 그루지야 sumbols을 변환 englis 못해 sumbols
기능 qa_q_request ($ questionid
그루지야어이며, $ 제목) /* $ questionid 질문에 대한 Q2A 요청을 반환하고 $ title을 기반으로 검색 엔진 친화적으로 만드십시오. 일반적으로 의미가 덜한 단어는 더 짧게하여 필요에 따라 을 줄입니다. */ { if (qa_to_override (FUNCTION)) {$ args = func_get_args(); 반환 qa_call_override (기능, $ args); }
require_once QA_INCLUDE_DIR.'king-app-options.php';
require_once QA_INCLUDE_DIR.'king-util-string.php';
$title=qa_block_words_replace($title, qa_get_block_words_preg());
$words=qa_string_to_words($title, true, false, false);
$wordlength=array();
foreach ($words as $index => $word)
$wordlength[$index]=qa_strlen($word);
$remaining=qa_opt('q_urls_title_length');
if (array_sum($wordlength)>$remaining) {
arsort($wordlength, SORT_NUMERIC); // sort with longest words first
foreach ($wordlength as $index => $length) {
if ($remaining>0)
$remaining-=$length;
else
unset($words[$index]);
}
}
$title=implode('-', $words);
if (qa_opt('q_urls_remove_accents'))
$title=qa_string_remove_accents($title);
return (int)$questionid.'/'.$title;
}