project_subdomain (@project_subdomain)

Forum Replies Created

Viewing 25 replies - 26 through 50 (of 50 total)

  • project_subdomain
    Participant

    @project_subdomain

    thanks, robkk, works like a charm!


    project_subdomain
    Participant

    @project_subdomain

    It’s default German (informal) what I’m looking for. Should be the same for formal as well though. Could you provide a link to those so that I can try any of these again?


    project_subdomain
    Participant

    @project_subdomain

    this works great for replies, Robkk.
    Unfortunately it changed the default settings for public forums the same as for private forums.

    Public forums
    should be:
    -logged in and out: read lead and replies
    -logged in, also unsubscribed: read both and write replies


    project_subdomain
    Participant

    @project_subdomain

    Just made a new updated installation of bbpress, just in case..with latest german language file.
    now the prefix is “I” in German on all profile pages. Should be:
    My (singular, German: “Mein”) Profile
    My (plural, German: “Meine”) posts, replies, subscriptions, favorites,..


    project_subdomain
    Participant

    @project_subdomain

    this is a part of the original bbpress/inc/common/template.php (which i thought is relevant on this). untouched. just looked at it for finding a possible reason for the behaviour. i still don’t get it to work.


    project_subdomain
    Participant

    @project_subdomain

    thanks, robkk. that’s weird as I don’t have SEO plugins activated as well.
    This is what’s in my template.php:

    /** Users *****************************************************************/
    
    	// Profile page
    	} elseif ( bbp_is_single_user() ) {
    
    		// User is viewing their own profile
    		if ( bbp_is_user_home() ) {
    			$new_title['text'] = esc_attr_x( 'Your', 'User viewing his/her own profile', 'bbpress' );
    
    		// User is viewing someone else's profile (so use their display name)
    		} else {
    			$new_title['text'] = sprintf( esc_attr_x( "%s's", 'User viewing another users profile', 'bbpress' ), get_userdata( bbp_get_user_id() )->display_name );
    		}
    
    		// User topics created
    		if ( bbp_is_single_user_topics() ) {
    			$new_title['format'] = esc_attr__( "%s Topics",        'bbpress' );
    
    		// User rueplies created
    		} elseif ( bbp_is_single_user_replies() ) {
    			$new_title['format'] = esc_attr__( "%s Replies",       'bbpress' );
    
    		// User favorites
    		} elseif ( bbp_is_favorites() ) {
    			$new_title['format'] = esc_attr__( "%s Favorites",     'bbpress' );
    
    		// User subscriptions
    		} elseif ( bbp_is_subscriptions() ) {
    			$new_title['format'] = esc_attr__( "%s Subscriptions", 'bbpress' );
    
    		// User "home"
    		} else {
    			$new_title['format'] = esc_attr__( "%s Profile",       'bbpress' );
    		}

    project_subdomain
    Participant

    @project_subdomain

    Thanks so much, robkk!
    I’m using nicename in urls which causes a 404 for users that have a nicename. What could be added to above function to solve that?

    How could I possibly find out the correct menu slug id? Right now the menu appears in every menu (sidebar as well) and regardless of an user’s login status.


    project_subdomain
    Participant

    @project_subdomain

    I’m using the default backend design -> menu for all my menus. Tested this at the main navigation menu on my usual desktop version. Actual links show up but throw a 404-page only when clicking.

    My mobile navigation menu (plugin: Responsive Menu) then simply could use one of those menus.

    Should be also possible to make new menu items via functions to one of the menus created in backend design -> menu, right? Already tried this, but really have no idea if the correct slug ID is correct (mobile-menu is the name I gave the menu in backend):

    add_filter ('wp_nav_menu_items', 'add_account-link');
    function add_account_link ( $items, $args ) {
     if (is_user_logged_in() && $args->menu->slug == 'mobile_menu') {
    
    $items = '<ul><li><a href="#">Account</a></li>';
    
    $items ='<ul><li><a href="<?php bbp_user_profile_url( bbp_get_current_user_id() ); ?>" >Profile</a></li>';
    $items ='<li><a href="<?php bbp_user_profile_url( bbp_get_current_user_id() ); ?>replies" >My replies</a></li>';
    $items ='<li><a href="<?php bbp_user_profile_url( bbp_get_current_user_id() ); ?>topics" >My topics</a></li>';
    $items ='<li><a href="<?php bbp_user_profile_url( bbp_get_current_user_id() ); ?>favorites" >My favorites</a></li>';
    $items ='<li><a href="<?php bbp_user_profile_url( bbp_get_current_user_id() ); ?>subscriptions" >My subscriptions</a></li>';
    </ul></ul>;
    }
    return $items;
        }

    project_subdomain
    Participant

    @project_subdomain

    hidden forums are only accessible to Admins and Mods.

    ah ok – makes sense, then.

    The replies should be hidden
    -if logged out
    -if logged in but not subscribed to the specific topic.


    project_subdomain
    Participant

    @project_subdomain

    de (german)


    project_subdomain
    Participant

    @project_subdomain

    now for the mobile navigation I need to get all profile pages into the main menu, too.

    followed this which also uses the add filter above, but did not get it to work: https://bbpress.org/forums/topic/user-porfile-page/

    1. links don’t work. on profile page no nicename is used. and the created menu links give a 404page as the username is not inserted.
    is: mysite/forums/users/topics
    should: mysite/forums/users/USERNAME/topics

    2. cannot set the location of profile page as submenu item.

    really happy for any help with this!


    project_subdomain
    Participant

    @project_subdomain

    still struggling with this.
    would be great to know the purpose of those changes.


    project_subdomain
    Participant

    @project_subdomain

    thanks robkk. just tried out.

    would be great if users see to which topics they can subscribe and are still be able to create new topics.

    when “hidden” the whole forum containing non subscribed topics is hidden which also takes the possibility to subscribe to a topic at all.
    when “private” it removes the reply form if a user is not subscribed (for admins, too).
    replies of a topic are still viewable.


    project_subdomain
    Participant

    @project_subdomain

    thanks, robkk, you are right.

    found a solution that may be useful for some, though:
    It’s these three plugins together:
    Paid MembershipsPro + Paid Memberships Pro bbpress + Paid Memberships Pro: PMPro Roles
    Tried, worked, but unfortunately slowed down my page already and found it to be a bit too much overload for what I need.


    project_subdomain
    Participant

    @project_subdomain

    ok, the code above could not work.

    the remaining issue comes from a different singular/plural form of “Your” in my language.

    came across this, but I’m not sure what’s been the specific purpose of that changeset:
    trac 5105


    project_subdomain
    Participant

    @project_subdomain

    got it to work with some messy beginners’ change of content-single-user.php right after <div id="bbp-user-wrapper"> with:

    <?php if ( bbp_is_single_user_profile()       ) bbp_get_template_part( 'user', 'details');  ?>
    <?php if ( bbp_is_single_user_profile()       ) bbp_get_template_part('user', 'profile'); ?>
    
    <?php bbp_get_template_part( 'user'); ?>
    
    		<div id="bbp-user-body">
    			<?php if ( bbp_is_favorites()                 ) bbp_get_template_part( 'user', 'favorites'       ); ?>
    			<?php if ( bbp_is_subscriptions()             ) bbp_get_template_part( 'user', 'subscriptions'   ); ?>
    			<?php if ( bbp_is_single_user_topics()        ) bbp_get_template_part( 'user', 'topics-created'  ); ?>
    			<?php if ( bbp_is_single_user_replies()       ) bbp_get_template_part( 'user', 'replies-created' ); ?>
    			<?php if ( bbp_is_single_user_edit()          ) bbp_get_template_part( 'form', 'user-edit'       ); ?>
    			
    		</div>
    	</div>
    </div>

    may need new css-styling.

    Could anyone tell me, how to improve the coding part to avoid the repetition of
    <?php if ( bbp_is_single_user_profile() ) bbp_get_template_part('user', ' ?


    project_subdomain
    Participant

    @project_subdomain

    thanks, sam. tried several codes, nothing worked unfortunately (blank page):(

    add_action( 'loop_start', 'divs_only_when_logged_in' );
    
    function divs_only_when_logged_in() {
    
    <?php if ( is_user_logged_in() ) {?>
     
        <div class="new-reply-link">
    
    	<a href="<?php bbp_topic_permalink(); ?>#new-post
    "class="reply-link-text">Reply</a> 
        </div></br>
    
    <ul id="bbp-topic-<?php bbp_topic_id(); ?>-lead" class="bbp-lead-topic">
    
    	<li class="bbp-header">
    
    		<div class="bbp-topic-author"><?php  _e( 'Author',  'bbpress' ); ?>
    </div>
    
    <?php endif; ?>
    }  
    ?>

    project_subdomain
    Participant

    @project_subdomain

    sorry for the delay! just tried – it works like a charm. Thanks a million!


    project_subdomain
    Participant

    @project_subdomain

    thanks, great idea! i’ll report as soon as possible (quite busy at the moment, sorry!).


    project_subdomain
    Participant

    @project_subdomain

    did you create a custom widget?? it might be better if you did for this because then you could output all of the links to the user profile.

    unfortunately not, as i’m using a plugin (jquery-vertical-accordion-menu) for the accordion/dropdown menu widget for that menu, which makes it more complicate, i guess. does the
    $id_base = 'dc_jqaccordion_widget';
    help with this and if where and what else to put in the code for a custom widget that’s using the accordion/dropdown menu as well?

    initially hoped that making a redirect via permalink in functions.php or via page template would be the fastest and easiest solution. am i totally wrong with this?
    as i’m not familiar with coding, i see a high risk of having set wrong variables all the time. i’m using default bbpress setting with a nicername/username instead of user’s id in the permalink.


    project_subdomain
    Participant

    @project_subdomain

    @robkk, thanks again for your support. my latest post disappeared, maybe because of too many links.

    regarding the new menu, i hope this image can explain it better:
    the default menu below the avatar shall be removed and appear in the sidebar on the right in a dropdown menu ( not only to make a consistent layout but also to prevent users to see the information also on other user profiles). Optimally it should be shown only when the user is logged in, but yet i’d be very happy to get it working no matter of the user’s login status.

    unfortunately i can’t provide a link at the moment, so i put the id’s at the image.

    parent menu items are “nachrichten” and “account”.
    in “account” the links for the user profiles shall be displayed as sub menus.

    the parent menu-code looks like this:
    <li id="menu-item-566" class="menu-item menu-item-type-post_type menu-item-object-page cur…ancestor menu-item-has-children menu-item-566 dcjq-parent-li">

    the sub menu show profile-code like this:
    <li id="menu-item-572" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-572"></li>

    (for “edit profile” I already found a menu-link solution)
    [btw: default theme twenty twelve]


    project_subdomain
    Participant

    @project_subdomain

    thanks robkk!
    now the profile link is in the main and also in my sidebar menu.
    unfortunately i’d need to have it in the sidebar menu only. also i’d need a link to the single profile pages as I’d like to replace the default display of options below the avatar which I’d remove then.

    which amendments of that code would do that?


    project_subdomain
    Participant

    @project_subdomain

    just noticed the unlogical doubled url in the code above, but my other tries like for example

    $id = bb_get_user_id();
    $user = bb_get_username();
    $nicename = bb_get_user_nicename('$id','$user');
    
    header('Location: http://domain.com/forums/users/'.$nicename);

    also should have a mistake.


    project_subdomain
    Participant

    @project_subdomain

    Thanks, Robkk, I’d like to try that. Unfortunately I cannot find the “function”-file for the topic-reply-count.
    Do you know where to find it?


    project_subdomain
    Participant

    @project_subdomain

    Many thanks, Robkk!

    Would you give me further information about these issues or where to find the file?
    Are there any other solutions to avoid that first post counting?

    The structure should be:
    Forum – Subforum – Topic (no user interaction allowed) – User Reply
    So switching to Categories doesn’t seem be a solution.

Viewing 25 replies - 26 through 50 (of 50 total)