From f33dc984b7261ee34b09a2c908f7ac47410538bc Mon Sep 17 00:00:00 2001 From: Fawaz Date: Fri, 16 Apr 2010 12:01:42 +0000 Subject: [PATCH] Fixed : Group Video Count Fixed : User Relationship Status Fixed : Made $Cbucket Global Updated : Will remove tag from embed code --- upload/includes/classes/groups.class.php | 6 +++--- upload/includes/classes/user.class.php | 10 +++++----- upload/includes/functions.php | 3 ++- upload/plugins/embed_video_mod/embed_video_mod.php | 2 ++ 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/upload/includes/classes/groups.class.php b/upload/includes/classes/groups.class.php index 9ad6c28b..c5130e9c 100644 --- a/upload/includes/classes/groups.class.php +++ b/upload/includes/classes/groups.class.php @@ -1605,7 +1605,7 @@ class CBGroups extends CBCategory if(SEO==yes) return BASEURL.'/view_topic/'.SEO($tdetails['topic_title']).'_tid_'.$tdetails['topic_id']; else - return BASEURL.'/view_topic?tid='.$tdetails['topic_id']; + return BASEURL.'/view_topic.php?tid='.$tdetails['topic_id']; } @@ -1872,10 +1872,10 @@ class CBGroups extends CBCategory { if(!empty($cond)) $cond .= " AND "; - $result = $db->select(tbl($this->gp_tbl.",users"),'*',$cond." ".tbl("groups.userid")." = ".tbl("users.userid")." ",$limit,$order); + $result = $db->select(tbl($this->gp_tbl.",users"),''.tbl($this->gp_tbl).'.*, '.tbl("users").'.username, '.tbl("users").'.userid',$cond." ".tbl("groups.userid")." = ".tbl("users.userid")." ",$limit,$order); } - //echo $db->db_query; + // echo $db->db_query; if($params['count_only']) return $result = $db->count(tbl($this->gp_tbl),'*',$cond); if($params['assign']) diff --git a/upload/includes/classes/user.class.php b/upload/includes/classes/user.class.php index 23860252..3b864758 100644 --- a/upload/includes/classes/user.class.php +++ b/upload/includes/classes/user.class.php @@ -2102,11 +2102,11 @@ class userquery extends CBCategory{ 'name'=> "relation_status", 'id'=> "last_name", 'value'=> array( - 0 => lang('usr_arr_no_ans'), - 1 =>lang('usr_arr_single'), - 2 =>lang('usr_arr_married'), - 3 =>lang('usr_arr_comitted'), - 4 =>lang('usr_arr_open_relate')), + lang('usr_arr_no_ans') => lang('usr_arr_no_ans'), + lang('usr_arr_single') =>lang('usr_arr_single'), + lang('usr_arr_married') =>lang('usr_arr_married'), + lang('usr_arr_comitted') =>lang('usr_arr_comitted'), + lang('usr_arr_open_relate') =>lang('usr_arr_open_relate')), 'checked'=> $default['relation_status'], 'db_field'=>'relation_status', 'auto_view'=>'yes', diff --git a/upload/includes/functions.php b/upload/includes/functions.php index c3443bca..8c9e2e84 100644 --- a/upload/includes/functions.php +++ b/upload/includes/functions.php @@ -1407,7 +1407,8 @@ * Function use to get video files */ function get_video_file($vdetails,$return_default=true,$with_path=true,$multi=false,$count_only=false,$hq=false) - { + { + global $Cbucket; # checking if there is any other functions # available if(is_array($Cbucket->custom_video_file_funcs)) diff --git a/upload/plugins/embed_video_mod/embed_video_mod.php b/upload/plugins/embed_video_mod/embed_video_mod.php index 60c83c1c..d4053a6d 100644 --- a/upload/plugins/embed_video_mod/embed_video_mod.php +++ b/upload/plugins/embed_video_mod/embed_video_mod.php @@ -240,6 +240,8 @@ if(!function_exists('validate_embed_code')) $h_w_r = array($data['width'],$data['height']); $embed_code = str_replace($h_w_p,$h_w_r,$embed_code); $embed_code = unhtmlentities($embed_code); + $embed_code = preg_replace('/(.*<\/b>)?/','',$embed_code); + //Checking for REF CODE , if its youtube, add AUTOPLAY accordingly) $ref = get_refer_url_from_embed_code($embed_code); if(!empty($ref) && $ref['website'] == "youtube")