Thử nghiệm các chức năng của diễn đàn

Các thay đổi và nâng cấp hệ thống diễn đàn.
Post Reply
User avatar
admin
Site Admin
Posts: 4
Joined: 01 Jan 2017, 15:33
Location: Hà thành
Contact:

Thử nghiệm các chức năng của diễn đàn

Post by admin » 03 Jan 2017, 21:21

 ! Message from: admin
Các nội dung bổ sung:
1. Nhúng các media content như scribd.com, tedtalk, googledoc, slideshare, gchart....
2. Nhúng RSS feed vào post (nội dung và aduio/video list), từ http://simplepie.org
3. Công thức toán học, từ http://www.xm1math.net/phpmathpublisher/ hoặc https://www.mathjax.org/#features
...
DONE
Font style: colored text.
Bold, Italic, Underscore
Quote. This content is quoted.
Line 2.
Line 3.

Code: Select all

public function showmedia($between,$width=612,$height=370){
	$arr = parse_url(strtolower($between));
	$name = str_replace(array('.com','www.','.net'),array('','',''),$arr['host']);

	$oembedUrls = array (
	  'youtube' => 'http://www.youtube.com/oembed?url=$1&format=json',
	  'ted' => 'http://www.ted.com/talks/oembed.json?url=$1&format=json',
	  'dotsub'=>'http://dotsub.com/services/oembed?url=$1&format=json',
	  'dailymotion' => 'http://www.dailymotion.com/api/oembed?url=$1&format=json',
	  'vimeo' => 'http://vimeo.com/api/oembed.json?url=$1',
	  'blip.tv' => 'http://blip.tv/oembed/?url=$1&format=json',
	  'hulu' => 'http://www.hulu.com/api/oembed?url=$1&format=json',
	  'viddler' => 'http://lab.viddler.com/services/oembed/?url=$1&format=json',
	  'qik' => 'http://qik.com/api/oembed?url=$1&format=json',
	  'revision3' => 'http://revision3.com/api/oembed/?url=$1&format=json',
	  'scribd' => 'http://www.scribd.com/services/oembed?url=$1&format=json',
	  'slideshare' => 'http://www.slideshare.net/api/oembed/1?url=$1&format=json',
	  'wordpress.tv' => 'http://wordpress.tv/oembed/?url=$1&format=json',
	  '5min' => 'http://www.oohembed.com/oohembed/?url=$1',
	  'collegehumor' => 'http://www.oohembed.com/oohembed/?url=$1',
	  'thedailyshow' => 'http://www.oohembed.com/oohembed/?url=$1',
	  'funnyordie' => 'http://www.oohembed.com/oohembed/?url=$1',
	  'livejournal' => 'http://www.oohembed.com/oohembed/?url=$1',
	  'metacafe' => 'http://www.oohembed.com/oohembed/?url=$1',
	  'xkcd' => 'http://www.oohembed.com/oohembed/?url=$1',
	  'yfrog' => 'http://www.oohembed.com/oohembed/?url=$1'
	);

		//$url = 'http://www.scribd.com/doc/28848420/EARN-45-PER-MONTH-GUARANTEED';
		//$url="http://www.scribd.com/services/oembed?url={$url}&format=json";
		$data = '';
		if(!$data){
			//JError::raiseWarning(500, str_replace('$1',$between,@$oembedUrls[$name]));
			$loaded = json_decode($this->loadhtml(str_replace('$1',$between,@$oembedUrls[$name])));
			if($loaded) {
				$data = $loaded->html;
				}
		}
		//Other embeded media play
		if($data) {
			if($height) {
				$data = preg_replace("/height\s*=\s*\"(\d+)\"/", "height=\"{$height}\"", $data);
			}
			if($width) {
				$data = str_replace('width="100%"', "width=\"{$width}\"", $data, $count);
				if(!$count) $data = preg_replace("/width\s*=\s*\"(\d+)\"/", "width=\"{$width}\"", $data);
			}
			return "<div class=\"video-container\">$data</div>";
		}
		else return false;
}}
List:
  • 1
  • 2
  • 3
  1. a
  2. b
  3. c
Image: Image
Link: http://www.kythuatvatlieu.org/magazine/ ... -cach.html
► Show Spoiler
Video: cần xử lý tiếp để nhúng Playlist của Youtube
https://www.youtube.com/watch?v=CWiUZPF0Z7k
https://www.youtube.com/playlist?list=PLMxZeJM7K5tLcPBFDV1hnpFT9_hU8mCsn
Xem thêm https://developers.google.com/youtube/player_parameters



https://www.scribd.com/doc/56806018/Oxford-Reading-Tree-Stock-up-Today

TED talk
https://www.ted.com/talks/dan_bricklin_meet_the_inventor_of_the_electronic_spreadsheet

Nhạc từ nhaccuatui.com - mới được chỉ cho Playlist, còn bài lẻ thì chưa.
http://nhaccuatui.com/playlist/nhung-loi-me-hoac-ngoc-lan-ft-don-ho.wvFwPd4wgwlJ.html

==============================================
2016-01-08: nâng cấp lên PHPBB 3.2.0.
==============================================
2016-01-10: Cập nhật MathJax:
[Processing math...]

[Processing math...]

Xem thêm: http://meta.math.stackexchange.com/ques ... -referencehttp://docs.mathjax.org/en/latest/start.html


Post Reply