JSon

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • in reply to: Radio instead of select options on GD search form #36405

    JSon
    Free User
    Post count: 22

    Hello Simone,

    What I’m referring to is the Custom Post Type Dropdown on GD Search(see attached screenshot) and NOT the Custom Fields. I want to have it as radio instead of dropdown.

    Sorry if I’m confuses you.

    Please let me know how I can achieve that.

    Thanks 🙂


    JSon
    Free User
    Post count: 22

    Thanks guys 🙂

    Now I can access BuddyPress Profile.

    Very much appreciate help from @guust and @paolo.

    I’m not sure how to mark this ticket as resolved. Don’t see anywhere to mark as resolved.


    JSon
    Free User
    Post count: 22

    Reupload error screenshots..


    JSon
    Free User
    Post count: 22

    Hi @guust,

    Thank you for your very fast support 🙂

    Sorry if I confuses you.

    FIRST

    I’m not having trouble logging in, I just having problem accessing links in buddypress profile after logged in. It keeps redirecting to homepage when try to access links in the profile (see attached screenshots).

    To access profile I have to go to GD setting and uncheck “Set geodirectory home page as your home” to make it works (see screenshot). Please try to log in and access profile from top right.

    SECOND

    You said you’ve implemented the login redirect as per http://docs.wpgeodirectory.com/redirecting-the-login-page/

    I see that now there login and register link show up on top bar (see screenshots). You’ll only see it when you activate new theme (don’t know why it didn’t show up on current theme). I tried to remove codes you implemented but it still showing. I don’t want that there.

    
    
    add_action('init' , 'geodir_redirect_to_default_login') ;
    function geodir_redirect_to_default_login()
    {
    if(isset( $_REQUEST['geodir_signup']))
    {
      wp_redirect(home_url().'/wp-login.php');
      exit();
    }
    }

    JSon
    Free User
    Post count: 22

    Hi @guust,

    It’s still redirecting me to homepage when try to access buddypress profile. I’ve done a little more troubleshoot by activate a different theme (Divi) and it works just fine.

    The problem is with the GDF Framework instead of GD plugin.

    Can you please find a fixed for that?

    Regards,
    JSon


    JSon
    Free User
    Post count: 22

    Hi @guust,

    I have already provides login creditial on second reply 😉

    I quess you were wrting the post while I writing the reply.


    JSon
    Free User
    Post count: 22
    This reply has been marked as private.
    in reply to: Add listing page #23734

    JSon
    Free User
    Post count: 22

    I am experiencing same problems as Edgar and would like to find a fix for it.

    Slider Issue on Mobile Views…
    Listing Details on Maps Views…

    Last post since November 24, 2014 wondering if it is fixed yet and when you release update?

    Also attached screenshots…

    in reply to: Listing Preview Page Layout Breaks #21132

    JSon
    Free User
    Post count: 22

    Hi Paolo,

    Actually I didn’t mod any code in listing-details.php, I just CSS it via GDF Child Theme Custom CSS Option to make it look nicer. And I ended up with layout problem in listing preview page. 🙁

    In listing-preview.php file I’ve found:

    
    
    <div class="clearfix geodir-common">
            <div id="geodir_content">

    I tried to insert new class so I can target that class to fix layout issue for preview page.

    
    
    <div class="clearfix geodir-common">
            <div id="geodir_content" class="my-preview-page">

    After updated file I didn’t see it on element inspector.

    Please advice.

    
    
    <?php 
    header("X-XSS-Protection: 0");
    get_header(); 
    
    do_action('geodir_before_main_content','listing-preview-page'); 
    
    	
    	foreach($_REQUEST as $pkey=>$pval){
    	if($pkey=='geodir_video'){$tags= '<iframe>';}
      elseif($pkey=='post_desc'){$tags= '<p><a><b><i><em><h1><h2><h3><h4><h5><ul><ol><li><img><div><del><ins><span><cite><code><strike><strong><blockquote>';}
      elseif($pkey=='geodir_special_offers'){$tags= '<p><a><b><i><em><h1><h2><h3><h4><h5><ul><ol><li><img><div><del><ins><span><cite><code><strike><strong><blockquote>';}
      elseif(is_array($_REQUEST[$pkey])){$tags='skip_field';}
      else{$tags='';}
    
    		$tags = apply_filters('geodir_save_post_key', $tags,$pkey);
    		if($tags!='skip_field'){
    			$_REQUEST[$pkey] = strip_tags($_REQUEST[$pkey], $tags);
    		}
    		
     }
    	
    
    	$post = (object)$_REQUEST;
    	
    	if(isset($post->video))
    	$post->video = stripslashes($post->video);
    	
    	if(isset($post->Video2))
    		$post->Video2 = stripslashes($post->Video2);
    	
    	$post_type = $post->listing_type;
    	$post_type_info = get_post_type_object( $post_type );
    	
    	
    	$listing_label = $post_type_info->labels->singular_name;
    	
    	$term_icon = '';
    	
    	if(!empty($post->post_category)){
    		foreach($post->post_category as $post_taxonomy => $post_term){
    		
    			if($post_term != '' && !is_array($post_term))
    				$post_term = explode(',', trim($post_term,','));
    			
    			
    			$post_term = array_unique($post_term);
    			
    				if(!empty($post_term)){
    					foreach($post_term as $cat_id){
    						$cat_id = trim($cat_id);
    						
    						if($cat_id != ''){
    							/*if($term_icon_url = get_tax_meta($cat_id,'ct_cat_icon'))
    								$term_icon = $term_icon_url['src'];*/
    							$term_icon = get_option('geodir_default_marker_icon');
    							if(isset($post->post_default_category) && $post->post_default_category == $cat_id)
    							{
    								if($term_icon_url = get_tax_meta($cat_id, 'ct_cat_icon', false, $post_type)){
    									if(isset($term_icon_url['src']) && $term_icon_url['src'] != '')
    									 $term_icon = $term_icon_url['src'];
    										break;
    								}
    							}
    						}
    						
    					}
    				}
    		}							
    	}
    	
    	$post_latitude = isset($post->post_latitude) ? $post->post_latitude : '';
    	$post_longitude = isset($post->post_longitude) ? $post->post_longitude : '';
    	
    	$srcharr = array("'","/","-",'"','\');
    	$replarr = array("&prime;","&frasl;","&ndash;","&ldquo;",'');
    	
    	$json_title = str_replace($srcharr,$replarr,$post->post_title);
    	
    	$json ='{';
    	$json .= '"post_preview": "1",';
    	$json .= '"t": "'.$json_title.'",';
    	$json .= '"lt": "'.$post_latitude.'",';
    	$json .= '"ln": "'.$post_longitude.'",';
    	$json .= '"i":"'.$term_icon.'"';
    	$json .= '}';
    	
    	$post->marker_json = $json;
    	
    	$_SESSION['listing'] = serialize($_REQUEST);
    	
    	
    	?>
        		
    <div id="geodir_wrapper">
        
    	<?php geodir_get_template_part('preview','buttons'); ?>
        
        <?php geodir_breadcrumb();?>
        
        <div class="clearfix geodir-common">
            <div id="geodir_content" class="my-preview-page">                        
                 
                <?php do_action('geodir_before_post_preview', $post); ?>
            
                <h1><?php echo (stripslashes($post->post_title)); ?></h1>   
                
                <!-- Post Images slider start --> 
                <?php 
    			
    						if(isset($post->post_images))
                	$post->post_images = trim($post->post_images,",");
    							
                if(isset($post->post_images) && !empty($post->post_images))
    		    	$post_images = explode(",",$post->post_images);
           
    			 
    			 $main_slides = '';
    			 $nav_slides = '';     
    			
    			if(empty($post_images)){
    				$default_img = '';
    				
    				$default_cat = '';
    				if(isset($post->post_default_category))
    					$default_cat = $post->post_default_category;
    				
    				if($default_catimg = geodir_get_default_catimage($default_cat,$post_type))
    					$default_img = $default_catimg['src'];
    				elseif($no_images = get_option('geodir_listing_no_img')){
    					$default_img = $no_images;
    				}
    				
    				if(!empty($default_img)){
    					$post_images[] = $default_img;
    				}
    			}        
                $slides = 0;
                
                if(!empty($post_images)){
                    foreach($post_images as $image){
                     if(!empty($image)){
    					@list($width, $height) = getimagesize(trim($image));
    		
    					if ( $image && $width && $height )
    							$image = (object)array( 'src' => $image, 'width' => $width, 'height' => $height );    
    					
    					
    					if(isset($image->src)){
    					
    						if($image->height >= 400){
    							$spacer_height = 0;
    						}else{
    							$spacer_height = ((400-$image->height)/2);
    						}
    							
    							$image_title = isset($image->title) ? $image->title : '';
    							
    						$main_slides .=	'<li><img src="'.geodir_plugin_url()."/geodirectory-assets/images/spacer.gif".'"  alt="'.$image_title.'" title="'.$image_title.'" style="max-height:'.$spacer_height.'px;margin:0 auto;" />';
    						$main_slides .=	'<img src="'.$image->src.'"  alt="'.$image_title.'" title="'.$image_title.'" style="max-height:400px;margin:0 auto;" /></li>';
    							
    							
    						$nav_slides .=	'<li><img src="'.$image->src.'"  alt="'.$image_title.'" title="'.$image_title.'" style="max-height:48px;margin:0 auto;" /></li>';
    						
    					
    											
    											$slides++;
    						}
    					}					
                    }// endfore
                } //end if
    			
    			
    			if(!empty($post_images)){
                ?>
                <div class="geodir_flex-container" >	
                    <div class="geodir_flex-loader"></div> 
                    <div id="geodir_slider" class="geodir_flexslider">
                      <ul class="slides">
                            <?php echo $main_slides;?>
                      </ul>
                    </div>
                    <?php if( $slides > 1){ ?>
                        <div id="geodir_carousel" class="geodir_flexslider">
                          <ul class="slides">
                                <?php echo $nav_slides;?>
                          </ul>
                        </div>
                    <?php } ?>
                </div>
                <!-- Post Images slider end --> 
                 <?php } ?>
                
                <!-- Post terms start --> 
                <p class="geodir_post_taxomomies clearfix"> 
                    <?php 
                        $taxonomies = array();
                        
                        if(!empty($post->post_tags)){
                           
                            if(taxonomy_exists($post_type.'_tags')):
                                $links = array();
                                $terms = array();
                            	
    							foreach($post_tags as $post_term){
            						
    								$post_term = trim($post_term);
    							   
    							    if($insert_term = term_exists( $post_term, $post_type.'_tags' )){
                                        $term = get_term_by( 'name', $post_term, $post_type.'_tags'); 
                                    }else{
                                        $insert_term = wp_insert_term($post_term, $post_type.'_tags');
                                         $term = get_term_by( 'name', $post_term, $post_type.'_tags');
                                    }	
                                    
                                    if(! is_wp_error( $term ))
                                    {	
    									//$links[] = "<a href='" . esc_attr( get_tag_link($term->term_id) ) . "'>$term->name</a>";
    									// fix tag link on detail page
    									$links[] = "<a href='" . esc_attr( get_term_link($term->term_id, $term->taxonomy) ) . "'>$term->name</a>";
                                        $terms[] = $term;
                                    }
                                }
                            
                                $taxonomies[$post_type.'_tags'] = wp_sprintf('%s: %l.', ucwords($listing_label.' Tags'), $links, (object)$terms);
                            endif;	
                            
                        }
                        
    					if(!empty($post->post_category)){
    					
    						$links = array();
                            $terms = array();
                            
                            foreach($post->post_category as $post_taxonomy => $post_term){
    														
    														if($post_term != '' && !is_array($post_term))
    															$post_term = explode(',', trim($post_term,','));
    														
                                $post_term = array_unique($post_term);
    							
    							if(!empty($post_term)){
    								foreach($post_term as $post_term){
    									$post_term = trim($post_term);
    									
    									if($post_term != ''):	
    										$term = get_term_by( 'id', $post_term, $post_taxonomy); 
    									  
    										$links[] = "<a href='".esc_attr( get_term_link($term,$post_taxonomy) ) . "'>$term->name</a>";
    										$terms[] = $term;
    									endif;
    								}
    							}
    							break;
    						}
                            $taxonomies[$post_taxonomy] = wp_sprintf('%s: %l.', ucwords($listing_label.' Category'), $links, (object)$terms);
                            
                        }
                        echo '<span class="geodir-category">' . $taxonomies[$post_taxonomy] . '</span>';	
    										
    					if ( isset( $taxonomies[$post_type.'_tags'] ) ) {		
                       		echo '<span class="geodir-tags">' . $taxonomies[$post_type.'_tags'] . '</span>';
    					}
                        ?>   
                </p>
                <!-- Post terms end -->
    			<?php if( (int)get_option( 'geodir_disable_gb_modal' ) != 1 ) { ?>
                <!-- Post info tabs start -->     
                <script type="text/javascript">
                   jQuery(function() {
                        jQuery('#post-gallery a').lightBox({
                            overlayOpacity : 0.5,
                            imageLoading : '<?php echo geodir_plugin_url().'/geodirectory-assets/images/lightbox-ico-loading.gif';?>',
                            imageBtnNext : '<?php echo geodir_plugin_url().'/geodirectory-assets/images/lightbox-btn-next.gif';?>',
                            imageBtnPrev : '<?php echo geodir_plugin_url().'/geodirectory-assets/images/lightbox-btn-prev.gif';?>',
                            imageBtnClose : '<?php echo geodir_plugin_url().'/geodirectory-assets/images/lightbox-btn-close.gif';?>',
                            imageBlank : '<?php echo geodir_plugin_url().'/geodirectory-assets/images/lightbox-blank.gif';?>'
                        });
                    });
                </script>
    			<?php } ?>			   
                <!-- Post info tabs start -->
    			<?php geodir_show_detail_page_tabs(); ?>
                <?php do_action('geodir_after_post_preview', $post);?>
            </div>		
    		<?php     
            
            do_action('geodir_after_main_content');
        
            geodir_get_template_part('detail','sidebar');
    		
            ?>
        </div>
    </div>    
    <?php get_footer();   
    in reply to: Listing Preview Page Layout Breaks #20776

    JSon
    Free User
    Post count: 22

    Hi guys, thanks for your quick response.

    @stiofan OConnor thanks for the hint :). I’ve looked into listing-preview.php file and have copied it to GDF child/geodirectory/listing-preview.php as described in this doc -> http://docs.wpgeodirectory.com/customizing-geodirectory-templates/ so I can preserve the original file and if anything goes wrong I have backup file.

    @paolo I’m a PHP newbie 😉 just started to learn PHP only few months ago.

    Would you be kind to give me hints or guidance on how to go about fixing the preview page? Any specific lines of code I should look for or edit in listing-preview.php file? Is there a better options or ways to edit the details page without effecting preview page?

    Kind Regards,
    JSon 🙂

    in reply to: Listing Preview Page Layout Breaks #20662

    JSon
    Free User
    Post count: 22

    Here is my URL:
    http://www.nyamey.com/restaurants/cambodia/phnom-penh/phnom-penh/morimoto/

    Please try to add listing and preview listing looking very bad 🙁

    Doesn’t suppose to inherit from detail page so customer can preview actual listing?

    Your help is much appreciates

    Thanks in advance
    json


    JSon
    Free User
    Post count: 22

    Hi, what I’m trying to acomplish is very similar to @wu. I have two things wanting to get clarify.

    #1. Moving the following elements to content area:

    1. Star Ratings
    2. Favorite/Unfavorite
    3. Business Info

    And removed above from sidebar.

    Issue: When moving elements altogether only one element takes effect and not all. For example when moving star rating and business info altogether only one appear in details page. It’s either/or and is not all.

    I have use provided codes as follow:

    
    
    
    /* Add Reviews Below Tabs */
    add_action( 'geodir_details_main_content', 'comments_template_change_position',65,5);
    function comments_template_change_position(){
    	echo comments_template();
    }
    
    // remove star rating from sidebar
    add_filter('geodir_detail_page_sidebar_content', 'geodir_detail_page_sidebar_content_order_myfix',10,1);
    
    function geodir_detail_page_sidebar_content_order_myfix($sort){
    	$elements_to_remove = array('geodir_detail_page_review_rating', 'geodir_add_to_favourite_link', 'geodir_detail_page_more_info');
    	$sort = array_diff($sort,$elements_to_remove);
    	return $sort;
    }
    // add star rating to top of main content
    add_action('geodir_details_main_content', 'geodir_detail_page_review_rating', 'geodir_add_to_favourite_link', 'geodir_detail_page_more_info');
    
    

    I have success adding comments below tabs and removed certain elements from sidebar but can not add wanted elements to content area.

    #2. I tried to rearrange tabs, however, it’s still showing profile tab as default. How to make other tab as default tab? For example, ‘more info’ tab as default.

    Thanks,
    Nak


    JSon
    Free User
    Post count: 22

    I still haven’t hear from support team either. I private my reply because I am sharing my URL which I only want moderator to know. No other secret 🙂


    JSon
    Free User
    Post count: 22

    I want business info and rating next to images. But that would be duplicate info showing? or can I can disable info on sidebar? I want it to only show on the right of images as pointed out in the screenshot.

    Slide show of images is too big and when make it smaller i have empty white space next to it and is perfect place to for business info and rating. I want leave sidebar for other stuff such banners.

    Thanks 😉


    JSon
    Free User
    Post count: 22
    This reply has been marked as private.
Viewing 15 posts - 1 through 15 (of 19 total)