Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'test'

Viewing 25 results - 2,701 through 2,725 (of 11,605 total)
  • Author
    Search Results
  • bjornwebdesign
    Participant

    Ok, last time, I promise :p…

    I updated all my users with the above function, but I don’t want it to run every time on the init hook.
    So I changed it into:

    /*
     * Do stuff when the user's xprofile is updated
    */	
    function xprofile_updated ( $user_id, $posted_field_ids, $errors, $old_values, $new_values) {
    	/*
    	 * Change the user_nicename which is used as profile url, we do NOT want the username in url! Bad bad BP...
    	 * Please note: the user profile url can now be changed by the user, direct linking from other places on the web may result in 404.
    	 * Altough this should run AFTER updating profile fields (saving to DB), the nicename is only updated after a second save. So we need to check from $new_values
    	 */
    	$new_display_name = '';
    	foreach ( $new_values as $key => $value ) {
    		if ( is_array($value) && $key == 1 ) { // field display_name = 1, make sure this is correct
    			foreach ( $value as $k => $v ) {
    				if ( $k == 'value' ) {
    					$new_display_name = $v;
    				}
    			}
    		}
    	}
    	//error_log('******** xprofile_updated: '.$user_id.' | NEW DISPLAY_NAME: '.$new_display_name.' *********');
    	$search = array( ' ', '.' ); 
    	$replace = array( '_', '' );
    	$user = get_user_by( 'ID', $user_id );		
    	if ( $user ) {
    		if ( $user->data->user_status == 0 && $new_display_name ) {
    			$new_user_nicename = strtolower(str_replace( $search, $replace, $new_display_name) );
    			if ( strlen ( $new_user_nicename ) > 50 ) {
    				$new_user_nicename = substr ( $new_user_nicename, 0, 50 );
    			}				
    			if ( $user->data->user_nicename != $new_user_nicename ) { // && $user->ID == 80 <-Add this if you only want to run it for 1 user, so you can test it.
    				$args = array(
    					'ID'            => $user->ID,
    					'user_nicename' => $new_user_nicename
    				);
    				wp_update_user( $args );
    				//error_log('******** updated user_nicename: '.$user->ID.' | NEW USER_NICENAME: '.$new_user_nicename.' *********');
    				wp_redirect( get_site_url().'/leden/'.$new_user_nicename.'/profile/edit/group/1/' ); // we cant use bp_core_get_user_domain() here, because it still uses the old user_nicename
    				exit;					
    			}
    		}
    	}
    }
    add_action( 'xprofile_updated_profile',  'xprofile_updated', 100, 5 );

    Please note, it has some site specific code, like the wp_redirect.
    Any questions? Feel free to ask.


    @mod
    : Hoping my code snippet is not too long.

    Regards, Bjorn

    bjornwebdesign
    Participant

    OMG… We webdesigners are never finished 😛

    After some more testing I noticed that the function did not change all user_nicename.
    The DB type of user_nicename = VARCHAR(50) and the type of display_name = VARCHAR(250).
    If the updated user_nicename exceeds 50 chars the DB field will not update and nothing changes. So I added a substr to resolve this.
    Thankfully the wp_update_user() takes care off special characters like ë.

    Updated code:

    /*
     * Change the user_nicename which is used as profile url, we do NOT want the username in url! Bad bad BP...
     * This runs allways (with init hook), we should only do this once and then on user register & profile update..
     * Please note: the user profile url can now be changed by the user, direct linking from other places on the web may result in 404.
     * And offcourse allways use something like: 'bp_core_get_user_domain( $user_id )' when you want to get the user's profile url.
     */
    $search = array( ' ', '.' ); 
    $replace = array( '_', '' );
    $all_users = get_users();		
    foreach ( $all_users as $user ) {
    	$display_name = $user->data->display_name;
    	if ( $user->data->user_status == 0 && $display_name ) {
    		$new_user_nicename = strtolower(str_replace( $search, $replace, $display_name) );
    		if ( strlen ( $new_user_nicename ) > 50 ) {
    			$new_user_nicename = substr ( $new_user_nicename, 0, 50 );
    		}				
    		if ( $user->data->user_nicename != $new_user_nicename ) { // && $user->ID == 80 <-Add this if you only want to run it for 1 user, so you can test it.
    			$args = array(
    				'ID'            => $user->ID,
    				'user_nicename' => $new_user_nicename
    			);
    			wp_update_user( $args );					
    		}
    	}
    }
    bjornwebdesign
    Participant

    LoL, I thought i was finished, but i noticed the second loop isn’t necessary.
    So here’s my finished/tested code:

    /*
     * Change the user_nicename which is used as profile url, we do NOT want the username in url! Bad bad BP...
     * This conversion runs allways, we should only do this once and then on user register & profile update..
     * Please note: the user profile url can now be changed by the user, direct linking from other places on the web may result in 404.
     * And offcourse allways use something like: 'bp_core_get_user_domain( $user_id )' when you want to get the user's profile url.
     */
    $search = array( ' ', '.' ); 
    $replace = array( '_', '' );
    $all_users = get_users();		
    foreach ( $all_users as $user ) {
    	$display_name = $user->data->display_name;
    	if ( $user->data->user_status == 0 && $display_name ) {
    		$new_user_nicename = strtolower(str_replace( $search, $replace, $display_name) );
    		if ( $user->data->user_nicename != $new_user_nicename ) {
    				$args = array(
    					'ID'            => $user->ID,
    					'user_nicename' => $new_user_nicename
    				);
    				wp_update_user( $args );					
    		}
    	}
    }

    Put this in a function and call it on an action hook, can be done in your theme’s functions.php just like the OP already explained here.

    The function will change something like this: ‘Mr. A.T. Testing123’ into ‘mr_at_testing123’.

    #175899
    Robin W
    Moderator

    not tested but this code should allow editing at all times. Add it to your functions file

    add filter ('bbp_past_edit_lock' , 'rew_allow_editing' )
    
    function rew_allow_editing () {
    	$retval = false ;
    	Return $retval ;
    }

    on other posts, I’d wonder if the bbp_reply_id(); might be returning a null or the wrong id.

    As a test the easiest way would be to replace your Edit </a> with

    <?php echo esc_url( home_url( '/' ) ).'conversations/reply/'.bbp_reply_id().'/edit/' ?></a>
    

    That way you’ll see where it is going to send you and can find out what the problem is

    #175887
    Jon Fergus
    Participant

    Ok, so I’ve added the ability to include a featured image for forums and topics. BUT…. the featured image for forums isn’t being recognized as the og:image when I run it through the facebook debugger. Any ideas why that would be?

    Here’s the forum I’m using as the test: http://nexus.universaltheosophy.com/groups/art-of-living-study-group/forum/

    This is the image I set as the featured image: http://nexus.universaltheosophy.com/wp-content/uploads/nexus.jpg

    But facebook seems to be picking up the first image it finds within the forum.

    Also…. I’d like to add a featured image that works as the og:image for groups. Any idea how to do that?

    EliFerreira
    Participant

    I’m using the 2.5.9 version of bbPress plugin in the latest version of WordPress and would like to remove this tab, but I can not. Can someone help me?

    Here’s a print for better understanding: http://www.siteconcursos.com/wp-content/uploads/2016/06/Capturar.jpg

    #175877
    Brian
    Participant

    Folks, I’m new to bbPress, but I’m setting it up for a client’s membership site. They want a general forum for their members, where any member can post at any time (in other words, no moderation before posting).

    Then they want a more-restrictive forum, where members can create drafts which must be approved before they are published.

    I’ve tested bbP with bbPress Moderation by Ian Stanley, and it works in general — but requiring all posts to be moderated. I’m currently working with FV bbPress Tweaks, which appears to be brand new, but also seems to work and has a few more features.

    However, I’m not seeing anything that allows settings for individual forums. Seems like the sort of thing people would want.

    This all-or-nothing approach seems baffling to me, so I’m hoping that I’ve missed something obvious. Any relief here?

    #175866
    Robin W
    Moderator

    bbPress is tested with wordpress default themes. It maybe a conflict – you need to check plugins and themes

    It could be a theme or plugin issue

    Plugins

    Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.

    Themes

    If plugins don’t pinpoint the problem, as a test switch to a default theme such as twentyfifteen, and see if this fixes.

    Then come back

    #175851
    peter-hamilton
    Participant

    And I wish this forum did a bit more to sell BBPress, where are the showcases, the paid for professionals and why is this theme still sooooo boring.

    Why not integrate more with Buddypress forums, as I can not believe people only using BBPress on its own, I want a better profile.

    Why not have the option to test plugins on this site with live demos.

    Why not have a clear donation button on your site, or do anything to receive funds to spend time improving the BB line.

    Perhaps charge people 1 euro to download BBPress first time then free for life through account, perhaps the free model gives more awareness but BBPress is good enough to compete with expensive forum software.

    Why not compete with codecanyon and offer premium plugins that work without conflicts.

    Why not hire me as vice president of BBCorp and pay me lots, I accept jellybeans as currency.

    Anyway, as mentioned before loving BBPress.

    P.H.

    #175841
    peter-hamilton
    Participant

    Yeah I need to look into that, tried a few years ago but really did not understand how to, even with lots of tutorials.

    I do actually have a test site where I keep most of my clients sites during production, url is http://www.my-latest.com and I should use it more…lol

    Really not a webdeveloper by trade, just a hobby and being anal about controlling everything myself.

    onlijn.com is more of a fun project that had no time allocated for a while, but I am getting to understand BBPress better every time I use it.

    Now just completed a BBPress forum at seedism.nl and very happy with the outcome once again.

    link here

    Ofcourse it is a lot easier now that BBPress and Buddypress have added some core functions that took a lot of hacking a few years ago.

    Still loving BBPress and convinced it is the better option for forums.

    Peace
    Peter

    #175837
    Blaze Miskulin
    Participant

    Okay, now I’m very confused. It appears to be the WP Spamshield plug-in–but I have another install with both bbPress and Spamshield and it works fine (which is why I didn’t bother testing it at first).

    I’ll check the support page for the plug-in.

    #175831
    Robin W
    Moderator
    #175823
    Robin W
    Moderator

    bbPress is tested with wordpress default themes. It maybe a conflict – you need to check plugins and themes

    It could be a theme or plugin issue

    Plugins

    Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.

    Themes

    If plugins don’t pinpoint the problem, as a test switch to a default theme such as twentyfifteen, and see if this fixes.

    Then come back

    #175822
    Robin W
    Moderator

    bbPress is tested with wordpress default themes. It maybe a conflict – you need to check plugins and themes

    It could be a theme or plugin issue

    Plugins

    Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.

    Themes

    If plugins don’t pinpoint the problem, as a test switch to a default theme such as twentyfifteen, and see if this fixes.

    Then come back

    #175818
    Blaze Miskulin
    Participant

    Fresh install of WordPress 4.5.2
    Fresh install of bbPress 2.5.9-6017
    Only other plugin: WP Spamshield
    Theme: Moon
    Site: GeekNiche.com
    All settings left at default.

    As Admin/Keymaster, I am unable to create new topics or reply to topics already posted, when in the forums. I can post a new topic from the dashboard.

    The error (when trying to post from the forums) reads:
    ERROR: You do not have permission to reply.

    To test, I created a new user with the “participant” role. That user can create new topics and reply to topics. It’s only the Keymaster who is forbidden from posting.

    This would appear to be a problem. 🙂

    #175801
    Robkk
    Moderator

    The images might depend on what you are doing on the original site, I have tested it out on my local server and it works fine then doesn’t every now and then. Right now it works fine.

    #175793
    amaros
    Participant

    Yeah, I just updated and it works as well as before 🙂

    It was a pleasure to support you by testing the plugin. Thanks again for your great work and fast solution!

    Regards

    Thomas

    #175772
    Robin W
    Moderator

    Great – thanks for that.

    So with the new version you got exactly the same bug – that’s annoying. I’ll try and work a better solution.

    But I’m glad it works in a wider sense.

    Once I have fixed that I’ll release it as a final live version with a version number one greater so that you get it.

    Thanks again for testing for me.

    #175769
    amaros
    Participant

    Thank you, great job! I just donated 😛

    First it didn`t work and gave me the same error message as before. So I updated the server to PHP 5.6 and activated the rc successfully. It works perfectly! After activation of the new feature I created a new group “common users” and assigned all subscribers to it. Next step I did was to set up the forums I wanted to be visible to all. Done in 5 Minutes…

    I tested it with a few different test users and found everything working properly. The only cute lil bug I found is that the permission “Create/Edit Topics and Replies” appears twice in a row in the menu of the forum pages.

    This is just an amazing Plugin!

    Cheers 🙂

    #175749
    amaros
    Participant

    Thanks a lot for your fast work.

    Unfortunately it doesn´t work on my test system. Activating after installation causes an error. It says it can´t be activated and gives me that error message:

    Fatal error: Can’t use function return value in write context in /hp/bk/ab/vq/www/TR/wp-content/plugins/bbp-private-groups1/includes/meta-box.php on line 88

    #175748
    semperaye
    Participant

    Apparently bbPress doesn’t recognize or work out the latest post (freshness tweak) when you have:

    category -> category -> forum -> topic

    Unless…there is a reply attached to that topic, then the latest post/topic will show up.

    #175705
    merlunix
    Participant

    I am using 2.59 and the latest version of WP. Resetting the forum leads to the same result.

    #175690
    merlunix
    Participant

    I somehow cannot open any topics. Frontend doesn’t work at all – when saving a new topic, it just reloads the page, nothing happens. In the backend, I can add a new topic, but its not displayed.

    Any ideas? I disabled plugins one by one and tested, no luck. Disabled Cloudflare, nothing.

    #175678
    kkpb8084
    Participant

    Hello
    I’m trying to create a website which is only a forum. Therefore most recent topics posted will be on the homepage. It’s not being used yet, so there are just a couple of test topics.

    I wanted to add a column called ‘Views’, so that there are the headings: Topic + Posts + Views +Voices + Freshness

    Can anyone help me to do this? As you’ll see from my website (http://psychiatryadvice.com/), I’ve got the ‘Views’ heading in every topic, and not in the grey box where all the other headings are. This is skewing all the info.

    I’ve added the Views information by editing loop-single-topic.php and using the plugin WP-PostViews.

    I’m presuming it is a CSS issue I’m not addressing?

    using:
    WordPress 4.5.2 running twentysixteen-child theme
    bbPress 2.5.9-6017

    Many thanks.

    #175674
    winrarz
    Participant

    Hello,

    We have a problem on our site with loading shortcodes on /topic/ pages, as you can see in the link below:
    http://www.futsverige.se/forums/topic/test/

    However, the shortcodes work everywhere else. So the problem seems to be within bbPress suppressing the do_shortcode() calls from the theme.

    Anyone knows what could cause this or point us in the right direction on how to circumvent it?

    Thanks

Viewing 25 results - 2,701 through 2,725 (of 11,605 total)
Skip to toolbar