From 334353e502db5abd7ee248d183a915ff7468de3a Mon Sep 17 00:00:00 2001 From: Friendika Date: Wed, 16 Mar 2011 21:14:22 -0700 Subject: [PATCH] vorbis audio/video link buttons --- images/audio.gif | Bin 0 -> 559 bytes images/video.gif | Bin 0 -> 257 bytes mod/network.php | 2 ++ mod/profile.php | 2 ++ view/de/jot-header.tpl | 14 ++++++++++++++ view/en/jot-header.tpl | 15 +++++++++++++++ view/fr/jot-header.tpl | 14 ++++++++++++++ view/it/jot-header.tpl | 14 ++++++++++++++ view/jot.tpl | 8 +++++++- view/theme/duepuntozero/style.css | 14 ++++++++++++-- view/theme/loozah/style.css | 16 +++++++++++++--- 11 files changed, 93 insertions(+), 6 deletions(-) create mode 100644 images/audio.gif create mode 100644 images/video.gif diff --git a/images/audio.gif b/images/audio.gif new file mode 100644 index 0000000000000000000000000000000000000000..4be9771161520992606bf9859e9211569539a54b GIT binary patch literal 559 zcmZ?wbhEHb6krfwI2O&IYh-R{X65b^=;a?A5gi|vkeQH@k(7~}m|c>TQ<|Aum{U-a zQB<8*R90G1Q&v@1Qrlfs*H~58RMXg6-`w8R*45hC+u1v@eZtJ12~#>I&hD5rt7Fpa zzDd(MC(r4cGN*gW+^(r}yQeLfICbXaxyvTcT|Q~v>RIy^&7Qw_+JcqS7p|JKZ2g=S zTNW>0y<`Otty!>g)6$h|7p&U0Y}LAjYj>?!vth})?Mv6~Sh8Wy>h+t~Y}m4F)Bd%a zwyod1edE@htG6HBwBz8mUHdj1IJtZO;r)k?A3ApG$ceMZPoF=2=E8|H7Y?1haq8Tq z)8{UqK7aY_#jA%eeLQ#R+U4tauHL+R_2#{6x9;7z^WgUVCwCq^x%=?x-G|SvKYst8 zzCiIO3nLdpJ%bJd5P;%@fxV}pzNxvTKFGYav&k*UsH@f0F36<6+1=75)M9GAkFK+C zxP7OC0h7Fjop(rtb*GaivzD>5UqFyfr+*Z?m$9w0vxi!znKqM(vbv$Zqf(~;CnJxL zsI0QBLZ>PR11lS^sHBZdSD>#a3zx9CmE4?QZhkQKi<_X K(9FchU=08g7)Pc6 literal 0 HcmV?d00001 diff --git a/images/video.gif b/images/video.gif new file mode 100644 index 0000000000000000000000000000000000000000..e4d5e8cddf83895a031908864820be43634e57ed GIT binary patch literal 257 zcmZ?wbhEHb6krfwXpv%IWMtIW)z>f&^>X)0OiXO3@0-*)Y39rYjmu8YTe)@5o@0wo zyxo1`+Jy_(PTzQS>+YlL58pq2`u5D1%g^6@egFQ`%P;>Q|9bZG$M^5Q|Ns8;9}_74 zWMSlDkY~_g00NMm46Jnu-+EIrnbM;87z70hd}IVTd7>7-t?{#vZxATDAkyd2+o-@I z6E(9b*-=zNpV7gkP{BpKW5a= t('Upload photo'), '$weblink' => t('Insert web link'), '$youtube' => t('Insert YouTube video'), + '$video' => t('Insert Vorbis [.ogg] video'), + '$audio' => t('Insert Vorbis [.ogg] audio'), '$setloc' => t('Set your location'), '$noloc' => t('Clear browser location'), '$wait' => t('Please wait'), diff --git a/mod/profile.php b/mod/profile.php index 3354bc9a33..a464b7c06d 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -157,6 +157,8 @@ function profile_content(&$a, $update = 0) { '$upload' => t('Upload photo'), '$weblink' => t('Insert web link'), '$youtube' => t('Insert YouTube video'), + '$video' => t('Insert Vorbis [.ogg] video'), + '$audio' => t('Insert Vorbis [.ogg] audio'), '$setloc' => t('Set your location'), '$noloc' => t('Clear browser location'), '$wait' => t('Please wait'), diff --git a/view/de/jot-header.tpl b/view/de/jot-header.tpl index 25d28c3a7b..62fbe84e48 100644 --- a/view/de/jot-header.tpl +++ b/view/de/jot-header.tpl @@ -104,6 +104,20 @@ tinyMCE.init({ } } + function jotVideoURL() { + reply = prompt("Please enter a video(.ogg) link/URL:"); + if(reply && reply.length) { + tinyMCE.execCommand('mceInsertRawHTML',false,'[video]' + reply + '[/video]'); + } + } + + function jotAudioURL() { + reply = prompt("Please enter an audio(.ogg) link/URL:"); + if(reply && reply.length) { + tinyMCE.execCommand('mceInsertRawHTML',false,'[audio]' + reply + '[/audio]'); + } + } + function jotGetLocation() { reply = prompt("Wo bist du im Moment?", $('#jot-location').val()); if(reply && reply.length) { diff --git a/view/en/jot-header.tpl b/view/en/jot-header.tpl index 20f84b851e..d73fe7d629 100644 --- a/view/en/jot-header.tpl +++ b/view/en/jot-header.tpl @@ -104,6 +104,21 @@ tinyMCE.init({ } } + function jotVideoURL() { + reply = prompt("Please enter a video(.ogg) link/URL:"); + if(reply && reply.length) { + tinyMCE.execCommand('mceInsertRawHTML',false,'[video]' + reply + '[/video]'); + } + } + + function jotAudioURL() { + reply = prompt("Please enter an audio(.ogg) link/URL:"); + if(reply && reply.length) { + tinyMCE.execCommand('mceInsertRawHTML',false,'[audio]' + reply + '[/audio]'); + } + } + + function jotGetLocation() { reply = prompt("Where are you right now?", $('#jot-location').val()); if(reply && reply.length) { diff --git a/view/fr/jot-header.tpl b/view/fr/jot-header.tpl index a4c5f42a43..b1b6dacf01 100644 --- a/view/fr/jot-header.tpl +++ b/view/fr/jot-header.tpl @@ -103,6 +103,20 @@ tinyMCE.init({ } } + function jotVideoURL() { + reply = prompt("Please enter a video(.ogg) link/URL:"); + if(reply && reply.length) { + tinyMCE.execCommand('mceInsertRawHTML',false,'[video]' + reply + '[/video]'); + } + } + + function jotAudioURL() { + reply = prompt("Please enter an audio(.ogg) link/URL:"); + if(reply && reply.length) { + tinyMCE.execCommand('mceInsertRawHTML',false,'[audio]' + reply + '[/audio]'); + } + } + function jotGetLocation() { reply = prompt("Where are you right now?", $('#jot-location').val()); if(reply && reply.length) { diff --git a/view/it/jot-header.tpl b/view/it/jot-header.tpl index ff28def619..8ca5a07174 100644 --- a/view/it/jot-header.tpl +++ b/view/it/jot-header.tpl @@ -104,6 +104,20 @@ tinyMCE.init({ } } + function jotVideoURL() { + reply = prompt("Please enter a video(.ogg) link/URL:"); + if(reply && reply.length) { + tinyMCE.execCommand('mceInsertRawHTML',false,'[video]' + reply + '[/video]'); + } + } + + function jotAudioURL() { + reply = prompt("Please enter an audio(.ogg) link/URL:"); + if(reply && reply.length) { + tinyMCE.execCommand('mceInsertRawHTML',false,'[audio]' + reply + '[/audio]'); + } + } + function jotGetLocation() { reply = prompt("Dove ti trovi ora?", $('#jot-location').val()); if(reply && reply.length) { diff --git a/view/jot.tpl b/view/jot.tpl index 68139ddc01..fd85b9267e 100644 --- a/view/jot.tpl +++ b/view/jot.tpl @@ -26,7 +26,13 @@ $weblink
- $youtube + $youtube +
+
+ $video +
+
+ $audio
$setloc diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css index ad2aac9be1..ce75655fb9 100644 --- a/view/theme/duepuntozero/style.css +++ b/view/theme/duepuntozero/style.css @@ -206,8 +206,10 @@ div.wall-item-content-wrapper.shiny { /* from default */ #jot-perms-icon, #profile-location, -#profile-nolocation, +#profile-nolocation, +#profile-youtube, #profile-video, +#profile-audio, #profile-link, #wall-image-upload, #profile-upload-wrapper, @@ -1056,6 +1058,14 @@ input#dfrn-url { float: left; margin-left: 20px; } +#profile-video-wrapper { + float: left; + margin-left: 20px; +} +#profile-audio-wrapper { + float: left; + margin-left: 20px; +} #profile-location-wrapper { float: left; margin-left: 20px; @@ -1067,7 +1077,7 @@ input#dfrn-url { #profile-jot-perms { float: left; - margin-left: 200px; + margin-left: 150px; font-weight: bold; font-size: 1.2em; } diff --git a/view/theme/loozah/style.css b/view/theme/loozah/style.css index 13c2dda272..1c378793ad 100644 --- a/view/theme/loozah/style.css +++ b/view/theme/loozah/style.css @@ -107,8 +107,10 @@ blockquote:before { #jot-perms-icon, #profile-location, -#profile-nolocation, -#profile-video, +#profile-nolocation, +#profile-youtube, +#profile-video, +#profile-audio, #profile-link, #wall-image-upload, #profile-upload-wrapper, @@ -1125,6 +1127,14 @@ padding: 5px 10px 0px; float: left; margin-left: 20px; } +#profile-video-wrapper { + float: left; + margin-left: 20px; +} +#profile-audio-wrapper { + float: left; + margin-left: 20px; +} #profile-location-wrapper { float: left; margin-left: 20px; @@ -1136,7 +1146,7 @@ padding: 5px 10px 0px; #profile-jot-perms { float: left; - margin-left: 200px; + margin-left: 150px; font-weight: bold; font-size: 1.2em; }