Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 12,701 through 12,725 (of 32,504 total)
  • Author
    Search Results
  • #142346
    Robin W
    Moderator

    it’s coming from bbpress stylesheet.

    there may be a quicker way to remove this, but one that should work is as follows.

    I don’t think you have a childtheme, and now may be the time to consider having one, see https://codex.bbpress.org/step-by-step-guide-to-setting-up-a-bbpress-forum-part-2/ for more details

    once done you need to navigate to

    wp-content/plugins/bbpress/templates/default/css/bbpress.css

    copy this file into a folder called css within your theme, so you end up with
    wp-content/themes/mychildtheme/css/bbpress.css

    where mychildtheme is the name of your childtheme

    Then edit every line that has

    background-color : xxxxxxx

    change to

    background: none repeat scroll 0 0 rgba(0, 0, 0, 0.4);

    NOTE it goes from background-color to background
    and it is only the background color that you’ll be changing, not lines which just have color: as that’ll be text!

    eg

    #bbpress-forums div.bbp-forum-header,
    #bbpress-forums div.bbp-topic-header,
    #bbpress-forums div.bbp-reply-header {
    	background-color: #f4f4f4;
    }
    

    becomes

    #bbpress-forums div.bbp-forum-header,
    #bbpress-forums div.bbp-topic-header,
    #bbpress-forums div.bbp-reply-header {
    	background: none repeat scroll 0 0 rgba(0, 0, 0, 0.4);
    }
    

    This will make the background transparent, but with a darker tint shading that you have in your sidebar (the amount of difference is on the 0.4 bit, 0.1 is the lightest, 1.0 the darkest).

    Come back if that doesn’t fix it, or for further help

    #142345
    Robin W
    Moderator

    the answer is probably yes – a forum post is a post

    You might do better to install bbPress WP Tweaks Widget Logic plugin which gives you a forum specific sidebar

    alternately (or additionally) use widget logic where you can use code like is_bbpress()or the negative !is_bbpress()to control where widgets are shown

    #142342
    Robin W
    Moderator

    ok, that all looks fine.

    The error as far as I can work out says that it has an unexpected ‘/ ‘ on the evaluated code on line 4 – so for the code in the profile page line 4 is

    ?>/edit/">
    

    However this may not be a line 4 error, but something that is missing or not evaluating correctly on an earlier line.

    I’d try the following

    Recheck that the code is pasted exactly as it should be, with no missing characters eg ‘;’s from ends of lines etc. The lines posted in my previous post go passed the visible, so did you scroll to the right – just checking the obvious first !

    that your domain is spelled correctly etc.

    Then I’d try removing the / from the start of line 4 – the edit bit, and the from the end of the edit bit – I don’t think that’s the problem, but try it anyway.

    The just form my sanity copy the code from your page back into a post here, and I try it on my site to see if I get the error.

    Then we’ll see where we go from there !
    `

    #142338
    Stephen Edgar
    Keymaster

    Are you only to show the avatar? (i.e. Not their, role or title etc)

    This should work to display only the current topic author user’s avatar without their display name or user role and with an avatar size 60px.
    <?php bbp_topic_author_link( array( 'show_role' => false, 'type' => 'avatar', 'size' => 60 ) ); ?>

    #142331
    aravindbachu
    Participant

    @robin-w , I am sorry for those remarks. I am actually more frustrated with myself for not being able to come up with a solution for that.

    I have also seen that you have tried a lot to answer this particular question plaguing this board.

    I have already tried Ronthai’s solution, but this is what pops up on my page :

    Parse error: syntax error, unexpected ‘/’ in /home/knolzgig/public_html/wp-content/plugins/wp-exec-php/wp-exec-php.php(652) : eval()’d code on line 4

    I am unable to understand this now. there were / in many places… and I didn’t understand which one was causing the trouble, which unexpectedly shouldn’t have come in the first place.

    #142330
    aravindbachu
    Participant

    @robin-w , I am sorry for those remarks. I am actually more frustrated with myself for not being able to come up with a solution for that.

    I have also seen that you have tried a lot to answer this particular question plaguing this board.

    I have already tried Ronthai’s solution, but this is what pops up on my page :

    Parse error: syntax error, unexpected ‘/’ in /home/knolzgig/public_html/wp-content/plugins/wp-exec-php/wp-exec-php.php(652) : eval()’d code on line 4

    I am unable to understand this now. there were / in many places… and I didn’t understand which one was causing the trouble, which unexpectedly shouldn’t have come in the first place.

    #142329
    koendb
    Participant

    You could just put it in your functions.php file.

    If it’s empty put this on the first line:

    
    <?php 

    General information about adjusting your theme (and functions.php): Making a child theme

    #142328
    malkah
    Participant

    Hi
    It didnt work. can you look at the code to see if something is not configured correctly?

    this is how the code looks like after I edited Theme Functions (functions.php) from within the WP dashboard>appearance>editor:

    <?php
    remove_filter( ‘bbp_get_reply_content’, ‘bbp_rel_nofollow’ );
    remove_filter( ‘bbp_get_topic_content’, ‘bbp_rel_nofollow’ );
    remove_filter( ‘bbp_get_reply_author_link’, ‘bbp_rel_nofollow’ );
    remove_filter( ‘bbp_get_topic_author_link’, ‘bbp_rel_nofollow’ );

    require_once TEMPLATEPATH . ‘/lib/Themater.php’;
    $theme = new Themater(‘HealthPress’);
    $theme->options[‘includes’] = array(‘featuredposts’);

    $theme->options[‘plugins_options’][‘featuredposts’] = array(‘hook’ => ‘main_before’, ‘image_sizes’ => ‘930px. x 300px.’, ‘effect’ => ‘fade’);
    if($theme->is_admin_user()) {
    $theme->admin_options[‘Ads’][‘content’][‘header_banner’][‘content’][‘value’] = ‘Free WordPress Themes‘;

    }

    #142327
    hitkid
    Participant

    Hey Stephen!

    Thanks so much for the help! 😀 I should’ve mentioned that I tried those already and they didn’t appear. It works with other bbpress functions, but just not the author avatar as you shared with the codex. I updated the version of bbpress. buddypress and wordpress that I am using to try and see if that worked and still nothing. The avatar shows just fine in the mychildtheme/bbpress/loop-single-topic. It shows up with the topic index shortcode. Any ideas as to what the problem is? I’m pretty confused as to what’s going on!

    Thanks again @netweb !

    #142324
    Majijiboo
    Participant

    @koendb

    Which bbpress file should I add the below filter to to get that feature? Thanks.

    function short_freshness_time( $output) {
    $output = preg_replace( '/, .*[^ago]/', ' ', $output );
    return $output;
    }
    add_filter( 'bbp_get_time_since', 'short_freshness_time' );
    add_filter('bp_core_time_since', 'short_freshness_time');
    #142317
    Robin W
    Moderator

    the best solution so far courtesy of Ronthai

    In Dashboard>plugins>add new
    Search for WP exec PHP, install and activate

    Create a new page called “profile” or whatever name you want

    In content of this page, add this code

    <meta http-equiv="refresh" content="0;URL=http://mysite.com/forums/users/<?php global $current_user;
          get_currentuserinfo();
    
         echo  $current_user->user_login . "";
          
    ?>/edit/">
    

    Where mysite.com is your site name

    If using custom menus, add the page to the menu.

    And it works !

    #142316

    In reply to: Menu link to Profile

    Robin W
    Moderator

    Ronthai – have just tried it for profile, and it works well

    Summary of what I did

    In Dashboard>plugins>add new
    Search for WP exec PHP, install and activate

    Create a new page called “profile” or whatever name you want

    In content of this page, add this code

    <meta http-equiv="refresh" content="0;URL=http://mysite.com/forums/users/<?php global $current_user;
          get_currentuserinfo();
    
         echo  $current_user->user_login . "";
          
    ?>/edit/">
    

    Where mysite.com is your site name

    If using custom menus, add the page to the menu.

    And it works !

    #142309
    Robin W
    Moderator

    I’m sorry that you feel that something for which you paid nothing isn’t for you.

    But I don’t think that abusing the people on here who are trying to help you by saying it sucks is really the way forward.

    I hope you are able to find some free software that works precisely as you want.

    Whilst most people use sidebars and widgets to perform these functions, I shall continue to see if there is an easy way to get this into a menu and add it to the codex if I work it out.

    Best wishes

    Robin

    #142308
    Ilya
    Participant

    For participant user search results doesn’t not show topics from private forums.

    If I add to default capabilities in bbp_get_caps_for_role() at /wp-content/plugins/bbpress/includes/core/capabilities.php line 191 the follow line 'read_hidden_forums' => true, then it works, but forum has visibility “Private” not “Hidden”.

    How can I override bbp_get_caps_for_role() without modifying core files?

    #142306
    Darth
    Participant

    Sorry for the delayed response Robin.

    Yes, I am talking about the “Forum” in the left of your pic.

    I made the following change, as suggested:

    <li class=”bbp-forum-info”><?php _e( ‘The Darth Side Forums’, ‘bbpress’ ); ?>

    But, it didn’t take effect. The change is shown as listed above in the actual code, but When I go to “inspect element” on the page it still shows:

    <li class=”bbp-forum-info”>Forum

    Ilya
    Participant

    I have the similar issue.
    How I can add:

    // Forum caps
    'read_hidden_forums'    => true,
    

    Any idea?

    #142294
    Gautam Gupta
    Participant

    The next line after <?php

    #142288
    Stephen Edgar
    Keymaster
    #142287
    Stephen Edgar
    Keymaster

    @kris35 wrote… There are 68 replies to replies and 68 of them are locked this way

    This shouldn’t be an issue unless edit_lock has incorrect timestamps.

    @kris35 wrote… I had to go into the backend and edit the “Reply To” box to zero.

    We have just done some testing trying to reproduce “Incorrect Reply To’s” but couldn’t.

    Setting them to 0 will force the replies to be ‘Not Threaded’ and sorted by date (default)

    @shanebp wrote… …any edit to a reply pushes it to the bottom and destroys the threading. Any threaded replies become ‘flat’.

    I can’t reproduce this, any edit I make to a ‘threaded reply’ in the frontend or backend keeps the correct ‘replyto’ value and works as expected.

    #142283
    jalbaiges
    Participant

    Hello again.

    I have been fighting for a while with the issue and I finally got a solution. I will write it down just in case it could be useful for somebody. Let me say I believe it might exist a smarter solution than mine, so, if you find it, live a comment here, thanks.

    Two steps (bbPress 2.5.3):

    1) In qtranslate/qtranslate_hooks.php, add the following filters:

    add_filter( 'paginate_links', 'qtrans_convertURL' );
    add_filter( 'bbp_get_topic_permalink', 'qtrans_convertURL' );
    add_filter( 'bbp_get_reply_permalink', 'qtrans_convertURL' );
    add_filter( 'bbp_get_forum_permalink', 'qtrans_convertURL' );
    
    add_filter( 'bbp_get_favorites_permalink', 'qtrans_convertURL' );
    add_filter( 'bbp_get_subscriptions_permalink', 'qtrans_convertURL' );
    add_filter( 'bbp_get_user_profile_url', 'qtrans_convertURL' );
    add_filter( 'bbp_get_user_edit_profile_url', 'qtrans_convertURL' );
    add_filter( 'bbp_get_user_replies_created_url', 'qtrans_convertURL' );
    add_filter( 'bbp_get_user_topics_created_url', 'qtrans_convertURL' );

    First four are for the standard navigation inside the forums. Last six are for the user profile menu.

    2) In bbpress/includes/common/template.php, modify a couple of lines in bbp_get_breadcrumb() function:

    In line 2250, replace:

    $crumbs[] = '<a href="' . trailingslashit( home_url() ) . '" class="bbp-breadcrumb-home">' . $r['home_text'] . '</a>';

    with

    $crumbs[] = '<a href="' . trailingslashit( qtrans_convertURL(home_url()) ) . '" class="bbp-breadcrumb-home">' . $r['home_text'] . '</a>';

    And in line 2267, replace:

    $crumbs[] = '<a href="' . esc_url( $root_url ) . '" class="bbp-breadcrumb-root">' . $r['root_text'] . '</a>';

    with

    $crumbs[] = '<a href="' . esc_url( qtrans_convertURL($root_url) ) . '" class="bbp-breadcrumb-root">' . $r['root_text'] . '</a>';

    That’s all! Hope it serves.

    #142279
    Robin W
    Moderator

    your last question is easy, .org have customised, just as you are trying to do by adding it as a menu item – we all like it to look slightly differently to others.

    I have tried from my little knowledge to get it to work but can’t. The best I can get is

    // Filter wp_nav_menu() to add profile link
    add_filter( 'wp_nav_menu_items', 'my_nav_menu_profile_link' );
    function my_nav_menu_profile_link($menu) { 	
    	if (!is_user_logged_in())
    		return $menu;
    	else
    		$user      = get_userdata( $user_id );
    		$name      = esc_attr( $user_name );
    		$user_link = '<li><a href="http://www.mysite.com/forums/users/' . $user . '/edit">Amend profile</a></li>';
    		$menu = $menu . $user_link;
    		return $menu;
    }

    But this just returns

    http://www.mysite.com/forums/users//edit

    Sorry, I have given up.

    Can someone else get this working? – it is now annoying me !

    #142276

    In reply to: Menu link to Profile

    aravindbachu
    Participant

    @ronthai … your method seems good. can you please me more precise? where do we have to add that code and what should we change for other links?

    #142275
    Kris35
    Participant

    Mine has been fixed and this is what it was: I had to go into the backend and edit the “Reply To” box to zero. In the right hand column you have Forum, Topic, Reply To. I changed Reply To to zero.

    My coder then went into my database and found 34 posts from over 15600 replies that were locked.

    This is what he said:

    There are 68 replies to replies and 68 of them are locked this way
    For now I can’t tell exactly why this happening, but it surely does not happen too often.

    So generally users can reply to a post or to another reply, but sometimes a reply hangs to itself.

    Not sure if this helps anyone?

    #142274
    Robin W
    Moderator

    I am still playing with this, and it doesn’t currently work, but it’s something like adding the following to your functions file

    // Filter wp_nav_menu() to add profile link
    add_filter( 'wp_nav_menu_items', 'my_nav_menu_profile_link' );
    function my_nav_menu_profile_link($menu) { 	
    	if (!is_user_logged_in())
    		return $menu;
    	else
    		$profilelink = '<li><a href="<?php bbp_user_profile_url( bbp_get_current_user_id() ); edit" >Amend Profile</a></li>';
    		$menu = $menu . $profilelink;
    		return $menu;
    }

    Syntax needs sorting

    I’m out most of today, but if you or someone else cracks this, then paste the solution here, and it’ll save me repeating the work.

    Solution is based on

    https://buddypress.org/support/topic/adding-dynamic-profile-link-to-main-menu-item/

    which does the business for buddypress.

    #142270
    Stephen Edgar
    Keymaster

    @kris35 wroite... I changed them from being forums of a parent forum into being forums with no parent. I made them stand alone forums and those are the ones Im having trouble with.

    I just tried this.

    From:

    - Parent Forum
    -- Child Forum

    To:

    - Parent Forum
    - Child Forum

    Everything still works for me as expected. (i.e. It did not force the bug in this thread) 🙁

Viewing 25 results - 12,701 through 12,725 (of 32,504 total)
Skip to toolbar