stuff
- background the external network notifications (Facebook, Twitter, Statusnet) - add vimeo support - consolidate editor video options (insert video, regardless of source) - add "Connector Settings" page purely for configuring connectors - moved mailbox settings to Connectors - Move the "Connect/Follow" dialogue out of "find people" and move to top. - Add "Find People" dialogue - minor theme edits on duepuntozero and testbubble to make all this stuff work - A bit of theming on duepunto notifications to eliminate the gigantic Diaspora profile photos.
This commit is contained in:
parent
caf18164f0
commit
557a7d0cec
25 changed files with 324 additions and 195 deletions
|
@ -483,11 +483,7 @@
|
|||
$txt = requestdata('htmlstatus');
|
||||
if((strpos($txt,'<') !== false) || (strpos($txt,'>') !== false)) {
|
||||
|
||||
$txt = preg_replace('#<object[^>]+>.+?' . 'http://www.youtube.com/((?:v|cp)/[A-Za-z0-9\-_=]+).+?</object>#s',
|
||||
'[youtube]$1[/youtube]', $txt);
|
||||
|
||||
$txt = preg_replace('#<iframe[^>].+?' . 'http://www.youtube.com/embed/([A-Za-z0-9\-_=]+).+?</iframe>#s',
|
||||
'[youtube]$1[/youtube]', $txt);
|
||||
$txt = html2bb_video($txt);
|
||||
|
||||
$config = HTMLPurifier_Config::createDefault();
|
||||
$config->set('Cache.DefinitionImpl', null);
|
||||
|
|
|
@ -141,6 +141,9 @@ function bbcode($Text,$preserve_nl = false) {
|
|||
$Text = preg_replace("/\[youtube\]([A-Za-z0-9\-_=]+)(.*?)\[\/youtube\]/ism", '<iframe width="425" height="350" src="http://www.youtube.com/embed/$1" frameborder="0" ></iframe>', $Text);
|
||||
}
|
||||
|
||||
$Text = preg_replace("/\[vimeo\]https?:\/\/player.vimeo.com\/video\/([0-9]+)(.*?)\[\/vimeo\]/ism",'[vimeo]$1[/vimeo]',$Text);
|
||||
$Text = preg_replace("/\[vimeo\]https?:\/\/vimeo.com\/([0-9]+)(.*?)\[\/vimeo\]/ism",'[vimeo]$1[/vimeo]',$Text);
|
||||
$Text = preg_replace("/\[vimeo\]([0-9]+)(.*?)\[\/vimeo\]/ism", '<iframe width="425" height="350" src="http://player.vimeo.com/video/$1" frameborder="0" ></iframe>', $Text);
|
||||
|
||||
// $Text = preg_replace("/\[youtube\](.*?)\[\/youtube\]/", '<object width="425" height="350" type="application/x-shockwave-flash" data="http://www.youtube.com/v/$1" ><param name="movie" value="http://www.youtube.com/v/$1"></param><!--[if IE]><embed src="http://www.youtube.com/v/$1" type="application/x-shockwave-flash" width="425" height="350" /><![endif]--></object>', $Text);
|
||||
|
||||
|
|
|
@ -745,9 +745,8 @@ function status_editor($a,$x, $notes_cid = 0) {
|
|||
'$nickname' => $x['nickname'],
|
||||
'$ispublic' => t('Visible to <strong>everybody</strong>'),
|
||||
'$linkurl' => t('Please enter a link URL:'),
|
||||
'$utubeurl' => t('Please enter a YouTube link:'),
|
||||
'$vidurl' => t("Please enter a video\x28.ogg\x29 link/URL:"),
|
||||
'$audurl' => t("Please enter an audio\x28.ogg\x29 link/URL:"),
|
||||
'$vidurl' => t("Please enter a video link/URL:"),
|
||||
'$audurl' => t("Please enter an audio link/URL:"),
|
||||
'$whereareu' => t('Where are you right now?'),
|
||||
'$title' => t('Enter a title for this item')
|
||||
));
|
||||
|
@ -795,9 +794,8 @@ function status_editor($a,$x, $notes_cid = 0) {
|
|||
'$upload' => t('Upload photo'),
|
||||
'$attach' => t('Attach file'),
|
||||
'$weblink' => t('Insert web link'),
|
||||
'$youtube' => t('Insert YouTube video'),
|
||||
'$video' => t('Insert Vorbis [.ogg] video'),
|
||||
'$audio' => t('Insert Vorbis [.ogg] audio'),
|
||||
'$video' => t('Insert video link'),
|
||||
'$audio' => t('Insert audio link'),
|
||||
'$setloc' => t('Set your location'),
|
||||
'$noloc' => t('Clear browser location'),
|
||||
'$title' => t('Set title'),
|
||||
|
|
|
@ -414,11 +414,7 @@ function get_atom_elements($feed,$item) {
|
|||
|
||||
if((strpos($res['body'],'<') !== false) || (strpos($res['body'],'>') !== false)) {
|
||||
|
||||
$res['body'] = preg_replace('#<object[^>]+>.+?' . 'http://www.youtube.com/((?:v|cp)/[A-Za-z0-9\-_=]+).+?</object>#s',
|
||||
'[youtube]$1[/youtube]', $res['body']);
|
||||
|
||||
$res['body'] = preg_replace('#<iframe[^>].+?' . 'http://www.youtube.com/embed/([A-Za-z0-9\-_=]+).+?</iframe>#s',
|
||||
'[youtube]$1[/youtube]', $res['body']);
|
||||
$res['body'] = html2bb_video($res['body']);
|
||||
|
||||
$res['body'] = oembed_html2bbcode($res['body']);
|
||||
|
||||
|
@ -586,12 +582,7 @@ function get_atom_elements($feed,$item) {
|
|||
$res['object'] .= '<orig>' . xmlify($body) . '</orig>' . "\n";
|
||||
if((strpos($body,'<') !== false) || (strpos($body,'>') !== false)) {
|
||||
|
||||
$body = preg_replace('#<object[^>]+>.+?' . 'http://www.youtube.com/((?:v|cp)/[A-Za-z0-9\-_=]+).+?</object>#s',
|
||||
'[youtube]$1[/youtube]', $body);
|
||||
|
||||
$res['body'] = preg_replace('#<iframe[^>].+?' . 'http://www.youtube.com/embed/([A-Za-z0-9\-_=]+).+?</iframe>#s',
|
||||
'[youtube]$1[/youtube]', $res['body']);
|
||||
|
||||
$body = html2bb_video($body);
|
||||
|
||||
$config = HTMLPurifier_Config::createDefault();
|
||||
$config->set('Cache.DefinitionImpl', null);
|
||||
|
@ -629,11 +620,7 @@ function get_atom_elements($feed,$item) {
|
|||
$res['object'] .= '<orig>' . xmlify($body) . '</orig>' . "\n";
|
||||
if((strpos($body,'<') !== false) || (strpos($body,'>') !== false)) {
|
||||
|
||||
$body = preg_replace('#<object[^>]+>.+?' . 'http://www.youtube.com/((?:v|cp)/[A-Za-z0-9\-_=]+).+?</object>#s',
|
||||
'[youtube]$1[/youtube]', $body);
|
||||
|
||||
$res['body'] = preg_replace('#<iframe[^>].+?' . 'http://www.youtube.com/embed/([A-Za-z0-9\-_=]+).+?</iframe>#s',
|
||||
'[youtube]$1[/youtube]', $res['body']);
|
||||
$body = html2bb_video($body);
|
||||
|
||||
$config = HTMLPurifier_Config::createDefault();
|
||||
$config->set('Cache.DefinitionImpl', null);
|
||||
|
|
|
@ -779,6 +779,12 @@ function notifier_run($argv, $argc){
|
|||
|
||||
}
|
||||
|
||||
if($normal_mode)
|
||||
call_hooks('notifier_normal',$target_item);
|
||||
|
||||
call_hooks('notifier_end',$target_item);
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1003,3 +1003,37 @@ if (!function_exists('str_getcsv')) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
function cleardiv() {
|
||||
return '<div class="clear"></div>';
|
||||
}
|
||||
|
||||
|
||||
function bb_translate_video($s) {
|
||||
|
||||
$matches = null;
|
||||
$r = preg_match_all("/\[video\](.*?)\[\/video\]/ism",$s,$matches,PREG_SET_ORDER);
|
||||
if($r) {
|
||||
foreach($matches as $mtch) {
|
||||
if((stristr($mtch[1],'youtube')) || (stristr($mtch[1],'youtu.be')))
|
||||
$s = str_replace($mtch[0],'[youtube]' . $mtch[1] . '[/youtube]',$s);
|
||||
elseif(stristr($mtch[1],'vimeo'))
|
||||
$s = str_replace($mtch[0],'[vimeo]' . $mtch[1] . '[/vimeo]',$s);
|
||||
}
|
||||
}
|
||||
return $s;
|
||||
}
|
||||
|
||||
function html2bb_video($s) {
|
||||
|
||||
$s = preg_replace('#<object[^>]+>(.*?)https+://www.youtube.com/((?:v|cp)/[A-Za-z0-9\-_=]+)(.*?)</object>#ism',
|
||||
'[youtube]$2[/youtube]', $s);
|
||||
|
||||
$s = preg_replace('#<iframe[^>](.*?)https+://www.youtube.com/embed/([A-Za-z0-9\-_=]+)(.*?)</iframe>#ism',
|
||||
'[youtube]$2[/youtube]', $s);
|
||||
|
||||
$s = preg_replace('#<iframe[^>](.*?)https+://player.vimeo.com/video/([0-9]+)(.*?)</iframe>#ism',
|
||||
'[vimeo]$2[/vimeo]', $s);
|
||||
|
||||
return $s;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue