Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 11,901 through 11,925 (of 32,585 total)
  • Author
    Search Results
  • #146555
    inventor1
    Participant

    Just paid $29 to become a member there, hopefully their coders can resolve this soon. Thanks again guys.

    #146554
    Stephen Edgar
    Keymaster

    ‘It should work’ on a clean installation, I use a translation for approx half the sites I develop bbPress and it works perfectly. I just tested Slovak and is working as expected 🙂

    I found the issue… You need to name the files bbpress-sk_SK.mo and bbpress-sk_SK.po using the _ underscore character not the - hyphen.

    I have never tried the ‘Polylang’ plugin and I had a quick look in their support forums but couldn’t find any information if they support bbPress or not, maybe posting a question in their support forums may get an answer from others who have tried and had success or not, at least that way you can find out if Polylang is compatible with bbPress.

    #146543
    Yukon Cornelius
    Participant

    update: this was undesirable because the link to the reply was going to the reply itself, which is just a single post of the ‘reply’ custom post type. I have created this dodgy hack of the above code so the permalink for the replies is still the topic permalink. I’m sure there are a million better ways to do this, but it does the job for me so i thought i’d share the updated version.

    function jag_add_last_reply() { { 
     $jag_last_reply_id = bbp_get_forum_last_reply_id();
     $jag_last_topic_id = bbp_get_forum_last_topic_id();
    
    $new_args = array(
        'post_type'=> 'reply',
        'p' => $jag_last_reply_id
    );
    $post_title_args = array(
        'post_type'=> 'topic',
        'p' => $jag_last_topic_id
    );
    $other_args = array(
        'post_type'=> 'topic',
        'p' => $jag_last_topic_id
    );
    $jag_query = new WP_Query( $post_title_args );
    $nest_query = new WP_Query( $new_args );
    $another_nest_query = new WP_Query( $other_args );
    
       if ( $jag_query->have_posts() ) : while ( $jag_query->have_posts() ) : $jag_query->the_post();
         $this_post_id=$post->ID;
         $this_post_permalink= get_permalink(); ?>   
                                 
         <a href="<?php echo $this_post_permalink; ?>">
    
    <?php endwhile; 
       endif; wp_reset_query();
    
       if ( $nest_query->have_posts() ) : while ( $nest_query->have_posts() ) : $nest_query->the_post();
         $this_post_id=$post->ID;
         $this_post_title= get_the_title();
         $this_post_content= get_the_excerpt(); ?>
                                 
         <h1><?php echo $this_post_title; ?></h1></a>
         <div class="the_content"><?php echo $this_post_content; ?></div>
                         
       <?php endwhile;
    elseif ( $another_nest_query->have_posts() ) : while ( $another_nest_query->have_posts() ) : $another_nest_query->the_post();
         $this_post_id=$post->ID;
         $this_post_title= get_the_title();
         $this_post_content= get_the_excerpt(); ?>   
                                 
         <h1><?php echo $this_post_title; ?></h1></a>
         <div class="the_content"><?php echo $this_post_content; ?></div>
                         
       <?php endwhile; 
       endif; 
        }} 
    // Hook into action
    add_action('bbp_theme_after_forum_description','jag_add_last_reply');
    Yukon Cornelius
    Participant

    I spent so long trawling google for an answer to this question, so i am sharing what i came up with. It might not be beautiful code (i patched it together from a number of sources), but it works for me.

    Basically, i have a list of forums on my forum home page. I just wanted to show the latest post within each forum as a teaser below the forum description – not just the title, but the excerpt, too. I can’t believe there’s nothing out there explaining how to do this. It seems like a pretty obvious format for the forum index.

    The following snippet will output the latest reply, with post title and post link below the forum description. If there are no replies, it will output the latest topic instead.

    function jag_add_last_reply() { { 
     $jag_last_reply_id = bbp_get_forum_last_reply_id();
     $jag_last_topic_id = bbp_get_forum_last_topic_id();
    $new_args = array(
        'post_type'=> 'reply',
        'p' => $jag_last_reply_id
    );
    $other_args = array(
        'post_type'=> 'topic',
        'p' => $jag_last_topic_id
    );
     
    $nest_query = new WP_Query( $new_args );
    $another_nest_query = new WP_Query( $other_args );
     
       if ( $nest_query->have_posts() ) : while ( $nest_query->have_posts() ) : $nest_query->the_post();
         $this_post_id=$post->ID;
         $this_post_title= get_the_title();
         $this_post_content= get_the_excerpt();
         $this_post_permalink= get_permalink(); ?>   
                                 
         <a href="<?php echo $this_post_permalink; ?>"><h1><?php echo $this_post_title; ?></h1></a>
         <div class="the_content"><?php echo $this_post_content; ?></div>
                         
       <?php endwhile;
    elseif ( $another_nest_query->have_posts() ) : while ( $another_nest_query->have_posts() ) : $another_nest_query->the_post();
         $this_post_id=$post->ID;
         $this_post_title= get_the_title();
         $this_post_content= get_the_content();
         $this_post_permalink= get_permalink(); ?>   
                                 
         <a href="<?php echo $this_post_permalink; ?>"><h1><?php echo $this_post_title; ?></h1></a>
         <div class="the_content"><?php echo $this_post_content; ?></div>
                         
       <?php endwhile; 
       endif; 
        }} 
    // Hook into action
    add_action('bbp_theme_after_forum_description','jag_add_last_reply');

    Just put this in your theme’s functions.php and it should do the trick. Haven’t figured out how to spit out multiple posts and replies for each forum yet, but this is all i needed. Good luck.

    #146533
    Robin W
    Moderator

    ok, can you look at

    Codex

    getting started part 1, and see if anything in there helps

    Come back

    #146525
    Anonymous User 7823331
    Inactive

    Hello. I do not want to bother you with basics, however I tied Slovak and French translation and non of them worked.

    I did everything according http://codex.bbpress.org/bbpress-in-your-language/ and no translation appears.

    I downloaded translation files (po and mo) from http://translate.wordpress.org/projects/bbpress/2.5.x (bbpress-2.5.x-sk.mo, bbpress-2.5.x-sk.po), I moved the files to /wp-content/languages/bbpress/ and rename it to bbpress-sk-SK.mo and bbpress-sk-SK.po (I also tried names bbpress-sk.mo and bbpress-sk.po).

    What I did wrong?

    I use WP 3.5.1. with bbpress 2.5.3. I use also polylang module. All translation Slovak, France … works just the translation of bbpress do not.

    Just to identify the problem I tried to install your module to WP 3.8 clear installation (with out polyalang) and same result, that translation do not appears.

    I believe that it works, since you jut few people ha problem wit translation (http://bbpress.org/forums/search/translation/) but I did everything according manual and it does not work for me.

    Thank you.

    #146521
    gianjj
    Participant

    Dear Stephen great work! 😉

    I think the last “basic” information for this great converter is “User status”
    we can find it in a snitz table named FORUM_MEMBERS => M_STATUS
    M_STATUS field have’s two value: 1=unlocked | 0=locked

    NB: also when a user was removed / delete, will stay in the DB, with this two condition:
    M_STATUS => 0
    M_NAME => n/a

    Brent Brooks
    Participant

    Hey Guys!

    I am new to using BBpress. I have been learning a little bit each day and you guys rock!

    My theme is DIVI from elegant themes.

    Here is the start of my open forum:
    http://blankstageproductions.com/forums/forum/bsp/

    When I went to see how the forum looked on my smartphone it looked odd. All the words are bunched up on the RIGHT side of the screen making it difficult to read. Is there a plugin or some CSS coded I can drop in? I have done several searches but may not be looking in the right place for this.

    For CSS I have learned to drop in code using the ePanel in the theme. I found a thread here with code, copied it in and the code took pretty well. I still have so much to learn in terms of CSS and how to change it but figure as long as the ePanel works I should be good.

    #146518
    Stephen Edgar
    Keymaster

    dear Stephen don’t be angry …english is not my language

    Do not worry about that, I understand you fine 🙂

    Edit: Your MySQL is Excellent 😉

    Forums and Topic status = Done (F_TOPICS & F_COUNT)

    Forum Topics and Replies Counts = Done (T_REPLIES)

    Last Reply Date = Done (T_LAST_POST)

    Due to limitations with the importer configuration we can’t include the FORUM_TOTALS or FORUM_CATEGORY tables. You will need to manually reassign your your forum categories after importing, usually there is only a small number of these so this shouldn’t be much of an issue. The ‘Total’ Counts’ are also not actually needed, we do this slightly different and are recalculated by bbPress after the import has finished with the ‘Repair Tools’.

    Edit: After the import has finished we actually recount all the ‘counts’ so these are not very important to the import, they kind of just help a few things on the way.

    #146507
    gianjj
    Participant

    To know which Forum or Topic are open and permit to receive new Topic reply, we need this fields

    Forum area
    FORUM_FORUM => F_STATUS 1=open | 0=close

    Single Topic
    FORUM_TOPICS => T_STATUS 1=open | 0=close

    ===========

    To know the categories we need to query the table FORUM_CATEGORYwhere we have

    CAT_ID Unique ID used to join in FORUM_FORUM => CAT_ID table
    CAT_NAME as is …the name
    CAT_STATUS need a mention this field, Category locked = 0 | Category Open = 1

    Ex of query select for all category and related forum

    SELECT FORUM_CATEGORY.CAT_ID, FORUM_CATEGORY.CAT_NAME, FORUM_FORUM.FORUM_ID, FORUM_FORUM.F_SUBJECT
    FROM FORUM_CATEGORY LEFT OUTER JOIN
    FORUM_FORUM ON FORUM_CATEGORY.CAT_ID = FORUM_FORUM.CAT_ID
    GROUP BY FORUM_CATEGORY.CAT_ID, FORUM_CATEGORY.CAT_NAME, FORUM_FORUM.FORUM_ID, FORUM_FORUM.F_SUBJECT

    ===========

    #146506
    gianjj
    Participant

    dear Stephen don’t be angry …english is not my language 😛
    ..however…

    FORUM_FORUM => F_TOPICS
    This information is refer to all topics (Only Topic) in specific forum ex: “Forum_name => Total Number of topic”

    FORUM_FORUM => F_COUNT
    This information is refer of all replies (Only Reply) in specific forum ex: “Forum_name => Total Number of replis”

    I think a sum of this two information give us a total like here, ex: “Troubleshooting => 30,051”

    ================

    In this Table FORUM_TOTALS, Snitz save information of whole BB, a sum of all replies and all topics
    FORUM_TOTALS => T_COUNT whole topic
    FORUM_TOTALS => P_COUNT whole replies

    ================

    About FORUM_TOPICS => T_REPLIES
    is this field Snitz save number of replies relate to single topic ex this one:
    “Documented import from snitz access database” > “18 replies”

    ================

    with minor importance, also stored in this table FORUM_TOPICS we have

    T_LAST_POST_AUTHOR ID value of last member have posted reply
    ex: Last reply from: Stephen Edgar

    T_LAST_POST data value of last reply added (same format yyyymmddhhmmss)
    ex: Last activity: 5 hours, 57 minutes ago

    T_LAST_POST_REPLY_ID ID value of last reply added actually used for link in email (?)
    ex: Post Link: https://bbpress.org/forums/topic/documented-import-from-snitz-access-database/#post-146492

    #146503
    Robin W
    Moderator

    no plugin, but this page shows how to add them using code

    (I haven’t quite finished it, but it should work!)

    Custom Capabilities

    #146498
    Stephen Edgar
    Keymaster

    OK, try this instead, put this code in the bbpress.php file instead:

    
    <?php
    /**
     * bbPress wrapper template.
     */
    
    get_header(); ?>
    
    <?php while( have_posts() ): the_post(); ?>
    
    	<?php the_content(); ?>
    
    <?php endwhile; ?>
    
    <?php get_footer(); ?>
    
    #146493
    Stephen Edgar
    Keymaster

    Ah…. I know why, apologies for saying not cool 😉

    Make a copy of your page.php file and save it as bbpress.php in your themes folder (you can use page-sidebar.php if you prefer) and then bbPress will ‘wrap’ all of it’s pages in that template for you.

    #146492
    Stephen Edgar
    Keymaster

    There are actually a couple more fields that can be added that I just realized are not in the Example.php file (which I will add)

    Forum type – Is this a forum or category?

    
    		// Forum type (Category = 0 or Forum = 1, Stored in postmeta)
    		$this->field_map[] = array(
    			'from_tablename'  => 'forums_table',
    			'from_fieldname'  => 'the_forum_type',
    			'to_type'         => 'forum',
    			'to_fieldname'    => '_bbp_forum_type',
    			'callback_method' => 'callback_forum_type'
    		);
    

    Forum status, can new topics be created in the forum?

    
    		// Forum status (Unlocked = 0 or Locked = 1, Stored in postmeta)
    		$this->field_map[] = array(
    			'from_tablename'  => 'forums_table',
    			'from_fieldname'  => 'the_forum_status',
    			'to_type'         => 'forum',
    			'to_fieldname'    => '_bbp_status',
    			'callback_method' => 'callback_forum_status'
    		);
    

    Topic status – Can new replies be created for this topic?

    
    
    		// Topic status (Open or Closed)
    		$this->field_map[] = array(
    			'from_tablename'  => 'topics_table',
    			'from_fieldname'  => 'the_topic_status',
    			'to_type'         => 'topic',
    			'to_fieldname'    => 'post_status',
    			'callback_method' => 'callback_topic_status'
    		);
    
    #146491
    Stephen Edgar
    Keymaster

    Firstly I only included the fields Robin had supplied, I do not have a copy of Snitz to test either. So I commented out but didn’t remove any of the code so that it would stand out and you could update any of these as needed which you have done.

    The forum ‘counts’ I think you may have incorrect in your post above:
    * _bbp_topic_count – The number of topics that are ‘publicly’ visible
    * _bbp_reply_count – The number of replies that are ‘publicly’ visible
    * _bbp_total_topic_count – The total number of topics (includes topics that are are unapproved or hidden)
    * _bbp_total_reply_count – The total number of replies (includes replies that are are unapproved or hidden)

    A clearer explanation of each of these would be helpful and also are each of these fields in the FORUM_FORUM database table:
    * F_TOPICS
    * F_COUNT
    * T_COUNT
    * P_COUNT

    The topic ‘counts’ is the same:
    * _bbp_reply_count – The number of replies that are ‘publicly’ visible
    * _bbp_total_reply_count – The total number of replies (includes replies that are are unapproved or hidden)

    A clearer explanation of T_REPLIES would be helpful and is this fields in the FORUM_TOPICS database table?

    Whilst you answer those I’ll add Topic Author IP, Stickies and Member Status 🙂

    #146487
    gianjj
    Participant

    I forgot this, I’m migrating from Snitz Forums 2000 Version 3.4.06 🙂
    Can find this information on Table: FORUM_CONFIG_NEW

    #146486
    Stephen Edgar
    Keymaster

    Here is our ‘Official’ stance on the ‘Unread’ feature/functionality:

    https://bbpress.trac.wordpress.org/ticket/1937

    The primary issue is performance, we have not seen a plugin that will work well for larger sites, if we implement this as a feature it must work for everyone who uses bbPress.

    I just updated the list of ‘Unread’ type plugins I know of here:

    Feature Plugins Tracking

    #146485
    gianjj
    Participant

    Member status
    1 = Active
    0 = No Active

    		// User status.
    		$this->field_map[] = array(
    			'from_tablename' => 'FORUM_MEMBERS',
    			'from_fieldname' => 'M_STATUS',
    			'to_type'        => 'user',
    			'to_fieldname'   => 'user_status'
    		);
    #146484
    gianjj
    Participant

    Stiky Status
    1 = Stycky
    0 = No Sticky

    		// Sticky status (Stored in postmeta))
    		$this->field_map[] = array(
    			'from_tablename'  => 'FORUM_TOPICS',
    			'from_fieldname'  => 'T_STICKY',
    			'to_type'         => 'topic',
    			'to_fieldname'    => '_bbp_old_sticky_status',
    			'callback_method' => 'callback_sticky_status'
    		);
    #146483
    gianjj
    Participant

    really many thanks for your help….

    On first look I see comments block of topic and reply count not supported in snitz… but is a mistake….. (is it ?)

    		// Forum topic count (Stored in postmeta)
    		$this->field_map[] = array(
    			'from_tablename' => 'FORUM_FORUM',
    			'from_fieldname' => 'F_TOPICS',
    			'to_type'        => 'forum',
    			'to_fieldname'   => '_bbp_topic_count'
    		);
     
    		// Forum reply count (Stored in postmeta)
    		$this->field_map[] = array(
    			'from_tablename' => 'FORUM_FORUM',
    			'from_fieldname' => 'F_COUNT',
    			'to_type'        => 'forum',
    			'to_fieldname'   => '_bbp_reply_count'
    		);
     
    		// Forum total topic count (Stored in postmeta)
    		$this->field_map[] = array(
    			'from_tablename' => 'FORUM_TOTALS',
    			'from_fieldname' => 'T_COUNT',
    			'to_type'        => 'forum',
    			'to_fieldname'   => '_bbp_total_topic_count'
    		);
     
    		// Forum total reply count (Stored in postmeta)
    		$this->field_map[] = array(
    			'from_tablename' => 'FORUM_TOTALS',
    			'from_fieldname' => 'P_COUNT',
    			'to_type'        => 'forum',
    			'to_fieldname'   => '_bbp_total_reply_count'
    		);

    And I’m Not sure what the difference is from this two information….. but there is a total replies per topic

    		// Topic reply count (Stored in postmeta)
    		$this->field_map[] = array(
    			'from_tablename'  => 'FORUM_TOPICS',
    			'from_fieldname'  => 'T_REPLIES',
    			'to_type'         => 'topic',
    			'to_fieldname'    => '_bbp_reply_count',
    			'callback_method' => 'callback_topic_reply_count'
    		);
     
    		// Topic total reply count (Stored in postmeta)
    		$this->field_map[] = array(
    			'from_tablename'  => 'FORUM_TOPICS',
    			'from_fieldname'  => 'T_REPLIES',
    			'to_type'         => 'topic',
    			'to_fieldname'    => '_bbp_total_reply_count',
    			'callback_method' => 'callback_topic_reply_count'
    		);

    There is also this 🙂

    		// Topic author ip (Stored in postmeta)
    		$this->field_map[] = array(
    			'from_tablename'  => 'FORUM_TOPICS',
    			'from_fieldname'  => 'T_IP',
    			'to_type'         => 'topic',
    			'to_fieldname'    => '_bbp_author_ip'
    		);

    This one is for replies

    FORUM_REPLY > R_IP

    tnks
    J

    Stephen Edgar
    Keymaster

    1) An easy WYSIWYG editor in bbpress for normal users(frontend).

    You can enable the TinyMCE Visual Editor with instructions shown here:

    Enable Visual Editor

    2) With an image “upload” feature, but is not working like an attachment like “GD bbPress Attachments”.

    I’m only aware of the “GD bbPress Attachments” plugin that offers this for bbPress, you should be asking in their support forums for any issues relating to why this plugin doesn’t work for you.

    3) All the uploaded images will be separated by folder(user name or individual name for an user).

    bbPress does NOT support attachments or media uploads ‘out of the box’
    I would also suggest you also contact the “GD bbPress Attachments” support forum to request any enhancements you would like to see in the plugin.

    #146481
    Stephen Edgar
    Keymaster

    Set WP_DEBUG to false define('WP_DEBUG', false); in your wp-config.php file, this is a known issue.

    More info on this:

    https://bbpress.trac.wordpress.org/ticket/2309 https://core.trac.wordpress.org/ticket/24169

    Stephen Edgar
    Keymaster

    If you only have a few forums you could design a page with each forum title and below each forum title use the following shortcode [bbp-single-forum id=$forum_id]

    e.g.

    
    My Forums Page
    
    My First Forum
    [bbp-single-forum id=123]
    My Second Forum
    [bbp-single-forum id=456]
    My Third Forum
    [bbp-single-forum id=789]
    
    #146477
    Stephen Edgar
    Keymaster

    bbPress doesn’t actually support the use of signatures ‘out of the box’.

    What we can do though is still import that data and store it in the wp_usermeta table, then if you do add a plugin that supports signatures in bbPress you can then copy that data (Using phpMyAdmin for example) from your imported database to however that plugin supports signatures.

    Simply add this field map:

    
    // User Signature (Stored in usermeta)
    $this->field_map[] = array(
    	'from_tablename'  => 'FORUM_MEMBERS',
    	'from_fieldname'  => 'M_SIG',
    	'to_type'         => 'user',
    	'to_fieldname'    => '_bbp_snitz_user_sig'
    );
    

    Thus once you (if you do) add a plugin to support signatures to can then query against the _bbp_snitz_user_sig field directly with MySQL and update your user profile fields.

    I just added the above to the Gist also, you can see the changes via the ‘revisions’ link.

Viewing 25 results - 11,901 through 11,925 (of 32,585 total)
Skip to toolbar