Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 13,651 through 13,675 (of 32,503 total)
  • Author
    Search Results
  • #137765

    In reply to: Freshness Link

    CC-Cailin
    Participant

    Awesome! Thank you… One more question though.
    After using your code, if there has been no posts made in a forum, it shows a random time (which seems to be the time I created the forum) and the topic title appears blank. How can I do this:

    if the forum has posts, show the latest post title and time (the code you gave me), otherwise show “No topics posted yet”.

    #137762

    In reply to: Freshness Link

    FreeWPress
    Participant

    Hi, this is my solution:

    <div class="bbp-forum-last-topic-name"><a href="<?php bbp_forum_last_topic_permalink(); ?>" title="<?php bbp_forum_last_topic_title(); ?>"><?php bbp_forum_last_topic_title(); ?></a></div>

    Create a class in your bbpress css named bbp-forum-last-topic-name and give your personal style…

    Put all code into <li class="bbp-forum-freshness"> </li>

    Flash120
    Participant

    Hello, I am new to wordpress. I’ve ran into issues as I’ve been building a site most have been fixed after 4-20min of searching and troubleshooting. But I have been searching for this one for about 3 hours by now and I have no clue what the issue is.

    Basically registration to my site/forum doesn’t work. I put the right short codes for registration and password recovery. Once I click register it takes me to the page. I put in a user name, email, and click ”register”. Then I get taken to the sites WordPress login. No email sent, nothing. My site is koolhow.com. If anyone can help me out I would greatly appreciate it. It’s been driving me insane. :\

    #137754
    Stephen Edgar
    Keymaster

    They are all in wp_posts just like topic & reply, forum is the post_type in wp_posts

    Modify your query that you linked in your original post:
    $query=”SELECT * FROM wp_posts WHERE post_type = 'forum' OR post_type = 'topic' OR post_type = 'reply' ORDER BY post_date DESC”;

    Stephen Edgar
    Keymaster

    As per https://bbpress.trac.wordpress.org/ticket/2298

    Works for me. Likely related to incorrect database encoding. Are you/they able to use these characters in regular WordPress posts and/or pages?

    So if you change the URL’s back to post name do these pages work correctly?

    eg. http://ccnb.co.kr/?page_id=27 becomes http://ccnb.co.kr/오시는길

    #137751
    Stephen Edgar
    Keymaster

    Just set your forums to ‘private’

    https://codex.bbpress.org/getting-started-with-bbpress/#creating-your-first-forum

    Visibility: decide whether your forum is public, private or hidden.
    Public – Anyone can see these forums
    Private – Only logged in registered users can see these forums
    Hidden: Only Moderators/Admins can see these forums

    csotelo
    Participant

    I have this issue on my theme “The current user is being initialized without using $wp->init()”, what I have seen on my theme, I was reading on google, but most of the post sais “disable debug mode”, well as a coder I know it is just for hide the error but is not a solution

    I hop you could give me a hand on how to solve that

    The tracer error is

    # Time Memory Function Location
    1 0.0503 151124 {main}( ) ../index.php:0
    2 0.0940 185304 require_once( ‘…./wp-admin/admin.php’ ) ../index.php:10
    3 0.1142 194292 require_once( ‘…./wp-load.php’ ) ../admin.php:30
    4 0.1364 202428 require_once( ‘…./wp-config.php’ ) ../wp-load.php:34
    5 0.2221 247748 require_once( ‘…./wp-settings.php’ ) ../wp-config.php:44
    6 10.5487 37383376include( ‘…./wp-content/themes/laredchina/functions.php’ ) ../wp-settings.php:293
    7 11.1273 38559980 current_user_can( ) ../functions.php:452
    8 11.1273 38560008 wp_get_current_user( ) ../capabilities.php:1281
    9 11.1273 38560096 get_currentuserinfo( ) ../pluggable.php:54
    10 11.1274 38560484 wp_set_current_user( ) ../pluggable.php:102
    11 11.1276 38561280 do_action( ) ../pluggable.php:37
    12 11.1355 38566692 call_user_func_array ( ) ../plugin.php:406
    13 11.1355 38566708 bbp_setup_current_user( ) ../plugin.php:406
    14 11.1356 38566816 _doing_it_wrong( ) ../sub-actions.php:147
    15 11.1363 38568004 trigger_error ( ) ../functions.php:3041

    #137733
    niuserre
    Participant

    Uppercase is probably caused by CSS somewhere in your theme, look for

    text-transform:uppercase;

    and change it to

    text-transform: none;

    To hide the [0,0] I think you need to write a function to modify bbp_list_forums but check what classes are around it and maybe you can hide it with CSS.

    iaincrossley
    Participant

    Just replying to myself on here, given the lack of interaction, with the solution to this.

    Place the following code in your theme’s functions.php – this will allow mapping of a particular WLM membership level to the bbPress Participant level:

    function map_bbpress_user_role(){
    	//get the user class
    	$cu = wp_get_current_user();
    	$cu_roles = $cu->roles; //get the user roles
    	if(in_array("administrator", $cu_roles)) return; //disregard if admin
    
    	$isplatinumplus =  in_array("platinumplus", $cu_roles); //check if it has platinumplus role
    	$isblocked = array_search(bbp_get_blocked_role(),$cu_roles); //check if it has bbp_blocked role
    
    	if($isplatinumplus){ //if it has platinumplus role
    		$cu->add_role(bbp_get_participant_role()); //add aparticipant role
    
    		if($isblocked !== false){ //if it has bbp_blocked role
    			$cu->remove_role(bbp_get_blocked_role()); //remove it
    		}
    	}elseif($isblocked === false){ //if he is not platinumplus and dont have bbp_blocked
    		/*
    		* 	This part makes sure that only platinumplus roles have access to the forum
    		*/
    		$cu->add_role(bbp_get_blocked_role()); //add bbp_blocked
    	}
    }
    add_action('init','map_bbpress_user_role');

    I used the Members plugin to create a platinumplus user role that then mapped to the WLM level of the same name, and the above code then mapped that role to the appropriate bbPress one. Obvs, any instances of ‘platinumplus’ have to be amended to the role you are intending to map.

    Robin W
    Moderator

    hmmm…could be lots of things

    I see you’re using the twentyeleven theme, how have you set the forums page up?

    Easiest way is to create a page called ‘forums’ and put this short code in it

    [bbp-forum-index]

    Then add that page to your menu’s

    Then as the page is set to display the sidebar it should all work

    #137696
    Stephen Edgar
    Keymaster

    bbPress blocks shortcodes by default.

    You will need to use this plugin to setup ‘allowed’ shortcodes:
    https://wordpress.org/plugins/bbpress2-shortcode-whitelist/

    Cory
    Participant

    I created a page on our site and I’m using code from the “Newest Topics” template to make this page generate the most recent topics.

    But this shows me the most recent activity, not the most recent topics. So, any topic that gets a new response then becomes the most recent topic, even if it was started a long time ago.

    What I WANT to show are the most recently started topics, like the Newest Topics widget shows. Is there an adjustment I can make?

    Can I include a new query in my page template that will order them differently?

    Is there a different template for this altogether?

    #137686
    CraigM1970
    Participant

    Okay, I managed to work this out for myself eventually. It was quite simple once I realised I was dealing with the Teeny version. Doh!

    For anyone else who wants to add the Visual editor and also have it only paste plain text from Word etc. here’s how.

    /*  Enable visual editor on tinymce in bbPress  */
    
    function bbp_enable_visual_editor( $args = array() ) {
        $args['tinymce'] = true;
        return $args;
    }
    add_filter( 'bbp_after_get_the_content_parse_args', 'bbp_enable_visual_editor' );
    
    /* Enable TinyMCE paste plugin */
    
    function bbp_add_paste_plugin($args) {
      array_push($args,'paste');
      return $args;
    }
    add_filter( 'teeny_mce_plugins', 'bbp_add_paste_plugin');
    
    /* Enable paste_sticky as default */
    
    function bbp_myformatTinyMCE($in) {
    	$in['paste_text_sticky'] = true;
    	$in['paste_text_sticky_default'] = true;
       return $in;
    }
    add_filter('teeny_mce_before_init', 'bbp_myformatTinyMCE');
    
    Bryan Morgan
    Participant

    I am using the latest install of wordpress, buddypress and bbpress as well as gravity forms. I am needing to place a Gravity From inside a private bbpress forum topic as this form is meant to be seen only by members of this private buddypress group. When using the typical “add form” button at the top of the edit topic page which adds the shortcode to embed the form it places the shortcode there but then the shortcode is the only thing that appears when viewing the topic, not the intended form. Is shortcode not the way to do this and if not what is the best way to proceed to allow only members of this private group access to this form?

    #137684
    Angel Candelaria
    Participant

    Hi @lomyn.

    On the bbPress install package, there should be a file called bbpress.css (under bbpress/templates/default/css). Just extract that file from the package, add the code at the end of the file, and copy it to your theme’s css directory.

    #137676
    CraigM1970
    Participant

    Wordpress 3.6.1, bbPress 2.4, Buddypress1.8.1 Site is http://www.thedoctorwhoforum.com

    I’m using the visual TinyMCE editor on my bbPress Forum pages and also on my normal WordPress blog pages.

    Some users have issues with spans and other code being copied in when they paste. I have been able to stop the pasting issue on the blog comments with the following code which added the paste plugin to TinyMCE:

    function myformatTinyMCE($in) {
    	$in['plugins'] = 'inlinepopups, paste, wordpress, wplink, wpdialogs';
    	$in['paste_text_sticky'] = true;
    	$in['paste_text_sticky_default'] = true;
       return $in;
    }
    add_filter('tiny_mce_before_init', 'myformatTinyMCE' );
    

    However, it doesn’t affect TinyMCE on the Forums. They seem to be separate. I instigated the visual editor on the bbPress topics with the following code:

    function bbp_enable_visual_editor($in) {
      $in['tinymce'] = true;
     return $in;
    }
    add_filter( 'bbp_after_get_the_content_parse_args', 'bbp_enable_visual_editor');

    I’ve tried lots of different things, but I can’t seem to affect the bbPress TinyMCE the same way I can the blog TinyMCE.

    For example, this didn’t work:

    function bbp_enable_visual_editor($in) {
      $in['tinymce'] = true;
      $in['plugins'] = 'inlinepopups, paste, wordpress, wplink, wpdialogs, tabfocus';
      $in['paste_text_sticky'] = true;
      $in['paste_text_sticky_default'] = true;
     return $in;
    }
    add_filter( 'bbp_after_get_the_content_parse_args', 'bbp_enable_visual_editor');

    Anybody any ideas how to add paste to the plugins and possibly add paste_text_sticky etc as well? I’m a bit new at this.

    Thanks.

    #137668
    FreeWPress
    Participant

    Replace with this:

    	#content {
    		float: left;
    		width: 68%;
    	}

    You must to remove your code and replace…

    No max-widht no # ok?

    #137664
    FreeWPress
    Participant

    Open your style.css, go to line 1089 and write this:

    
    #content {
        float: left;
        width: 68%;
    }
    #137660
    seamtv
    Participant

    I have Genesis 2 and a responsive child theme. In my case, the forum index is working, but I, too, get this mysterious image thumbnail and cannot – for the life of me – figure out why it’s appearing. I looked at the code on the page and tracked down the image in my media library but have no idea where the instructions to display it on the page are coming from. If you ever figure it out, please let me know!
    If it’s any help, the index appears to be using an ‘archive’ css of some kind. I am wondering if there was a setting at some time to have an image header that has since been deprecated in my theme but has resulted in errant code haunting me?

    #137659
    benjito
    Participant

    I want to create a custom landing page which displays my forums.

    I have created a page with the bbPress shorcode [bbp-forum-index] which works fine.

    However, the breadcrumb “forums” link goes to a different page which contains a load of text jibberish!

    I changed the forums slug in the settings to my page (and updated the permalinks) but instead of the breadcrumb link going to the page with the shortcode, the page itself gets over-written by the text jibberish.

    It actually looks like the bbPress sidebar is loading into the main content field, though i don’t know why or how to fix.

    Page with shortcode > activenaturalist.org.uk/anforum/
    Forums breadcrumb text jibberish > activenaturalist.org.uk/fmsforum/

    If anyone thinks this post looks familiar it is because i posted about something similar in the past then went under siege from a Chinese bot, the website has only recently been allowed back up by my host.

    WP 3.6.1
    bbPress 2.4

    #137653
    lomyn
    Participant

    Hello, which file did you insert the code into? I’m a bit of a coding novice. Appreciate the help!

    #137652
    zandfabriek
    Participant

    Ok, thanx!
    I’ll give it a try…

    zandfabriek

    #137648
    Xevo
    Participant

    bbPress is just using WordPress’s custom post type function, so you can just use the standard loop that you use for Worpdress and edit it to only load the forums custom post type.

    #137647
    zandfabriek
    Participant

    Hi Kenny,

    Any luck figuring out how to show a forum with php only? I’m trying to do the same, but can’t find any relevant info.

    Regards,
    zandfabriek

    #137636
    Xevo
    Participant

    You can edit the theme files and remove it from there.

    Here’s more info about editing the bbPress theme files.

Viewing 25 results - 13,651 through 13,675 (of 32,503 total)
Skip to toolbar