Changeset 563 for trunk/xpressme_integration_kit/wp-content/plugins
- Timestamp:
- Mar 30, 2010, 1:33:21 PM (15 years ago)
- Location:
- trunk/xpressme_integration_kit/wp-content/plugins/xpressme
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme.php
r534 r563 224 224 echo '<table class="form-table">'."\n"; 225 225 $upload_title = __('Media Upload Base Path','xpressme'); 226 if(xpress_is_multiblog()) $upload_title = $upload_title . '(MultiBlog is not select)';227 226 echo $xpress_config->yes_no_radio_option('is_use_xoops_upload_path', 228 229 230 231 xpress_is_multiblog()232 227 $upload_title, 228 __('Use XOOPS UPLOAD PATH','xpressme'), 229 __('USE WordPress BASE_PATH','xpressme'), 230 false 231 ); 233 232 // $lock = ($xoops_config->module_url != get_bloginfo('url')); 234 233 $lock = false; -
trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme_class.php
r558 r563 306 306 307 307 global $xoops_config; 308 if(xpress_is_multiblog()) $this->is_use_xoops_upload_path = false;309 308 310 309 $table = get_wp_prefix() . 'group_role'; … … 825 824 { 826 825 global $xoops_config; 826 global $blog_id,$blogname; 827 827 828 if ($this->is_use_xoops_upload_path){ 828 829 $wordpress_dir = ABSPATH ; 829 830 $xoops_dir = $xoops_config->xoops_upload_path . '/'; 830 $wordpress_base_url = get_option( 'siteurl' ); 831 if (xpress_is_multiblog() && $blog_id <> 1){ 832 $wordpress_base_url = $xoops_config->module_url; 833 } else { 834 $wordpress_base_url = get_option( 'siteurl' ); 835 } 831 836 $xoops_upload_url = $xoops_config->xoops_upload_url; 832 833 @rmdir($uploads[path]); //remove wordpress side uploads_dir 837 // @rmdir($uploads[path]); //remove wordpress side uploads_dir 834 838 835 839 $uploads[path] = str_replace ($wordpress_dir, $xoops_dir, $uploads[path]); … … 837 841 $uploads[url] = str_replace ($wordpress_base_url, $xoops_upload_url, $uploads[url]); 838 842 $uploads[baseurl] = str_replace ($wordpress_base_url, $xoops_upload_url, $uploads[baseurl]); 843 844 if (xpress_is_multiblog() && $blog_id <> 1){ 845 $pat = str_replace ($xoops_dir, '', $uploads[path]); 846 $pat = preg_replace('/files.*/', '', $pat); 847 $pat = str_replace ('/', '\/', $pat); 848 $uploads[path] = preg_replace('/' . $pat . '/', $blogname . '/',$uploads[path]); 849 850 $pat = str_replace ($xoops_dir, '', $uploads[basedir]); 851 $pat = preg_replace('/files.*/', '', $pat); 852 $pat = str_replace ('/', '\/', $pat); 853 $uploads[basedir] = preg_replace('/' . $pat . '/', $blogname . '/',$uploads[basedir]); 854 } 839 855 840 856 // Make sure we have an uploads dir
Note: See TracChangeset
for help on using the changeset viewer.