Changeset 546 for trunk/xpressme_integration_kit
- Timestamp:
- Mar 15, 2010, 5:14:43 PM (15 years ago)
- Location:
- trunk/xpressme_integration_kit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/custom_functions.php
r545 r546 1031 1031 1032 1032 if (xpress_is_multiblog() && is_user_logged_in()){ 1033 $primary_blog_id = @$current_user->primary_blog; 1034 if (!empty($primary_blog_id)) return $ret; 1033 1035 $active_signup = get_site_option( 'registration' ); 1034 1036 if ( !$active_signup ) $active_signup = 'none'; … … 1037 1039 case 'blog': 1038 1040 $ret['url'] = $xoops_config->module_url . '/wp-signup.php'; 1039 $ret[' script'] = 'wp-signup.php';1041 $ret['menu_url'] = 'wp-signup.php'; 1040 1042 $ret['title'] = __('Create New Blog','xpressme'); 1041 1043 $ret['link'] = '<a href="' . $ret['url'] . '">' . $ret['title'] . '</a>'; … … 1048 1050 return $ret; 1049 1051 } 1052 function xpress_primary_blog_link() { 1053 global $xoops_config; 1054 global $current_user; 1055 global $blog_id; 1056 $ret = array(); 1057 1058 $blog_list = get_blog_list(); 1059 $root_path = get_blog_status(1,'path'); 1060 if (xpress_is_multiblog() && is_user_logged_in()){ 1061 $primary_blog_id = @$current_user->primary_blog; 1062 $primary_path = get_blog_status($primary_blog_id,'path'); 1063 $script = str_replace($root_path, "", $primary_path); 1064 if ($primary_blog_id !== $blog_id){ 1065 $ret['url'] = get_blogaddress_by_id($primary_blog_id); 1066 $ret['menu_url'] = $script; 1067 $ret['title'] = __('Your Primary Blog','xpressme'); 1068 $ret['link'] = '<a href="' . $ret['url'] . '">' . $ret['title'] . '</a>'; 1069 } 1070 } 1071 return $ret; 1072 } 1050 1073 1051 1074 ?> -
trunk/xpressme_integration_kit/xoops_version.php
r543 r546 147 147 if(!empty($create_new_blog)){ 148 148 $modversion['sub'][6]['name'] = $create_new_blog['title']; 149 $modversion['sub'][6]['url'] = $create_new_blog['script']; 149 $modversion['sub'][6]['url'] = $create_new_blog['menu_url']; 150 } 151 $primaryw_blog = xpress_primary_blog_link(); 152 if(!empty($primaryw_blog)){ 153 $modversion['sub'][6]['name'] = $primaryw_blog['title']; 154 $modversion['sub'][6]['url'] = $primaryw_blog['menu_url']; 150 155 } 151 156 }
Note: See TracChangeset
for help on using the changeset viewer.