Brigitte

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • in reply to: I don't found the option to hide empty tabs #8023

    Brigitte
    Expired Member
    Post count: 235

    Finally, if all of this is complicated or important to benefit any next updates, the simplest is that I ONLY use custom tabs and NO predefined tabs. I can easily create shortcodes. Is it a better idea? Thank you.

    in reply to: Some strings not translated and avatar problem #8021

    Brigitte
    Expired Member
    Post count: 235

    Another problem about translations when editing avatar profile (frontend lightbox): this string is not translated (see screenshot), however the character string is well translated in the language files.

    in reply to: I don't found the option to hide empty tabs #8018

    Brigitte
    Expired Member
    Post count: 235

    It’s a shame because this snippet seemed so interesting and easy to use:

    add_filter('uwp_profile_tabs', 'uwp_remove_profile_gd_tabs', 99, 2);
    function uwp_remove_profile_gd_tabs($tabs, $user){
        $uwp_gd = UsersWP_GeoDirectory_Plugin::get_instance();
    
        // Hide listing tab if no listings
        $l_count = $uwp_gd->get_total_listings_count($user->ID);
        if($l_count <= 0){
            unset($tabs['listings']);
        }
    
        // Hide reviews tab if no listings
        $r_count = $uwp_gd->get_total_reviews_count($user->ID);
        if($r_count <= 0){
            unset($tabs['reviews']);
        }
    
        // Hide favourites tab if no listings
        $f_count = $uwp_gd->get_total_favorites_count($user->ID);
        if($f_count <= 0){
            unset($tabs['favorites']);
        }
    
        // Hide invoices tab if no listings
        if(class_exists('WPInv_Invoice')){
            $i_count = $uwp_gd->invoice_count($user->ID);
            if($i_count <= 0){
                unset($tabs['invoices']);
            }
        }
    
        return $tabs;
    }
    in reply to: I don't found the option to hide empty tabs #8017

    Brigitte
    Expired Member
    Post count: 235

    I sincerely apologize Patrik but I don’t understand. Are you sure we are talking about the same thing?

    I just want the tabs to disappear if there is no content (instead of a message saying that there is no content. Besides this would also solve my second current problem here:

    We must differentiate the predefined tabs (posts, comments,) with the custom tabs.

    Indeed with the custom tabs, if we leave the tab content field empty, the tab disappears. But that doesn’t really make sense because the purpose of a custom field is to add a shortcode to it.

    But for the moment my interest here is to make a predefined tab disappear as long as it has no content.

    What do you think?

    in reply to: Some strings not translated and avatar problem #8014

    Brigitte
    Expired Member
    Post count: 235

    No, because in English we use the plural, and in French or anothers languages we can the singular. I think the best idea is to have a specific string for this message because otherwise it is confusing.

    I know it’s not one of the most important things. But this is for the evolution of UsersWP, and that’s the reason why i take time to explain this.

    Actually, thats the strings used in the translation files (pot / po / mo) for: en_EN => fr_FR

    No %s found => Aucun %s trouvé.
    Posts => Articles
    Comments => Commentaires

    Personally, if I was sure that these strings were used only on this profile page, I would customize. But I doubt that a generic term like “Comments” or “Posts” is not used elsewhere, and therefore I prefer to respect the exact translation of these terms.

    Anyway, I need to know if you are going to correct this, or if I need to write down these customizations to avoid losing them during the next UsersWP update.

    in reply to: I don't found the option to hide empty tabs #8013

    Brigitte
    Expired Member
    Post count: 235

    Thank you for your clear answer Patrik.

    But I need more details please. My theme uses the same template (profile-tabs.php) as the original UsersWP file (except some CSS changes).

    Unfortunately I tried to delete the content of the tab content in the php file, But all the tabs still appear …

    Here is the code whose content I have deleted. It is not clear how UsersWP checks if there is content or not, should I delete the div? Only its content?

    
    
    <div id="tab-content" class="container uwp-profile-content">
    	<?php
    	if(!empty($tabs_array)) {
    		foreach ($tabs_array as $tab) {
    			$tab_id = $tab['tab_key'];
    			$tab_url = uwp_build_profile_tab_url($user->ID, $tab_id, false);
    
    			$active = $active_tab == $tab_id ? ' active' : '';
    
    			if ($active_tab == $tab_id) {
    				$active_tab_content = $tab['tab_content_rendered'];
    			}
    
    		}
    	}
    	?>
    	<div class="uwp-profile-entries">
    		<?php
    		if(isset($active_tab_content) && !empty($active_tab_content)){
    			echo $active_tab_content;
    		}
    		?>
    	</div>
    </div>

    Thanks for your help.

    in reply to: Some strings not translated and avatar problem #7999

    Brigitte
    Expired Member
    Post count: 235

    Thank you Alex!

    But please note the most important is not “banner”, but rather all the messages contained in the tabs. As you can see on my screenshot, the other tabs all have the same problem, and it does not give a professional rendering…

    I tested all my current tabs, and this only concerns 3 tabs:

    – Listings
    – Posts
    – Comments (or Reviews?)

    It’s been a long time now the messages use bad translations, and it’s very rare to say bad things about translations of GeoDirectory & UsersWP 😉

    in reply to: Some strings not translated and avatar problem #5543

    Brigitte
    Expired Member
    Post count: 235

    Thank you for this Patrik.

    Regards,
    Ady

    in reply to: Some strings not translated and avatar problem #5380

    Brigitte
    Expired Member
    Post count: 235

    Hi,

    I have last version of UsersWP (v1.1.3), and I got the last .po/.mo files updated.

    “Banner” is already translated, but NO new strings for “banner” 🙁

    About the word “Articles” (Posts), this translation can’t work like this, because if I replace “Articles” by “article” that’s replace others strings. Anyway I guess it’s not a priority problem 😉

    Thanks.

    in reply to: Some strings not translated and avatar problem #5366

    Brigitte
    Expired Member
    Post count: 235

    Hello patrik,
    Sorry for late reply.

    Regarding the black bar, yes no problem I see with the developer of the theme.

    But I’m sorry, as you can see on my screenshot, the translations does not work as I would like 🙁

    in reply to: Some strings not translated and avatar problem #5121

    Brigitte
    Expired Member
    Post count: 235
    This reply has been marked as private.
    in reply to: Some strings not translated and avatar problem #5117

    Brigitte
    Expired Member
    Post count: 235
    This reply has been marked as private.
    in reply to: "Login" menu item stay displayed after login #5114

    Brigitte
    Expired Member
    Post count: 235

    I see that. I assure you that I have tested everything and delete and recreated the menu. Crazy! Anyway thank you Alex.

    in reply to: "Login" menu item stay displayed after login #5108

    Brigitte
    Expired Member
    Post count: 235
    This reply has been marked as private.
    in reply to: Something went wrong when sending email #3931

    Brigitte
    Expired Member
    Post count: 235

    Hi patrik,

    Ok no problem I waiting the fix on the next release, but are you sure it’s this problem on my site? Because I don’t use the WordPress SMTP settings, I use “WP Mail SMTP” plugin.

    WP Mail SMTP reconfigures the wp_mail() function to use Gmail/Mailgun/SendGrid/SMTP instead of the default mail() and creates an options page to manage the settings.

    Thank you, have a nice day 😉

Viewing 15 posts - 1 through 15 (of 16 total)