Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 13,776 through 13,800 (of 32,585 total)
  • Author
    Search Results
  • #137443
    Stephen Edgar
    Keymaster

    The only tables you need are the ones you listed above:

    • forum
    • thread
    • post
    • tagcontent
    • tag
    • user

    You may have a table prefix vb_ on your tables and you enter that on the import settings ‘Table Prefix’ field.

    https://codex.bbpress.org/import-forums/vbulletin

    #137420
    seoshnek
    Participant

    Hello guys!

    I have a specific question about adding forums, threads and replies in Bbpress.
    Some times ago i made a script that’s sending data to fill the DB in wordpress – i just send via POST: author, post, title etc via php script, that add it all to DB. It was simple.

    Now i have to make it in Bbpress, and there is a problem: besides the ‘wp_posts’ data i see many cells in ‘wp_post_meta’ when i create a forum, topic and a reply such as:

    _bbp_topic_count
    _bbp_total_reply_count
    _bbp_forum_subforum_count
    _bbp_reply_count
    _bbp_last_active_time
    
    etc

    The problem is that I want to do it in the future delayed (this future posts date). And the question is: how do I write this posts and Bbpress helps me and refreshes that data in ‘wp_post_meta’.

    I googled my problem and found this functions in functions.php:

      function bbp_update_topic_topic_id( $topic_id = 0 ) {
         $topic_id = bbp_get_topic_id( $topic_id );
      
         update_post_meta( $topic_id, '_bbp_topic_id', (int) $topic_id );
     
          return apply_filters( 'bbp_update_topic_topic_id', (int) $topic_id );
      }

    That’s what I’m looking for? I will be happy if Bbpress has some API or xml-rpc method to add a topics and replies, but there is none 🙁

    Thank you and sorry for my bad english.

    #137403
    koendb
    Participant

    Hi JJJ,

    I really appreciate your effort on this forum!

    I understand you can’t spend to much time here, but I guess your answers are still quite complicated for most of the bbpress users, an example would be great. I managed to write this with your hints, and some further googling. Thanks!

    
    	function user_favorites_link( $args ) {
    		$args['favorite'] = 'Maak favoriet';
    		$args['favorited'] = 'geen favoriet meer';
    		return $args;
    	}
     add_filter( 'bbp_after_get_user_favorites_link_parse_args','user_favorites_link'); 
    #137402

    In reply to: Adsense Plugin

    FreeWPress
    Participant

    Hi jezza, i’ve add your great plugin, it works fine.. Thanks

    Is possible in future version to have a css customization for the <div>, possibility to add text in adv in middle topic (where is present the date), and decide where put adv, for example, decide to add adv after, 1 or 2, or 3 etc.. users replies?

    Regards…

    #137401
    Daniel J. Lewis
    Participant

    The solution ended up being really simple. Just create a “recent posts” page (or call it whatever you want” and use the shortcode [ bbp-topic-index ].

    #137400
    Travis S.
    Participant

    Now I know this question has been asked every which way to sunday, but I just can’t figure it out for my particular setup. I’m a little annoyed at myself that i’ve been working w/ bbpress for a couple weeks and can’t figure it out on my own.

    Now my home page url is simply mysite.com (id give you a link but its parked). So to clean up the breadcrumbs a bit I made the homepage static so I could use that as the archive/index page. That way breadcrumbs could just be “home > forum-name”.

    Now a couple issues which I can’t seem to figure out. If my homepage is simply mysite.com what could I use as the forums slug? Based off of some previous semi-related topics posted here, I could just add the [bbp-topic-index] short code to the homepage in the high hopes it would redirect the “forums” breadcrumb to the homepage.

    So the ultimate goal here, 2 breadcrumbs. Make homepage the archive/index page so the forum breadcrumbs would be home > forum-name”

    Anyone got any ideas?

    #137395
    Stephen Edgar
    Keymaster

    I can’t access your site ‘forbidden’

    Try resaving your permalinks
    https://codex.bbpress.org/faq/#404

    #137391
    Stephen Edgar
    Keymaster

    Try running the repairs tools (one at a time)
    https://codex.bbpress.org/repair-forums/

    #137390
    Stephen Edgar
    Keymaster

    Check to see if you have a conflict with another WordPress plugin
    https://codex.bbpress.org/faq/#plugin-conflicts

    #137387
    Stephen Edgar
    Keymaster

    The shortcode uses the same setting as ‘Topics per page’ setting.
    https://codex.bbpress.org/forum-settings/#per-rss-page

    Stephen Edgar
    Keymaster

    Can you open the bbPress ‘Settings’ -> ‘Forums’ panel in your WordPress dashboard:
    eg. http://example.com/wp-admin/options-general.php?page=bbpress

    Change a setting eg. Topics from 15 per page to 14 per page click ‘Save Changes’
    (It doesn’t really matter what is changed here as we are just forcing bbPress to update its setting in the wp_options table)

    Go check your site at eg. http://example.com/forums

    Is the issue fixed?

    If Yes, go back and change the setting back to its original setting

    If not, now go to the ‘Tools’ -> ‘Forums’ panel in your WordPress dashboard:
    eg. http://example.com/wp-admin/tools.php?page=bbp-repair

    Run each of these individually:

    • Recalculate the parent topic for each post
    • Recalculate the parent forum for each post
    • Recalculate private and hidden forums
    • Recalculate last activity in each topic and forum
    • Recalculate the sticky relationship of each topic
    • Count topics in each forum
    • Count replies in each forum
    • Count replies in each topic
    • Count voices in each topic
    • Count spammed & trashed replies in each topic
    • Count topics for each user
    • Count replies for each user

    Again go check your site at eg. http://example.com/forums

    Is the issue fixed?

    #137378

    In reply to: BBPress in italian

    Stephen Edgar
    Keymaster

    See https://codex.bbpress.org/bbpress-in-your-language/

    It looks like %96 of bbPress is already translated to Italian 🙂

    #137369
    FreeWPress
    Participant

    Hi, most simple way is to find this line in your bbpress css and add display:none like this:

    li.bbp-topic-voice-count {
        display: none;
        float: left;
        text-align: center;
        width: 12%;
    }
    #137347
    FreeWPress
    Participant

    Hi all, and thanks to @koebdb for tricks, but i have a little question, read this:

    <?php 
    echo '<br>Messages: '.bbp_get_user_post_count(bbp_get_reply_author_id());
    ?>

    This function exist in includes/users/options.php, is written to show all messages from one users, but if you use it return 0…. WHY?

    This is the function:

    /**
     * Output a users total post count
     *
     * @since bbPress (r3632)
     *
     * @param int $user_id
     * @param boolean $integer Optional. Whether or not to format the result
     * @uses bbp_get_user_post_count()
     * @return string
     */
    function bbp_user_post_count( $user_id = 0, $integer = false ) {
    	echo bbp_get_user_post_count( $user_id, $integer );
    }
    	/**
    	 * Return a users total post count
    	 *
    	 * @since bbPress (r3632)
    	 *
    	 * @param int $user_id
    	 * @param boolean $integer Optional. Whether or not to format the result
    	 * @uses bbp_get_user_id()
    	 * @uses get_user_option()
    	 * @uses apply_filters()
    	 * @return string
    	 */
    	function bbp_get_user_post_count( $user_id = 0, $integer = false ) {
    
    		// Validate user id
    		$user_id = bbp_get_user_id( $user_id );
    		if ( empty( $user_id ) )
    			return false;
    
    		$topics  = bbp_get_user_topic_count( $user_id, true );
    		$replies = bbp_get_user_reply_count( $user_id, true );
    		$count   = (int) $topics + $replies;
    		$filter  = ( true === $integer ) ? 'bbp_get_user_post_count_int' : 'bbp_get_user_post_count';
    
    		return apply_filters( $filter, $count, $user_id );
    	}

    Now i have used the second of koendb and it works fine…

    #137344
    koendb
    Participant
    
    <?php 
    echo '<br>Replies: '.bbp_get_user_reply_count_raw(bbp_get_reply_author_id());
    echo '<br>Topics: '. bbp_get_user_topic_count_raw(bbp_get_reply_author_id());
    ?>
    

    Output:
    Replies: 3
    Topics: 2

    or use

    
    echo 'Messages: ';
    echo bbp_get_user_reply_count_raw(bbp_get_reply_author_id()) + bbp_get_user_topic_count_raw(bbp_get_reply_author_id()); 
    

    Output:
    Messages 5

    #137330

    Topic: Topic Formats

    in forum Plugins
    Topher
    Participant

    I’m looking fo something that will give me Topic Formats, like Post Formats. I’d like a topic post to be Image, or Audio, etc.

    I’ve hunted around and didn’t find anything, is there something I’m missing?

    Else, where would I look to code this in?

    #137307
    matt_peapod
    Participant

    Hey,

    I found the same issue. In my case I patched bbPress to bail if the page isn’t a bbpress page. so in bbpress/includes/common/template.php line 2504 (include bbp_title() function, bbpress 2.4):

    if (!is_bbpress()) {
      return $title;
    }

    This must be a bug. Where can I submit a patch for this, or check if it’s a known bug?

    Thanks,
    Matt

    #137290

    In reply to: Conditionals

    Stephen Edgar
    Keymaster

    Cool… One day we will get a codex page ourselves 🙂

    #137285
    Xevo
    Participant

    You’d have to adjust the standard loop output, you can do this in your bbpress theme.

    Line 32 of content-single-topic contains:
    bbp_has_replies()
    Turn it into:
    bbp_has_replies('order=DESC')
    Havent tried this though, but it should work.

    #137284
    Xevo
    Participant

    You can change it in your bbpress theme.

    Line 29 of form-reply.php: <legend><?php printf( __( 'Reply To: %s', 'bbpress' ), bbp_get_topic_title() ); ?></legend>

    #137280

    Topic: Hey guys!

    in forum Troubleshooting
    bluesage
    Participant

    New guy here, done the research yesterday and today but I’m at a loss. I did the workaround where you add in the bbpress code to a page and make it your home page but if you wouldn’t mind taking a look at my homepage: http://www.lakexeno.com you’ll notice there’s just a big white box on top of the forum coding?

    Any help would be *greatly* appreciated.

    Thanks so much!

    #137275

    In reply to: Duplicate Page Titles

    FreeWPress
    Participant

    I have a solution… thi is a correct code.. it work fine…

    function bbpress_title_duplicates($title, $sep, $seplocation){
    	$usrurl = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
    	if (false !== strpos($usrurl,'users')) {
    		if (false !== strpos($usrurl,'topics')) {
        		$title = str_replace('Il profilo di', 'Argomenti aperti da', $title);
    		} elseif (false !== strpos($usrurl,'replies')) {
        		$title = str_replace('Il profilo di', 'Risposte create da', $title);
    		} elseif (false !== strpos($usrurl,'subscriptions')) {
        		$title = str_replace('Il profilo di', 'Discussioni sottoscritte da', $title);
    		} elseif (false !== strpos($usrurl,'favorites')) {
        		$title = str_replace('Il profilo di', 'Topic preferiti da', $title);
    		} else {
        	$title = str_replace('Il profilo di', 'Il Profilo di', $title);
    		}
        }
        return $title;
    }
    add_filter('bbp_title', 'bbpress_title_duplicates');
    #137274

    In reply to: Duplicate Page Titles

    Todd – WireFlare
    Participant

    FreeWPress,

    My sincere apologies. I forgot one line of code on the blog post. I’ve added it and corrected the blog post to reflect the forgotten line.

    Above all of the code that you have add this:

    add_filter('wp_title', 'bbpress_title_duplicates', 20, 3 );

    Again, my apologies for the oversight.

    #137273

    In reply to: Duplicate Page Titles

    FreeWPress
    Participant

    This is a print screen of my code:
    <title> Il profilo di sole38</title>

    I have written exactly this in function and not working!! Incredible!!

    Is too sensitive.. eheheheh…..

    #137270

    In reply to: Duplicate Page Titles

    FreeWPress
    Participant
    function bbpress_title_duplicates($title, $sep, $seplocation){
    	$usrurl = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
    	if (false !== strpos($usrurl,'users')) {
    		if (false !== strpos($usrurl,'topics')) {
        		$title = str_replace('il profilo di', 'Argomenti aperti - test', $title);
    		} elseif (false !== strpos($usrurl,'replies')) {
        		$title = str_replace('il profilo di', 'Risposte create - test', $title);
    		} elseif (false !== strpos($usrurl,'subscriptions')) {
        		$title = str_replace('il profilo di', 'Discussioni sottoscritte - test', $title);
    		} elseif (false !== strpos($usrurl,'favorites')) {
        		$title = str_replace('il profilo di', 'Topic preferiti - test', $title);
    		} else {
        	$title = str_replace('il profilo di', 'Profilo - p', $title);
    		}
        }
        return $title;
    }

    Nothing changed… show only: “Il profilo di nickname” Do not replace nothing.. This is impossible! :/

Viewing 25 results - 13,776 through 13,800 (of 32,585 total)
Skip to toolbar