
08-07-2010, 08:26 AM
|
|
|
Join Date: Jun 2006
Posts: 235
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Quote:
Originally Posted by juhler
I had a problem getting this to import correct letters from YouTube. This could be: ???...
The reason this happens is that you made it to just import the data from YouTube (and thats ok if you are not using ??? or any other UTF-8 coding).
The way I fixed it works for import only:
In the file media/media_submit.php
Find:
Code:
$feed = construct_feed_data($source);
$xml = new vB_AJAX_XML_Builder($vbulletin, 'text/xml');
$xml->add_group('response');
$xml->add_tag('thumbnail', $feed['thumbnail']);
$xml->add_tag('title', $feed['title']);
$xml->add_tag('description', $feed['description']);
$xml->add_tag('taglist', $feed['taglist']);
$xml->add_tag('minutes', $feed['minutes']);
$xml->add_tag('seconds', $feed['seconds']);
$xml->add_tag('embed', $feed['embed']);
$xml->add_tag('source', $feed['source']);
$xml->add_tag('serviceID', $feed['serviceID']);
$xml->add_tag('serviceVAL', $feed['serviceVAL']);
$xml->add_tag('serviceVAL2', $feed['serviceVAL2']);
$xml->close_group();
$xml->print_xml();
Replace:
Code:
$feed = construct_feed_data($source);
$xml = new vB_AJAX_XML_Builder($vbulletin, 'text/xml');
$xml->add_group('response');
$xml->add_tag('thumbnail', $feed['thumbnail']);
$xml->add_tag('title', utf8_decode($feed['title']));
$xml->add_tag('description', utf8_decode($feed['description']));
$xml->add_tag('taglist', utf8_decode($feed['taglist']));
$xml->add_tag('minutes', $feed['minutes']);
$xml->add_tag('seconds', $feed['seconds']);
$xml->add_tag('embed', $feed['embed']);
$xml->add_tag('source', utf8_decode($feed['source']));
$xml->add_tag('serviceID', $feed['serviceID']);
$xml->add_tag('serviceVAL', $feed['serviceVAL']);
$xml->add_tag('serviceVAL2', $feed['serviceVAL2']);
$xml->close_group();
$xml->print_xml();
Hope this helps the others I have seen asking for an update that would allow special chars.
Edit: PS hope its ok that I changed you code to fit my needs ?
- juhler
|
still i have problem with korean special characters =/
http://www.youtube.com/watch?v=qRGOE-gE8FE
|