Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 4,026 through 4,050 (of 32,481 total)
  • Author
    Search Results
  • #196146
    domeboys
    Participant

    This morning, my site, thecardinalnation.com was presenting 500 errors to all visitors. After three hours with support from my hosting provider, HostGator, they were able to isolate the problem to the bbPress plugin, which is now disabled. Obviously, my forums are down, but the base site is again available.

    HG Level 2 support provided the following, which they said indicates that bbPress is trying to pull from PHP 5.4, although the site is now on 7.0. (The site was on 5.4 to start the day, but it was upgraded to 7.0 as part of their trouble-shooting.) HG also said that the 500 error problem would remain even if we took PHP back to 5.4.

    The site is current on all code:
    Wordpress 4.9.8
    bbPress 2.5.14

    [Tue Nov 13 10:30:27 2018] [error] [client 192.185.1.20] Failed loading /opt/php54/lib/php/extensions/no-debug-non-zts-20100525/ZendGuardLoader.so: /opt/php54/lib/php/extensions/no-debug-non-zts-20100525/ZendGuardLoader.so: undefined symbol: zval_used_for_init, referer: http://thecardinalnation.com/login/

    I am not an IT professional, but will do my best to get any additional information as required. Thank you in advance.

    Brian Walton

    #196143
    cfrutos
    Participant

    Got to make a change in a website(can’t include it) and it uses bbpress. I’m relatively new to wp also, sorry for the trouble.

    The /forums route is being added to the nav bar and it’s configured correctly to be accessed but for some reason only the /forums route is not including a correct header/checking if there is a user logged in. How or where could I configure this.

    #196129

    In reply to: username reply thread

    Robin W
    Moderator

    set $id = the number of the user eg 6 and then use

    bbp_get_reply_author ($id)

    #196127
    liyacaty
    Participant

    Hi all.
    After a lot of testings and experiments in order to get the board running with all the same functionalities I had before in 3.0.14, I tried to install a clean version of 3.20, then install the extensions needed. The tentative was successful so I decided to follow this way to bring my old board to the new version in production mode.
    The problem is related to the data migration from 3.0 to 3.2.
    I’ve managed to export the old data from a clean 3.0.x DB (without any mod installed) and then import them in the new, empty 3.2 DB, but the two structures differ a lot, giving me many errors.
    I’ve tried to manage those errors, but editing a 150MB SQL file it’s a huge waste of time.
    I’ve looked for a routine in the php migration code present in the install subdir, but I didn’t find anything usable in a easy way.
    Has anyone met the same problem and is there anybody that could give me a draft solution?
    Thanks in advance.

    haddly
    Participant

    Hi there,
    I want to do a test mailing in my staging area, to see if a new WP plugin works for BBpress. In order to do this, i want to change all emails to my personal email address for all that are subscribed to the forum (so i don’t accidentally send out mails to real users,(this has actually happened to me before)). The problem is that the WP user_email is found in the DB wp_users and the forum meta info is found in the DB wp_usermeta. What SQL statement would i use if i wanted to change the email of all bbpress “Participants” to “myemail@email.com”. I want to do something like:
    UPDATE wp_users SET user_email = "myemail@email.com" WHERE wp_usermeta.meta_key = "participant";

    #196119
    Robin W
    Moderator

    ummm…. AsynCRONous bbPress Subscriptions changes from bbpress one email and bcc to send lots of single emails, so you have moved to the system that your server doesn’t like.

    Email providers stopping lots of emails is why bbpress moved to a single email with bcc, although now many email providers are stopping that, so it’s really hard to know what to do.

    code to send in sets would be complicated

    #196112
    shibaa987
    Participant

    Well, the above function also worked but needed some modification.

    Here is the code snippet that actually worked:

    function bbp_increase_forum_per_page( $args = array() ) {
    $args[‘posts_per_page’] = get_option( ‘_bbp_forums_per_page’, 100 );
    return $args;
    }
    add_filter( ‘bbp_before_has_forums_parse_args’, ‘bbp_increase_forum_per_page’ );

    #196109
    lookingahead
    Participant

    Oh wow — I figured it out, nm!! 🙂

    You can do it via CSS….like this:

    #group-admins {
      pointer-events: none;
      cursor: default;
      text-decoration: none;
      color: black;
    }

    And in bbPress apparently that is the correct way to write that code; the #group-admins part will likely work for everyone, just as it is, because it appears to be the default name for that.

    Whew!

    lookingahead
    Participant

    @robin-w turns out it was a BuddyPress issue. 🙂

    in the BuddyPress forums, an admin there posted this fix — and it worked!

    here’s what they said:

    Hi,

    This is hardcoded in bbpress plugin here bbpress\includes\extend\buddypress\groups.php.

    Find the line $this->slug = ‘forum’; but I think changing this may create some issues but you can check if it works fine for you or not. Also changing anything in core file is never recommended because on the next update you will lose it and then have to redo again.

    One recommendation is that always take a backup of your site when you are doing such core changes.

    Thanks

    i hate editing in the core files, but….well, this was a last resort that apparently has no other solution for now. i’ll keep looking though, and update my files in a better way if any alternative comes up.

    #196107
    lookingahead
    Participant

    I hate to resurrect an old thread, but it contains pretty much everything I’d need to reference.

    The code posted by @crzyhrse above WORKS — for removing the profile links from author avatars when those authors are replying to a thread in a forum. BRILLIANT!

    Now, I’d like to use the same technique/code on the ‘Group Administrator’ avatars.

    I want to KEEP the images, the name…just like how the code posted (above) by @crzyhrse works with people in a discussion. For the life of me, though, I can’t seem to figure out how to use that same code to disable the links in ‘Group Administrator’ avatars, while keeping the images and names intact.

    Anyone happen to have any ideas?

    Here’s the code I’m using…note that the first half is the code that works to shut off links to author profiles PERFECTLY…it’s the second chunk of code that doesn’t seem to affect ‘Group Administrators’ in the same manner.

    Here goes:

    /* Remove link urls from forum author instances...
    */
    add_filter( 'bbp_get_author_link', 'remove_author_links', 10, 2);
    add_filter( 'bbp_get_reply_author_link', 'remove_author_links', 10, 2);
    add_filter( 'bbp_get_topic_author_link', 'remove_author_links', 10, 2);
    function remove_author_links($author_link, $args) {
    $author_link = preg_replace(array('{<a[^>]*>}','{}'), array(" "), $author_link);
    return $author_link;
    }
    
    /* Remove link urls from admin avatars...
    */
    add_filter( 'BBP_Users_Admin_link', 'remove_Users_Admin_links', 10, 2);
    function remove_Users_Admin_links($Users_Admin_link, $args) {
    $Users_Admin_link = preg_replace(array('{<a[^>]*>}','{}'), array(" "), $Users_Admin_link);
    return $Users_Admin_link;
    }
    

    Thanks in advance for any and all assistance!

    #196089
    19dapperdrake53
    Participant

    HELP: WP 4.9.8; bbPress 2.5.15; site: azor.vip

    Hello, I am a senior citizen noob building a one-off site. I wish to post admin questions from my backend what will appear live on my site.

    I have written my post and clicked on Published. Nothing happens. Some time ago when I asked this same question, I was told to do something with shortcodes. I became frustrated because I don’t know what a shortcode is, where I find it, and what I do with it. So I am re-visiting my original question.

    I would be very grateful if you could give me some steps.

    #196065
    eigodeasobo
    Participant

    I would like to output topics with multiple tags.

    For that, I wrote the following code, but it did not work as I expected.

    <section class="fluits">				
    <?php
    $args_fluits = array(
      'post_type' => 'topic',
      'tax_query' => array(
        array(
          'taxonomy' => 'tag_fluits',
          'field'    => 'term_id',
          'terms'    => array( 11, 22 ),
        ),
      ),
    );
    $query_fluits = new WP_Query( $args_fluits );
    ?> 
    <?php if ( bbp_has_topics( $query_fluits ) ) : ?>
      <?php bbp_get_template_part( 'pagination', 'topics'    ); ?>
      <?php bbp_get_template_part( 'loop',       'topics'    ); ?>
      <?php bbp_get_template_part( 'pagination', 'topics'    ); ?>
    <?php else : ?>
      <?php bbp_get_template_part( 'feedback',   'no-topics' ); ?>
    <?php endif; ?>		
    </section>
    
    <section class="vegetables">				
    <?php
    $args_vegetables = array(
      'post_type' => 'topic',
      'tax_query' => array(
        array(
          'taxonomy' => 'tag_vegetables',
          'field'    => 'term_id',
          'terms'    => array( 33, 44 ),
        ),
      ),
    );
    $query_vegetables = new WP_Query( $args_vegetables );
    ?> 
    <?php if ( bbp_has_topics( $query_vegetables ) ) : ?>
      <?php bbp_get_template_part( 'pagination', 'topics'    ); ?>
      <?php bbp_get_template_part( 'loop',       'topics'    ); ?>
      <?php bbp_get_template_part( 'pagination', 'topics'    ); ?>
    <?php else : ?>
      <?php bbp_get_template_part( 'feedback',   'no-topics' ); ?>
    <?php endif; ?>		
    </section>

    Any hints or different args to use to achieve this?

    Thanks.

    lookingahead
    Participant

    @robin-w oh, i used a string modifier to change ‘forum’ to ‘discussion’ — that is how i got the tabs in buddypress groups to say ‘discussion’ versus ‘forum’

    i’ll go back and modify it to say ‘chat’ later, but for now many things in the site that used to say ‘forum’ say ‘discussion’….because i can change that at-will and it’s not causing conflicts, i’ve not updated it yet to say ‘chat.’

    the problem that is currently unmovable though is the group forum slug name; it still says ‘forum’ at the end of all buddypress groups. that was unaffected by the string modifier, and is apparently hard-coded.

    i went to the wp_options table and it does currently say ‘chat’…..sooooo…….apparently that setting is not being used in buddypress when it creates group forum slugs. it is defaulting to ‘forum’ no matter what i do.

    is there another place within bbpress where the instructions on how to create a slug for any type of forum whatsoever is listed…even ‘hard-coded’ as a default setting?

    Robin W
    Moderator

    the slug is a setting held in the database, not in code or a file.

    the single forum root slug is held in wp_options in the database, and is changed by the setting in
    dashboard>settings>forums>single forum slug where you have a label of ‘discuusion’ and I even with buddypress have a description of ‘Forum’, so something is messing round with that and stopping you setting ‘forum’ I think.

    I don’t get ‘discussion’ as the single forum label when I use buddypress, so something else is setting that, hence my suggestions above.

    so if you go to wp_options table and find _bbp_root_slug you can see what it is set to.

    You could just go to wp_options table and find _bbp_root_slug and set it to ‘chat’

    #195994
    Robin W
    Moderator

    by code

    //create vertical list subforum layout
    function custom_bbp_sub_forum_list() {
      $args['separator'] = '
    ';
      return $args;
    }
     add_filter('bbp_after_list_forums_parse_args', 'custom_bbp_sub_forum_list' );

    or this plugin has it as a setting in

    dashboard>settings>bbp style pack>Forum Display

    bbp style pack

    #195990
    Martin J
    Participant

    On the home of the forum, I have categories with sub forums in them, but need to change the layout to be 2 columns instead of comma separated forums. What file can I add to my theme to override this? bbPress has a crazy common between the <li> tags and drives me nuts because you can’t remove that using css.

    lookingahead
    Participant

    @robin-w oh no worries on this being a ‘new’ thing for you to hear — as someone who does not work with buddypress like yourself you’re never going to hear this. it’s because it is a way that bbpress sends information to buddypress when buddypress pulls info from bbpress into it, when it uses bbpress programming to create ‘group forums.’

    it’s not a bug; it’s how the interface between bbpress and buddypress works.

    at least, that’s what i’m gathering now, after reading other people’s posts with the same issue in forums all over the web.

    so my question to you now: what is the file that bbpress uses to say what the slug is — the URL name, which in this case is just ‘forum’….not ‘forums’ but ‘forum’ — so i can alter that?

    i HHAAAATE altering core files, but in this case it’s likely needed.

    whatever ‘default URL/slug’ command is used when buddypress pulls in forum creation/function into bbpress……chances are, that is the file i will (gulp!) need to modify.

    i’m guessing that the same code/file is used to be the ‘default slug name’ in bbpress. which is….’forum’

    what file does that? creates a default ‘forum’ in the URL/slug when a forum is created?

    #195972

    In reply to: Theme

    Robin W
    Moderator

    unfortunately when themes don’t obbey the rules, I can’t code for them 🙂

    #195966

    In reply to: Theme

    Robin W
    Moderator

    apologies put

    .bbp-topic-content p {
        color: black !important;
    }
    #195961

    In reply to: Theme

    Robin W
    Moderator

    put this is my plugin’s custom css tab

    bbp-topic-content p {
        color: black !important;
    }
    #195956
    Robin W
    Moderator

    untested, but this should do it

    add_filter ('bbp_after_has_search_results_parse_args', 'my_function')
    
    my_function ($args) {
    	
    		// bbp_get_closed_status_id() REMOVED,
    		$post_statuses = array(
    			bbp_get_public_status_id(),
    			bbp_get_spam_status_id(),
    			bbp_get_trash_status_id()
    		);
    
    		// Add support for private status
    		if ( current_user_can( 'read_private_topics' ) ) {
    			$post_statuses[] = bbp_get_private_status_id();
    		}
    
    		// Join post statuses together
    		$args['post_status'] = implode( ',', $post_statuses );
    		
    return $args ;
    
    }
    #195947
    Vili
    Participant

    That is indeed it, thanks! So I was barking the wrong tree, nothing wrong with WordPress being able to access bbPress.

    Where should one look for bbPress function documentation these days? I notice that I have difficulties finding information, and when I do find something, figuring out if the functions are for bbPress 1, bbPress 2, or BuddyPress is sometimes difficult. There is some sort of a list here but bbp_get_topic_tag_names() is not included, among others.

    #195946
    Robin W
    Moderator

    sorry, untested and taken from my files – try

    function rew_no_reply_per_forum ($reply_address) {
    	$forum_id = bbp_get_forum_id() ;
    	if ($forum_id == 6 ) $reply_address =  'xxx@yyy.com' ;
    	if ($forum_id == 7) $reply_address =  'abd@hdhd.com' ;
    	return $reply_address ;
    }
    
    add_filter ('bbp_get_do_not_reply_address', 'rew_no_reply_per_forum') ;
    #195945
    maxlevel
    Participant

    I pasted it in the functions.php file of my child theme and it threw this error message before I could save it:
    ————————————-

    Your PHP code changes were rolled back due to an error on line 271 of file wp-content/themes/kleo-child/functions.php. Please fix and try saving again.

    syntax error, unexpected ‘$forum_id’ (T_VARIABLE), expecting ‘(‘

    ————————————-

    Line 271 is:

    if $forum_id = 18747 $reply_address = 'mlt-club@monalisa-twins.com' ;

    The first item in the list of forums

    #195937
    Robin W
    Moderator

    try this in your functions file

    function rew_no_reply_per_forum ($reply_address) {
    	$forum_id = bbp_get_forum_id() ;
    	if $forum_id = 6 $reply_address =  'xxx@yyy.com' ;
    	if $forum_id = 7 $reply_address =  'abd@hdhd.com' ;
    	return $reply_address ;
    }
    
    add_filter ('bbp_get_do_not_reply_address', 'rew_no_reply_per_forum') ;
Viewing 25 results - 4,026 through 4,050 (of 32,481 total)
Skip to toolbar