Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 13,676 through 13,700 (of 32,522 total)
  • Author
    Search Results
  • 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.

    #137631
    Xevo
    Participant

    You can find your answer here.

    #137629
    BuckyOHare
    Participant

    I figured out how to do this and more, unfortunately I have found little documentation about using the extras folder in the BBPress template files and how really wonderful they are for advanced customization without the use of additional hooks.

    EXTRAS Folder located at:
    plugins/bbpress/templates/default/extras

    To increase the amount of items you can customize in your bbpress theme, copy pages from out of here and paste them into the folder:
    plugins/bbpress/templates/default/bbpress

    In this case I needed to customize the individual topic page titles so I copied single-topic.php from out the extras folder pasted it into the bbpress folder. Then I opened up my theme’s page.php file and compared which style, entry-content, and container tags needed to be pasted into the single-topic.php page. I then exchanged bbp_topic_title() for bbp_forum_title() and styled it with my default WordPress styling tags and placed the topic title below it in a smaller more reasonable font than my site’s default .entry-title style.

    The end result is the topic page displaying the forum name up at the top in the site-standard page styling with the topic title below it in a smaller reasonable font, as topics are generally WAY LONGER and should not be styled with the site’s main title styles by default.

    #137615
    Biswadip
    Participant

    Thanks Stephen maybe you are right.

    Perhaps I was being too ambitious in hoping for a solution where the forum id can be used to access the forum name without me having to manually include the forum id and forum name in my code every time the user creates a new forum?

    And in which database table can I find the forum names pray tell? It is not in wp_posts as far as I can see.

    #137610
    jayce103
    Participant

    Thanks for the reply Stephen!

    It seems to be a question that nobody can answer, or, I am not asking it correctly

    Basically I want images that I attach to a topic post to appear in the [bbp-topic-index]. This is inline so that they appear on a home page style set up.

    I have achieved this using BuddyPress and their activity shortcode, but don’t like the way in which only one forum can be used for all groups. I really want 1 group to have more than one forum attached to it.

    If anyone can help with the above please let me know as it is driving me bonkers!!! Other forums such as IPS board can do it so there must be a way of adding a little code to get it to work.

    Cheers,

    #137604
    Stephen Edgar
    Keymaster

    The problem I cannot seem to solve is – where to get the name of the forum from? Without getting the name of the forum from somewhere in the database

    The ONLY place the forum name exists is in the database :/

    Just include the forum name and forum id into your logic, each topics `post_parent’ points to the parent forum id and then you can get the forum name at the same time.

    SELECT * FROM wp_posts WHERE post_type = ‘forum’

    #137595
    Biswadip
    Participant

    I am using WordPress 3.6.1 with plugins Buddypress 1.8.1 and bbpress 2.3. I am trying to import the latest topics and replies from specific bbpress forums into specific wordpress pages.

    I started with a Mysql query:

    $query=”SELECT * FROM wp_posts WHERE post_type = ‘topic’ OR post_type = ‘reply’ ORDER BY post_date DESC”;

    Then (in pseudo code) I planned to do the following:

    // since forum is a parent of topic which is a parent of reply
    // if post is topic get forum id
    // if post is reply get forum id from the parent of the topic
    //create an array of latest topics and replies associated with their forums
    //print latest topics and replies for each forum to different wordpress pages.

    The problem I cannot seem to solve is – where to get the name of the forum from? Without getting the name of the forum from somewhere in the database, my only option would seem to be to hardcode the forum id’s of each forum with their respective names. Which means every time a new forum is created this needs to be added in manually in the code. None of the tables I see in the wp database seems to contain the names of the different forums. Even if one of the other tables did contain it I am still not sure how I would then associate the forum id’s from the wp_posts table with the forum names from another table – presumably I would have to do some kind of join? Or maybe I am going about it completely the wrong way – is anyone able to help an inexperienced developer out of his depth navigate his way through this problem?

Viewing 25 results - 13,676 through 13,700 (of 32,522 total)
Skip to toolbar