Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 8,576 through 8,600 (of 32,519 total)
  • Author
    Search Results
  • Stephen Edgar
    Keymaster

    Ok, run ONLY the following 3 repair tools: https://codex.bbpress.org/features/repair-forums/

    * Recalculate the parent topic for each post
    * Recalculate the parent forum for each post
    * Recalculate last activity in each topic and forum

    Do the replies look OK in the backend now?

    If not then run this repair tool:
    * Recalculate the position of each reply

    How about now?

    (The above should repair all the post_meta for you)

    Stephen Edgar
    Keymaster

    Ha… Using bb_ as your table prefix really did throw me 😉

    If you look at lines 59-60 for your topics your selecting the forum_id from the phpbb_topics table and inserting it into post_parent

    https://gist.github.com/anonymous/8d1cb71e69d52ac69f5d#file-gistfile1-sql-L59-L60

    The same needs to happen for replies, so you should be able to get the topic_id that the reply is for and then insert that into the reply post_parent

    https://gist.github.com/anonymous/8d1cb71e69d52ac69f5d#file-gistfile1-sql-L59-L60

    The following should do it, assuming that topic_id is actually in the phpbb_posts_text table.

    
    INSERT INTO
    	bb_posts(post_title,post_excerpt,post_name,post_content,post_type,post_parent)
    	SELECT post_subject, post_id, post_subject, REPLACE (post_text, CONCAT (":", bbcode_uid), ""), 'reply', topic_id FROM phpbb_posts_text;
    
    Robkk
    Moderator

    I’m not really sure you have to worry about the post meta table?? Nevermind it is most likely important for post IDs and such.

    https://codex.wordpress.org/Database_Description#Table:_wp_postmeta

    And as for sql code to check DB for consistency , I do not know what to tell ya there either.

    mmice
    Participant

    Maybe, there’s some SQL code to check my DB for consistency and to fix some relationship problems if they’re present?
    I guess, for such a big number of replies it could be faster, than any php tool, and also more clear, as i’m already working through DB manually.

    Robkk
    Moderator

    @mmice

    bbPress v2 does not have a bb_posts database table , that is in bbPress v1 standalone. Which is what @netweb is referring that you are trying to import into the old v1 version even though your suppose to import to the latest version.

    All of bbPress data is stored inside of the WordPress database tables.

    In this guide I explain it.

    Stored Database Data

    Robkk
    Moderator

    Go through some common troubleshooting steps.

    Troubleshooting

    #163046
    Robkk
    Moderator

    Its custom code to this site.

    There might be some tutorial, I think someone linked to it before on here but I can’t remember where ti was.

    This plugin has something close , but it has no styling.

    https://wordpress.org/plugins/bbpress-info-widgets/

    #163043
    Robkk
    Moderator

    You might need to create a new user role for users to default as and set their capabilities to create replies but not create topics.

    Custom Capabilities

    Stephen Edgar
    Keymaster

    So I edited the post and copied the SQL code to a gist on GitHub:

    https://gist.github.com/anonymous/8d1cb71e69d52ac69f5d

    First, it looks like you are importing the phpBB into bbPress 1.x, bbPress 1.x is not supported anymore.

    Per @robkk post immediately above you should checkout that link to our docs on the codex on importing to bbPress 2.x, and in general look toward using the bbPress 2.x plugin for WordPress https://wordpress.org/plugins/bbpress/

    I’d suggest taking a look at our phPBB v3.x importer and making any change to match the phpBB v1.x database schema changes you would need:
    https://bbpress.trac.wordpress.org/browser/branches/2.5/includes/admin/converters/phpBB.php

    #163031
    stiffmeister12
    Participant

    I am having trouble getting my userpro avitars or profile pictures to be displayed on the bbpress home page and topics page where its says “freshness” or “latest post”. The profile pictures do show up when you go into a topic and reply but not on the home page. I want the little picture next to posters name under “freshness” or “latest post”. What code would i have to change and where can i find it? Im using a custom theme by the way.

    #163027

    In reply to: Bbpress giving errors

    Fryvisuals
    Participant

    You can either change WP_DEBUG to false inside wp-config.php

    OR if you need debugging for development go to /plugins/bbpress/includes/core/sub-actions.php

    function bbp_setup_current_user() {
    	if ( ! did_action( 'after_setup_theme' ) ) {
    		// comment out line below
    		// _doing_it_wrong( __FUNCTION__, __( 'The current user is being initialized without using $wp->init().', 'bbpress' ), '2.3' );
    	}
    
    	do_action( 'bbp_setup_current_user' );
    }
    
    Omar
    Participant

    Hi Robin W, thank you for providing the above code! It is just what I’ve been looking for!

    I have a question. When I was testing, I noticed if I entered invalid login info, there was no redirect or error message, but it did display that in my address bar. What accounts for what happens on login failure?

    Here is a sample that displayed in my browser after login failure:

    Upside

    The site I’m testing on is this one:

    http://www.rashedlightsways.com

    Also, small second question. It happens often that I’m on a site that I *think* I’ve registered on, but haven’t. If someone enters a login that is not correct AND that username doesn’t currently exist, is there a way to redirect to the registration page WITH that username?

    So, for example, I type in username: MyFaveUser pw: 1234, and it doesn’t exist in my user table, so the user is redirected to “Hey, MyFaveUser doesn’t exist, but you can register with it! It’s available!” and then autofill the username field with MyFaveUser and leave the pw field blank?

    I’ve been trying to bridge together new user registration and login in one field, and thought that might be a way to do it.

    Thank you so very much!

    – Omar
    “Let Your Light Shine”

    #163019
    bexinul
    Participant

    Hello,

    I am trying to import my Kunena 3 forum to bbPress when switching from Joomla to WordPress.

    The import always fails with this error:

    
    WordPress database error: [Table 'bcbrainois2.jos_kunena_topics' doesn't exist]
    SELECT convert(kunena_messages.id USING "utf8") AS id,convert(kunena_messages.catid USING "utf8") AS catid,convert(kunena_messages.thread USING "utf8") AS thread,convert(kunena_messages.ip USING "utf8") AS ip,convert(kunena_messages.userid USING "utf8") AS userid,convert(kunena_messages.subject USING "utf8") AS subject,convert(kunena_messages_text.message USING "utf8") AS message,convert(kunena_messages.time USING "utf8") AS time FROM jbcb_kunena_messages AS kunena_messages LEFT JOIN jbcb_kunena_messages_text AS kunena_messages_text ON kunena_messages_text.mesid = kunena_messages.id LEFT JOIN jos_kunena_topics AS kunena_topics ON kunena_messages.thread = kunena_topics.id WHERE kunena_messages.parent != 0 LIMIT 0, 100
    

    My table prefix is jbcb_ I don’t know why the importer tries to import a jos_ table which doesn’t exist…

    And the result of the import is a forum without any post, just the topics are imported.

    Can someone help me on that one?

    Thanks a lot,

    Nicolas

    #163017
    Robin W
    Moderator

    I’d go with what you did, but put it in a child theme. That way it will be unaffected by changes to plugins or themes.

    Functions files and child themes – explained !

    #163016
    flippyr
    Participant

    Thanks guys, I had actually found a workaround, i copied page.php and renamed it to be page-slug.php and put an if statement at the beginning as below

    if ( !is_user_logged_in() ){
        header("Location: http:homepage");
    }else{
        // Show content
        the_content();

    now comes the question, which method is better? in terms of maintenance going forward i mean

    #163015

    In reply to: SMF Import to bbPress

    Mei Ling
    Participant

    Yes bbcode. We use “Aeva media”

    #163014
    ns
    Participant

    I checked function.php, and I found the cause.

    function.php had below code.

    add_filter('bbp_before_has_replies_parse_args', 'change_reply_order');
    function change_reply_order() {
    	$args['order'] = 'DESC';
    	return $args;
    }

    So I commented this part out and then I confirmed it works property.

    Thank you for replying and helping me.

    #163012
    ns
    Participant

    Thank you for replying.

    Yes, that’s right.
    The link of https://bbpress.org/forums/profile/naoyoshi/replies/ shows, user-replies-created.php is made by bbp_user_replies_created_url() function.
    The default file of user-detail.php has this function and I don’t change.
    The parameter of this function is blank.

    When the page like https://bbpress.org/forums/profile/naoyoshi/replies/ shows, user-replies-created.php is executed.
    As the core processes of bbPress, does it really retrieve only specific user’s replies from database?
    This is what I don’t understand now and the current question.

    I checked php files user-replies-created.php, loop-replies.php, and loop-single-reply.php, and interface of functions which used in these php files.
    I haven’t almost changed codes in these php files, the content of these php files is nearly the original.
    As far as I checked, there are no parameters which can retrieve only specific user’s replies in functions.
    In this bbPress forums, user interface part is customized from the original file, though, why can it show only specific user’s replies data correctly?

    I think I might have to add or change some codes in some of php files…, I don’t know it’s true.

    #162999

    In reply to: Visual Editor

    Robkk
    Moderator

    @galador

    Please go through some of the troubleshooting steps listed here.

    Troubleshooting

    and What schmoo and I were saying is that you can use both of the plugins we mentioned to extend/show the visual editor.

    to display the visual editor make sure you have configured the setting in settings > forums in the WordPress back-end.

    #162998

    In reply to: Allow HTML from users

    Robkk
    Moderator

    @atsouf

    just use autoembed links in settings > forums

    when the user places the link in the reply content area that link will automatically become a video when posted.

    https://codex.bbpress.org/getting-started/embeds/

    #162997
    Robkk
    Moderator

    @pamhsims

    Use this code instead for what you want

    //custom text for subscribe links
    function rkk_forum_subscribe_link() {
      $args['subscribe'] = esc_html__( 'Subscribe to this forum',   'rkk' );
      $args['unsubscribe'] = esc_html__( 'Unsubscribe to this forum',   'rkk' );
      return $args;
    }
     add_filter('bbp_before_get_forum_subscribe_link_parse_args', 'rkk_forum_subscribe_link' );
    //custom text for topic subscribe links
    function rkk_topic_subscribe_link() {
      $args['subscribe'] = esc_html__( 'Subscribe to this topic',   'rkk' );
      $args['unsubscribe'] = esc_html__( 'Unsubscribe to this topic',   'rkk' );
      return $args;
    }
     add_filter('bbp_before_get_topic_subscribe_link_parse_args', 'rkk_topic_subscribe_link' );
    #162996
    Robkk
    Moderator

    @billreefer

    If you do write a guide or start to write a guide.

    You can email me your ideas , or if you want to start writing it out soon you can write in a Google Doc Spreadsheet and email it to me , so I could put it in the codex.

    Email anything you want in the COdex, you find my email in this link.

    Contact

    #162995

    In reply to: Topic excepts

    Robkk
    Moderator

    @hemant-ahir

    I think if you are using the bbPress login shortcode this is the hook if you need a hook

    bbp_redirect_login

    #162994

    In reply to: SMF Import to bbPress

    Robkk
    Moderator

    how is it embedded?? with bbcodes??

    #162993
    Robkk
    Moderator

    Please go through some troubleshooting steps here.

    Troubleshooting

    THis guide will be improved in the next few days.

    Also you most likely will not need to do the advanced troubleshooting.

Viewing 25 results - 8,576 through 8,600 (of 32,519 total)
Skip to toolbar