Ticket #6425: 6245.03.patch
File 6245.03.patch, 4.1 KB (added by , 10 years ago) |
---|
-
src/bp-core/bp-core-attachments.php
diff --git src/bp-core/bp-core-attachments.php src/bp-core/bp-core-attachments.php index 2eb9a7b..3156e8b 100644
function bp_attachments_enqueue_scripts( $class = '' ) { 223 223 224 224 // Create the Camera Nav if the WebCam capture feature is enabled 225 225 if ( bp_avatar_use_webcam() && 'user' === $object ) { 226 $avatar_nav['camera'] = array( 'id' => 'camera', 'caption' => __( ' Camera', 'buddypress' ), 'order' => 10 );226 $avatar_nav['camera'] = array( 'id' => 'camera', 'caption' => __( 'Take Photo', 'buddypress' ), 'order' => 10 ); 227 227 228 228 // Set warning messages 229 229 $strings['camera_warnings'] = array( 230 'requesting' => __( ' Requesting video stream, please authorize this websiteto access to your camera.', 'buddypress'),231 'loading' => __( 'Please wait for the video to load.', 'buddypress' ),232 'loaded' => __( ' Video stream loaded. You can use the capture button to display the profile photo preview.', 'buddypress' ),233 'noaccess' => __( ' You denied this website to access to your camera. Please use the upload form.', 'buddypress' ),234 'errormsg' => __( 'Your browser is not supported. Please u se the upload form.', 'buddypress' ),235 'videoerror' => __( 'Video error. Please u se the upload form.', 'buddypress' ),236 'ready' => __( 'Your profile photo is ready , use the save button to validate.', 'buddypress' ),237 'nocapture' => __( 'No p rofile photo was captured, please use the capture button first.', 'buddypress' ),230 'requesting' => __( 'Please allow us to access to your camera.', 'buddypress'), 231 'loading' => __( 'Please wait as we access your camera.', 'buddypress' ), 232 'loaded' => __( 'Camera loaded. Click on the "Capture" button to take your photo.', 'buddypress' ), 233 'noaccess' => __( 'It looks like you do not have a webcam or we were unable to get permission to use your webcam. Please upload a photo instead.', 'buddypress' ), 234 'errormsg' => __( 'Your browser is not supported. Please upload a photo instead.', 'buddypress' ), 235 'videoerror' => __( 'Video error. Please upload a photo instead.', 'buddypress' ), 236 'ready' => __( 'Your profile photo is ready. Click on the "Save" button to use this photo.', 'buddypress' ), 237 'nocapture' => __( 'No photo was captured. Click on the "Capture" button to take your photo.', 'buddypress' ), 238 238 ); 239 239 } 240 240 -
src/bp-core/bp-core-avatars.php
diff --git src/bp-core/bp-core-avatars.php src/bp-core/bp-core-avatars.php index 001c899..bef7735 100644
function bp_avatar_is_front_edit() { 1838 1838 * 1839 1839 * @since BuddyPress (2.3.0) 1840 1840 * 1841 * @global $is_safari 1842 * @global $is_IE 1841 1843 * @return bool True to load the Webcam Avatar UI part. False otherwise. 1842 1844 */ 1843 1845 function bp_avatar_use_webcam() { 1846 global $is_safari, $is_IE; 1847 1844 1848 /** 1845 1849 * Do not use the webcam feature for mobile devices 1846 1850 * to avoid possible confusions. … … function bp_avatar_use_webcam() { 1850 1854 } 1851 1855 1852 1856 /** 1857 * Bail when the browser does not support getUserMedia. 1858 * 1859 * @see http://caniuse.com/#feat=stream 1860 */ 1861 if ( $is_safari || $is_IE ) { 1862 return false; 1863 } 1864 1865 /** 1853 1866 * Use this filter if you need to disable the webcam capture feature 1854 1867 * by returning false. 1855 1868 * -
src/bp-templates/bp-legacy/buddypress/assets/_attachments/avatars/camera.php
diff --git src/bp-templates/bp-legacy/buddypress/assets/_attachments/avatars/camera.php src/bp-templates/bp-legacy/buddypress/assets/_attachments/avatars/camera.php index 4368796..18f8145 100644
13 13 <script id="tmpl-bp-avatar-webcam" type="text/html"> 14 14 <# if ( ! data.user_media ) { #> 15 15 <div id="bp-webcam-message"> 16 <p class="warning"><?php esc_html_e( 'Your browser does not support th e camera feature', 'buddypress' );?></p>16 <p class="warning"><?php esc_html_e( 'Your browser does not support this feature.', 'buddypress' );?></p> 17 17 </div> 18 18 <# } else { #> 19 19 <div id="avatar-to-crop"></div>