Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 4,801 through 4,825 (of 32,518 total)
  • Author
    Search Results
  • #188057
    docaj
    Participant

    Solved! Found an earlier post about a similar problem. I manually edited spam-prevention.php under Mojo Marketplace Plugin to remove all blocked words including breast. Then problem is gone. Strangely, I had uninstalled Mojo Marketplace long time ago and it does not even show up on my Dashboard. Apparently its codes are still there and working.

    #187996
    manm0untain
    Participant

    Hi

    I happened to check a mail account we are not using yet, when we moved servers. It turns out there are quite a few emails in that account. They are all forum activity alerts coming from BBPress on the site. These are the kind of mails being received:

    UserX wrote:
    
    Hello to all in the group!
    
    Post Link: https://www.juicy.io/groups/venezuela/forum/topic/presentacion/#post-33662
    
    -----------
    
    You are receiving this email because you subscribed to a forum topic.
    
    Login and visit the topic to unsubscribe from these emails.

    It seems to be sending these alerts to a user. But there is no ‘to’ username on the emails. I have done several searches on our user database and there are no users with that email address.

    I have done a full database search for that email address and come up with nothing.

    I have looked absolutely everywhere I can think of within WP admin, for any instance of that address, and can find none. Unless it’s buried away in some obscure corner of a plugin, I am pretty sure I have looked everywhere relevant that I could think of.

    I am downloading the entire site, to do a search on that string within the site files, as a last resort. I’m not optimistic.

    Can anyone point me in the right direction about this?

    Many thanks for your time.

    #187977
    mikedean
    Participant

    A year later but here it is.

    This assumes a drop down select menu has been added to the form-topic.php template. wp_dropdown_categories() is used to make a <select> element for all the terms in the categories taxonomy so users can assign the topic to a term.
    https://codex.wordpress.org/Function_Reference/wp_dropdown_categories

    Then, the topic is assigned to the term they selected by hooking into the new topic process.

    /**
     * Assign a taxonomy term to a topic after it has been selected in the front end (using a <select> element).
     *
     * @param Int           $topic_id               The id for the current topic being created.
     * @param Int           $forum_id               The id for the current forum the topic is being created in.
     * @param Int           $anonymous_data         ??
     * @param Int           $topic_author           The id of the user who created the topic.
     *
     * @see https://codex.wordpress.org/Function_Reference/wp_dropdown_categories
     */
    
    //Update the taxonomy terms when a new topic is created or edited.
    add_action( 'bbp_new_topic', 'myprefix_assign_category_to_post', 20, 4 );
    
    function myprefix_assign_category_to_post( $topic_id, $forum_id, $anonymous_data, $topic_author ) {
            
            //Get the category submitted by the user
            $taxonomy_name = 'category';                    //the slug, or machine name, or the taxonomy
            $term_id = intval( $_POST['cat'] );             //Get value from the <select> element as an interger
    
            //@TODO error checking if term or taxonomy does not exists (returns false if so)
            $term_object = get_term_by( 'id', $term_id, $taxonomy_name );
    
            //Replace the existing subject with the selected one
            wp_set_post_terms( $topic_id, array( $term_id ), $taxonomy_name, false );
    }     
    #187965
    uddin33
    Participant

    I am using WordPress Version 4.7 And have installed bbpress version 2.5.12.Every thing is working fine but in edit profile page no edits are updating.I have checked it for both admin and participant role.After edit profile button submit it redirects to following url
    http://mysite.com/forums/user/pro2/edit/?updated=true but nothing is changed actually.How can i solve this problem?pls help

    Robin W
    Moderator

    It is shocking how bad this forum aspect of WordPress is Amazing that consumers put up with it, really.

    oh how I agree that something that has taken a lot of people a lot of time to write for free, is maintained for free, and supported for free, and has cost you nothing doesn’t do what you want. Absolutely disgusting and shouldn’t be allowed. Of course you could always crack the code open and help improve it, or perhaps it is easier to just easier to expect someone else to do that for you and just complain when it doesn’t.

    #187945
    amitrwt
    Participant

    What I want to do eventually is check whether a topic has a specific tag. Like we check with has tag.

    
    if ( has_tag( $tag, $topic_id)) {
    	echo "exists";
    }else{
    	echo "does not exists";
    }
    
    #187933
    Robin W
    Moderator

    you can always us this in your function file

    //This function changes the text wherever it is quoted
    function change_translate_text( $translated_text ) {
    	if ( $translated_text == 'old text' ) {
    	$translated_text = 'new text';
    	}
    	return $translated_text;
    }
    add_filter( 'gettext', 'change_translate_text', 20 );

    so you would have

    //This function changes the text wherever it is quoted
    function change_translate_text( $translated_text ) {
    	if ( $translated_text == 'by' ) {
    	$translated_text = 'par';
    	}
    	return $translated_text;
    }
    add_filter( 'gettext', 'change_translate_text', 20 );
    #187913
    Eric Malalel
    Participant

    I use bbPress 2.5.14 on latest WP.
    I have enabled TinyMCE with this code:

    add_filter( 'bbp_after_get_the_content_parse_args', 'bbp_enable_visual_editor' );
    function bbp_enable_visual_editor( $args = array() ) {
    	$args['tinymce'] = true;
    	$args['quicktags'] = false;
        return $args;
    }

    It works well when a user posts a new topic.
    But when a user wants to reply to a topic, the tinyMCE editor is displayed but is not editable.
    I can’t see any error in the browser console.
    Please advise.

    #187911

    Try this:

    #bbpress-forums div.odd blockquote, #bbpress-forums ul.odd blockquote {
    background-color: #fff; }

    Also, you should always try to only use !important as an absolute last resort.

    Hope that helps

    #187902
    Robin W
    Moderator
    aravoth
    Participant

    So, I can style an .odd and .even forum differently, in this case to give forums on the the forums front page alternating colors, This also works for topics in the same way. And it carries over into replies, were the lead reply will have background-color: #fff;, and the next reply will have background-color: #000;, for example. What I am trying to do now is change the color of the blockqoute within the forum reply, to be the opposite of what the reply background is.

    so if….

    #bbpress-forums div.odd, #bbpress-forums ul.odd {
    background-color: #000 !important;

    }

    then I would want something like…

    #bbpress-forums div.odd, #bbpress-forums ul.odd, blockquote {
    background-color: #fff !important;

    }

    For some reason I can not get the blockqoute background to change, at least the way I want it too. For some reason it changes the blockquote background globally. I feel like I am missing a CSS class here somewhere. Can anyone give me a hint at what I’m missing?

    #187868

    In reply to: Search by user

    sbmar
    Participant

    I think I almost have this working on my site but I cannot get the form value for some reason:

    $username = $_GET['bbp_search_by_user'];

    If I type the value into the URL (/?bbp_search_by_user=someuser), then it works 100%… should be something silly, right?

    I also added a member drop-down so when someone is searching they can choose from a listing of members that have already created at least one reply:

    global $wpdb;
    
    $sql = "SELECT DISTINCT
    $wpdb->posts.post_author as id,
    $wpdb->users.display_name as name
    FROM
    $wpdb->posts
    INNER JOIN $wpdb->users ON $wpdb->posts.post_author = $wpdb->users.ID
    WHERE
    $wpdb->posts.post_type = 'reply' AND $wpdb->users.display_name <> ''
    ORDER BY
    $wpdb->users.display_name ASC";
    
    $result = $wpdb->get_results($sql, OBJECT);
    			
    echo "<select name=\"bbp_search_by_user\">";
    echo "<option value='ALL'>All Users</option>";
    echo "<option value='ALL'></option>";
    foreach ($result as $key => $value) {			  
       echo "<option value='" . $value->id . "'>" . $value->name . "</option>";
    }
    echo "</select>";

    Anyone know how to get the $_GET[‘bbp_search_by_user’]; to work?

    Here’s the code in my functions.php:

    /* ADD SEARCH BY USER FUNCTION */
    
    add_filter ( 'bbp_before_has_search_results_parse_args', 'ha_custom_search_by_username' );
     
    function ha_custom_search_by_username() {
    	//Get username from input on search page
    	$username = $_GET['bbp_search_by_user'];
    
    	$default_post_type = array( bbp_get_forum_post_type(), bbp_get_topic_post_type(), bbp_get_reply_post_type() );
    	//check if empty
    	if(!empty($username) && $username != "ALL"){
    		//Make ID from username
    		$user = get_user_by('slug', $username);
    		$user_id = $user->ID;
    	$args['author'] = $user_id;	
    	}
    	$args['post_type'] = $default_post_type;
    	$args['orderby'] = 'date';
    	$args['posts_per_page'] = '5';
    	$args['ignore_sticky_posts'] = 'true';
    	$args['order'] = 'DESC';
    
    	return $args;
    }
    #187863
    jkin
    Participant

    Hi, I put all my functions into snippet, and the snippet works fine for me.

    However, in order to solve the video problem, which shows only code in the front page, (yet, it shows at the backend without problem), I tried to put the above code into the snippet, the result is that all contents in the bbpress forum went disappeared.

    Could anyone advise what to do next?

    The video code is like below.

    [video width="640" height="640" mp4="URL../wp-content/uploads/2017/10/video.mp4"][/video]

    jack_tyler
    Participant

    Hi wpweaver,

    Thanks for this. I’m gonna try your code. 🙂

    wpweaver
    Participant

    I don’t think there is a plugin or existing feature that does this.

    I’m really surprised that this isn’t a common question, as it is a real huge issue that allows spammers a backdoor to register as a user to your site. Very bad. This code will redirect all login and password attempts to a static page on your site which can use the regular bbp login, register, and pass shortcodes.

    You can use this custom code:

    <?php
    // intercept the Register and Lost your password? links from the standard WP login screen
    
    define( 'REGISTRATION_URL', 'https://example.com/register');
    
    	add_filter('register_url','custom_redirect_login_register');
    	add_filter('lostpassword_url','custom_redirect_login_register');
    
    	function custom_redirect_login_register($reg_url) {
    		return home_url( REGISTRATION_URL );
    	}
    
    	/**
    	 * Redirects visitors to <code>wp-login.php?action=register</code> to
    	 * <code>site.com/registration-page-name</code>
    	 */
    
    	add_action( 'login_form_register', 'custom_catch_register' );
    	function custom_catch_register()
    	{
    		wp_redirect( home_url( REGISTRATION_URL ) );
    		exit();
    	}
    
    	/*
    	 * intercept bbforum.me/wp-login.php?action=lostpassword and
    	 *           bbforum.me/wp-login.php?action=retrievepassword
    	 *
    	 */
    
    	add_action( 'login_form_lostpassword', 'custom_filter_option' );
    	add_action( 'login_form_retrievepassword', 'custom_filter_option' );
    	/**
    	 * Simple wrapper around a call to add_filter to make sure we only
    	 * filter an option on the login page.
    	 */
    	function custom_filter_option()
    	{
    		wp_redirect( home_url( REGISTRATION_URL ) );
    		exit();
    	}
    ?>

    There are articles on how do add custom code to your bbPress installation.

    Note that this is an option provided with my plugin “Weaver for bbPress” which is a fully turn-key solution to creating a bbPress site. I have not created a stand alone version of this option yet.

    dejanx
    Participant

    I use the theme of Spider Mag,and I want to be the same view of the front page on the mobile phone as the pc Now after I edit cistom code css lokk in mobile dont same like on PC..On the right side of the PC are widgets and commercials and on the front page there are two tutorials next to each other, while on the mobile page at the bottom of the page I show up and advertise. Now I need to edit. Here you see the pictures.

    View on PC https://imgur.com/a/qeb6g

    View after edit custom code css. First go tutorials and on the bottom ads and vidgets , what now must edit ? https://imgur.com/a/9qkLV

    This functions I hve for edit what I want https://imgur.com/a/67GYN

    How make now like on PC view?

    Thanks.

    if above that div id maybe you can directly add that html/php code and don’t forget when you update bbpress.

    #187843
    sharojit
    Participant

    I am working on a site and create two different forum named #1.Mental Health & #2.Staff. Also, create pages for both forums and show tropics from them using the shortcode. But the problem is it shows tropic from the different forum. Like in mental health page shows tropic from the staff forum. Here are those links and a screenshot too.

    #1. Mental Health
    #2. Staff

    jack_tyler
    Participant

    Hi @siamlottery,

    Thank you for your response. What I want to do is to add a custom HTML/PHP above the <div id="bbpress-forums"> as you can see on this screenshot https://www.screencast.com/t/C1AiIkH6

    #187832
    aussiemike
    Participant

    Hello
    I am using the latest version of WP and bbPress with iThemese Builder theme.
    Through the theme functions I am able to show all parts of the forum on a particular theme layout, apart from the forum index page when the breadcrumb ‘forums’ link is clicked. This takes me back to the main template layout which does not have the forum wigdets as required on all forum pages.
    I also have the same issue with the search results.

    I have tried the following code but as I am not overly familiar with bbPress conditionals it does not solve the problem. I believe what I am look for is the correct information to go into this line:
    if ( is_bbpress() && in_category( ‘page’ ) )

    // create view for forums
    function custom_filter_category_layouts( $layout_id ) {
        if ( is_bbpress() && in_category( 'page' ) )
                return '599b46ad5fa63';
    
        return $layout_id;
    }
    add_filter( 'builder_filter_current_layout', 'custom_filter_category_layouts' );

    Any advice appreciated.

    Mike

    #187825
    aussiemike
    Participant

    Hello
    I am seeking help with the correct conditionals to show a custom view.
    I am using
    WP Version 4.8.2
    bbPress Version 2.5.14
    Ithemes Air Theme

    I have been given the following code to insert into the functions.php file in my child theme but I am missing something here?

    function custom_filter_category_layouts( $layout_id ) {
        if ( is_single() && in_category( 'news' ) )
                return 'INSERT LAYOUT NUMBER';
        
        return $layout_id;
    }
    add_filter( 'builder_filter_current_layout', 'custom_filter_category_layouts' );
    

    I have tried most of what look to be the relevant conditionals at https://codex.bbpress.org/bbpress-conditional-tags/

    I can get most forum views to use a theme layout I have created in Air Theme apart from the forum index page and the CHILD FORUMS (forums created with a parent)

    I spoke with iThemes support and they told me it was best to ask here. If someone could help me out here it would be appreciated.

    Best Regards
    Mike

    Mike Costanzo
    Participant

    This is the first post I’ve found that accurately describes my predicament.

    I am setting up a development site and attempting to import my forums via multiple XML files. However, the import process seems to be breaking a key relationship that allows the front-end of BBPress to work.

    After importing, the Forums, Topics, and Replies all display correctly in the Dashboard, but on the front end I just get the standard “Oh bother! No topics were found here!” If I then run the Repair Tools “Recalculate the parent topic for each post” and/or “Recalculate the parent forum for each post,” then the relationship between Forums and Topics is lost, and the Replies page fails to load completely (returns an empty page with no error message).

    From my digging around in the database, this problem seems centered around the field post_parent in wp_posts. On import, WordPress is setting this to “0” instead of the value in my XML file. If I click “Edit” on a Topic in the Dashboard and then click “Update” without changing anything, WordPress correctly repopulates this post_parent value and the Topic appears on the front end under its parent forum. But like @bigt11 and @welshdemon, I don’t have time to do that with 1,200 Topics and 7,400 Replies.

    Does anyone have any ideas? I have spent weeks trying to figure this out. I have tried multiple different XML import plugins, but none of them seem to word well with BBPress (or work with big XML files). Any help you can give here is very much appreciated!

    #187757
    sanjayrath
    Participant

    The steps have been outlined at this link and it works perfectly.

    Shortcode to add “Edit Profile” link

    #187717
    jerichox
    Participant

    Can anyone help me Style this Recent topic widget to match what I currently have on my page for Recent Posts.. I would like it to use the Avatar of the user that posted like it does now, just bigger and have it look the same..

    http://piw.ewarena.com/ is the webpage

    Ive messed with the output code a little and always mess it up cant get it to how I want since im a newbie to the CSS stuff.. Any help would be appreciated!

    using the BBpress Recent Topic Widget..

Viewing 25 results - 4,801 through 4,825 (of 32,518 total)
Skip to toolbar