Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 6,301 through 6,325 (of 32,505 total)
  • Author
    Search Results
  • #175574
    Brandon Allen
    Participant

    @newguy Take a look at the bbp_topic_reply_count() and bbp_get_topic_reply_count() functions.

    Brandon Allen
    Participant

    Can’t reproduce using the GeneratePress theme.

    So, I’ll ask again. Are you using any caching plugins? Are you running Memcached/Memcache or Varnish?

    Do you have any plugins in your mu-plugins folder?

    #175568

    In reply to: feeds bug

    Brandon Allen
    Participant

    I’ve tested this, and cannot see where bbPress is translating the <pubDate>. Feeds use mysql2date() to generate the <pubDate>, and they pass false as the translate parameter. It’s been this way since feeds were introduced. Are you or your client using custom feed templates?

    #175564
    Brandon Allen
    Participant

    The importer does save some data under _bbp_converter_* keys in the wp_options table. You can try using those to help. Also, if you turn in use something like this in your wp-config.php file, you’ll get a log of errors in wp-content/debug.log.

    define( 'WP_DEBUG', true ); // turn on debug mode
    if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
    	define( 'WP_DEBUG_LOG', true ); // log to wp-content/debug.log
    }
    #175561
    arnalyse
    Participant

    Hi you guys,

    I’m in the process of importing a rather large vBulletin board. It has around 50’000 topics and more than 3 million posts.

    And I’ve got this one question: does bbPress write out or somehowe save topics, which it couldn’t import? So I can get a glimpse at the problem at hand why a certain vBulletin thread has not been imported?

    A little more background: I’ve done a few test imports, and so far bbPress is doing a terrific job. To keep import time manageable, I modified the vBulletin converter from bbPress to skip replies, which I import with some more complex SQL queries after the bbPress importer has created users and topics.

    Nearly all of my 20’000 users and 50’000 topics get imported, but some vBulletin threads do not shop up with the meta_key named _bbp_old_topic_id. I really tried to spot a pattern there, but had no luck. So I’m hoping there’s a way to gather some more information directly from the bbPress import.

    I’m running bbPress 2.5.9 and WordPress 4.5.2

    #175547
    Robkk
    Moderator

    You can use this kind of custom CSS.

    #bbpress-forums .bbp-forums-list a {
      font-size: 14px;
    }
    
    #175544
    Pascal Casier
    Moderator

    Hi,
    I never checked the embedding, but for uploading files, the 3 products I know of are ‘GD bbpress Attachments’, ‘Image Upload for BBPress’ and ‘bbPress Multi Image Uploader’. Have a look if it would fit your needs. If you use BuddyPress as well, then there is also ‘BuddyPress Forum Editor’.

    For you second question, you could try my bbp-toolkit plugin that has this inside or check https://codex.bbpress.org/layout-and-functionality-examples-you-can-use/#22-show%c2%a0only-1-revision-log-on-topics-and-replies

    Pascal.

    #175534
    tian94
    Participant

    Hi guys my website has a forum called. “Characters and creatures”, at the moment when I post the short code to display the forum the default is “Forum” how can I get it to grab what the forum category is use that as the name instead. Thanks!

    http://postimg.org/image/xa5mh7z9d/

    #175533
    ms52390
    Participant

    I have two brief questions:

    Seen here: Example
    My images wont embed using the img button in the editor. If the code looks like: <img src="http://www.rcgroups.com/forums/showatt.php?attachmentid=9064638">
    It only works in FireFox, but not in Safari and Chrome (didn’t try IE).

    Second question:
    Is there a way to (via code changes I assume) to change how the edit log shows for a post? If you look in the above example, the log is ridiculously long. Is there a way to not show previous edit datetimes and by what user?

    #175532
    kcomphlint
    Participant

    @robkk I tried using your code, but it the topic subscribe links seem to not have any effect on the topic-level subscription links.

    #175528
    Robin W
    Moderator

    in your style.css line 1417 you have

    .reply {
      position: absolute;
      right: 0;
      top: 0;
    }
    

    if you take out the

    position: absolute;
    

    that should fix it. It all works, and you get your sidebar as well

    What it might break elsewhere on your site, you’ll need to check !

    #175524
    Robin W
    Moderator

    this topic describes the issue,

    http://stackoverflow.com/questions/8028957/how-to-fix-headers-already-sent-error-in-php

    but as it is pointing to a bbpress file, and we know that bbpress is not the issue (that code is working in many thousands of installations!

    which tends to suggest option 7 in the link, that some other error is causing this.

    Not sure I can help further !

    #175077
    Schoelje
    Participant

    [Warning]: DO NOT DO THIS ON A PRODUCTION DATABASE!
    My apologies for the caps, but this is really important 😉

    [Assumptions]: Debian/Ubuntu developmachine with phpMyAdmin.

    [Note]: Obviously I haven’t tested all Apache/MySql versions. This was done on SolydK (Debian Jessie). It is also not perfect. So, if somebody can improve on the code. Please, let me know.

    After you’ve setup a development machine, imported the phpBB data and checked that everything is working fine, you still need to convert the phpBB internal links like “viewtopic.php?p=####” or “viewtopic.php?t=####” to the slugs that are being used by bbPress.

    Let’s start!

    1) First you’ll need to install and compile lib_mysqludf_preg.
    Create a bash file install_preg.sh with this content:

    #!/bin/bash
    apt-get update
    apt-get install libpcre3-dev libmysqlclient-dev build-essential libmysqld-dev libpcre3-dev
    wget https://github.com/mysqludf/lib_mysqludf_preg/archive/testing.zip
    unzip testing.zip
    cd lib_mysqludf_preg-testing
    ./configure
    make  install
    make MYSQL="mysql -p" installdb
    service mysql restart

    Make it executable:
    chmod +x install_preg.sh

    And run it:
    ./install_preg.sh

    2) Install the stored procedures.
    In phpMyAdmin, select the database and the SQL tab.
    Paste the following codes separately, creating three stored procedures on your database:

    DELIMITER $$
    CREATE PROCEDURE sp_cleanup_replies()
    BEGIN
      -- declare cursor for reply url change
      DECLARE reply_cursor CURSOR FOR 
      SELECT DISTINCT old_post_id, REPLACE(<code>xkcom_posts</code>.<code>guid</code>, 'http://yoursite.com', '') AS new_url
      FROM (SELECT CAST(CONVERT(PREG_CAPTURE('/#p([0-9]+)/i', <code>post_content</code>, 1) USING UTF8) AS UNSIGNED) AS old_post_id FROM <code>xkcom_posts</code>) AS t1
      INNER JOIN <code>xkcom_postmeta</code> ON <code>xkcom_postmeta</code>.<code>meta_value</code> = old_post_id
      INNER JOIN <code>xkcom_posts</code> ON <code>xkcom_posts</code>.<code>ID</code> = <code>xkcom_postmeta</code>.<code>post_id</code>
      WHERE <code>xkcom_postmeta</code>.<code>meta_key</code> = '_bbp_old_reply_id'
      AND old_post_id IS NOT NULL
      ORDER BY old_post_id DESC;
      
      SELECT 'sp_cleanup_replies: START';
      
      -- Change posts
      OPEN reply_cursor;
      BEGIN
        DECLARE old_reply_id MEDIUMINT;
        DECLARE new_url VARCHAR(255);
        DECLARE search_string VARCHAR(255);
        DECLARE done INT DEFAULT FALSE;
        DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
    
        read_loop: LOOP
          FETCH reply_cursor INTO old_reply_id, new_url;
          IF done THEN
    	LEAVE read_loop;
          END IF;
          
          SET search_string = CONCAT('|[a-z0-9\.\-:\/&=\?\+]+#p', old_reply_id, '|i');
          SELECT CONCAT('sp_cleanup_replies: replace ', search_string, CONCAT(' with ', new_url));
          
          -- Uncomment the following line if you want to test the regexp
          -- SELECT CONVERT(PREG_REPLACE(search_string, new_url, <code>post_content</code>) USING UTF8) FROM <code>xkcom_posts</code> WHERE INSTR(<code>post_content</code>, CONCAT('#p', old_reply_id)) > 0; LEAVE read_loop;
          
          UPDATE <code>xkcom_posts</code> SET <code>post_content</code>= CONVERT(PREG_REPLACE(search_string, new_url, <code>post_content</code>) USING UTF8) WHERE INSTR(<code>post_content</code>, CONCAT('#p', old_reply_id)) > 0;
        
        END LOOP;
      END;
      CLOSE reply_cursor;
      
      SELECT 'sp_cleanup_replies: DONE';
      
    END$$
    DELIMITER ;
    DELIMITER $$
    CREATE PROCEDURE sp_cleanup_topics()
    BEGIN 
      -- declare cursor for topic url change
      DECLARE topic_cursor CURSOR FOR 
      SELECT DISTINCT old_topic_id, REPLACE(<code>xkcom_posts</code>.<code>guid</code>, 'http://yoursite.com', '') AS new_url
      FROM (SELECT CAST(CONVERT(PREG_CAPTURE('/t=([0-9]+)/i', <code>post_content</code>, 1) USING UTF8) AS UNSIGNED) AS old_topic_id FROM <code>xkcom_posts</code>) AS t1
      INNER JOIN <code>xkcom_postmeta</code> ON <code>xkcom_postmeta</code>.<code>meta_value</code> = old_topic_id
      INNER JOIN <code>xkcom_posts</code> ON <code>xkcom_posts</code>.<code>ID</code> = <code>xkcom_postmeta</code>.<code>post_id</code>
      WHERE <code>xkcom_postmeta</code>.<code>meta_key</code> = '_bbp_old_topic_id'
      AND old_topic_id IS NOT NULL
      ORDER BY old_topic_id DESC;
      
      SELECT 'sp_cleanup_topics: START';
      
      -- Change topics
      OPEN topic_cursor;
      BEGIN
        DECLARE old_topic_id MEDIUMINT;
        DECLARE new_url VARCHAR(255);
        DECLARE search_string VARCHAR(255);
        DECLARE done INT DEFAULT FALSE;
        DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
    
        read_loop: LOOP
          FETCH topic_cursor INTO old_topic_id, new_url;
          IF done THEN
    	LEAVE read_loop;
          END IF;
          
          SET search_string = CONCAT('|[a-z0-9\.\-:\/&=\?\+]+t=', old_topic_id, '|i');
          SELECT CONCAT('sp_cleanup_topics: replace ', search_string, CONCAT(' with ', new_url));
          
          -- Uncomment the following line if you want to test the regexp
          -- SELECT CONVERT(PREG_REPLACE(search_string, new_url, <code>post_content</code>) USING UTF8) FROM <code>xkcom_posts</code> WHERE INSTR(<code>post_content</code>, CONCAT('t=', old_topic_id)) > 0; LEAVE read_loop;
          
          UPDATE <code>xkcom_posts</code> SET <code>post_content</code>= CONVERT(PREG_REPLACE(search_string, new_url, <code>post_content</code>) USING UTF8) WHERE INSTR(<code>post_content</code>, CONCAT('t=', old_topic_id)) > 0;
    
        END LOOP;
      END;
      CLOSE topic_cursor;
      
      SELECT 'sp_cleanup_topics: DONE';
      
    END$$
    DELIMITER ;
    DELIMITER $$
    CREATE PROCEDURE sp_cleanup_missing()
    BEGIN
      -- declare cursor for reply url change
      DECLARE missing_cursor CURSOR FOR 
      SELECT DISTINCT old_post_id
      FROM (SELECT CAST(CONVERT(PREG_CAPTURE('|/&[a-z0-9=\+]+#p([0-9]+)|i', <code>post_content</code>, 1) USING UTF8) AS UNSIGNED) AS old_post_id FROM <code>xkcom_posts</code>) AS t1
      WHERE old_post_id IS NOT NULL
      ORDER BY old_post_id DESC;
      
      SELECT 'sp_cleanup_missing: START';
      
      -- Change posts
      OPEN missing_cursor;
      BEGIN
        DECLARE missing_reply_id MEDIUMINT;
        DECLARE search_string VARCHAR(255);
        DECLARE done INT DEFAULT FALSE;
        DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
    
        read_loop: LOOP
          FETCH missing_cursor INTO missing_reply_id;
          IF done THEN
    	LEAVE read_loop;
          END IF;
          
          SET search_string = CONCAT('|[a-z0-9&=\+]+#p', missing_reply_id, '|i');
          SELECT CONCAT('sp_cleanup_missing: remove ', search_string);
          
          -- Uncomment the following line if you want to test the regexp
          -- SELECT CONVERT(PREG_REPLACE(search_string, '#', <code>post_content</code>) USING UTF8) FROM <code>xkcom_posts</code> WHERE INSTR(<code>post_content</code>, CONCAT('#p', missing_reply_id)) > 0; LEAVE read_loop;
          
          UPDATE <code>xkcom_posts</code> SET <code>post_content</code>= CONVERT(PREG_REPLACE(search_string, '#', <code>post_content</code>) USING UTF8) WHERE INSTR(<code>post_content</code>, CONCAT('#p', missing_reply_id)) > 0;
        
        END LOOP;
      END;
      CLOSE missing_cursor;
      
      SELECT 'sp_cleanup_missing: DONE';
      
    END$$
    DELIMITER ;

    3) Run the stored procedures from terminal.
    It is important that you check some example posts with links that need to change. First the post links like “viewtopic.php?some_parameters#p#####”, then topic links like “viewtopic.php?some_parameters&t=#####” and lastly the links to missing posts are removed.

    mysql -u root -p -e 'CALL sp_cleanup_replies()' my_database

    mysql -u root -p -e 'CALL sp_cleanup_topics()' my_database

    mysql -u root -p -e 'CALL sp_cleanup_missing()' my_database

    Now, check your posts and when you’re happy you can drop the stored procedures:

    DROP PROCEDURE IF EXISTS sp_cleanup_replies;
    DROP PROCEDURE IF EXISTS sp_cleanup_topics;
    DROP PROCEDURE IF EXISTS sp_cleanup_missing;

    Mod note: edited and changed dev site from contributer to yoursite.com

    #175425

    In reply to: bbPress 2.5.9

    Robkk
    Moderator

    @mica123

    I already replied to your topic here about the bbpress.php file in your theme. As for the bbP Default theme package template files in bbPress, there were no changes from 2.5.8 to 2.5.9, 2.5.9 was mainly an update to a security issue involving at-mention functionality.

    In the future when the release of 2.6 happens, you would have to edit some files. It would be quite easy to

    1. compare the new 2.6 templates and compare them to your modified files
    2. make those changes to a copy of the 2.6 templates
    3. test them to see if everything is in working order in a testing environment
    4. update to bbPress 2.6 on your main production site (after taking a backup of course)
    5. and then push the template files to your child theme using FTP

    As for the text editor issue above from the other user, I think they just modified their footer.php file in their theme and accidentally removed <?php wp_footer(); ?>, and then that screwed up all the scripts and styles hooked into the footer.

    #175403
    Robin W
    Moderator

    As author of ‘private groups’ this is quite do-able but would take a bunch of code. The problem is that whilst for those that want this it is seen as critical, the actual demand for this functionality is quite low.

    The core code is really quite straightforward – you just check what permissions a user has on a forum. and go from there.

    Like most plugins, writing the ‘settings page’ is what takes the time – probably a weeks worth of evenings to do this.

    I might get round to this at some stage, but my time has to fit around paid IT work !

    #175402

    In reply to: This Forum Is Empty

    Robin W
    Moderator

    it is in

    bbpress\includes\forums\template.php line 2021

    But the easiest way to change it is to put this into your functions file :

    function change_translate_text( $translated_text ) {
    	$text = 'This forum is empty.' ;
    	if ( $translated_text == $text ) $translated_text = 'new text here' ;
    	return $translated_text;
    }
    add_filter( 'gettext', 'change_translate_text', 20 );
    
    

    and change ‘new text here’ to the wording you want

    #175387
    giobby
    Participant

    After further investigations I’ve found a workaround that should work.

    Just to recap on the error: it seems like several posts are left with the old phpBB poster id rather than using the new wordpress user_id (which really makes me think that somewhere in the converter code a wrong reference has been used).

    The best way to work around the issue is the following (assuming a fresh installation):

    1) before migration
    – check what is the highest user_id in your phpBB installation (e.g.: 6235)
    – insert a dummy row in wp_users with id grater than that (e.g.: 6236, or even better, round it up to 10000). In this way all the converted users will have their IDs starting from a higher value (e.g.: 10001, 10002, …) and it will be easy to spot the posts with wrong author (e.g. post_author < 10000).

    2) launch migration as usual
    3) after migration, create a temporary table that lists all the bbpress posts with wrong author

    /* Get all posts with wrong author and correspondent right author from bbpress translator table */
    create table TMP_ORPHANS as
    select 
    wp_posts.ID, 
    wp_posts.post_author,
    wp_bbp_converter_translator.value_id real_author, 
    IFNULL(wp_posts.post_date, NULL) post_date,
    IFNULL(wp_posts.post_date_gmt, NULL) post_date_gmt,
    wp_posts.post_content, 
    CASE 
    	WHEN wp_posts.post_type = 'reply'
        THEN (SELECT tmposts.post_title from wp_posts as tmposts where tmposts.id = wp_posts.post_parent)
        ELSE wp_posts.post_title
    END post_title, 
    wp_posts.post_excerpt, 
    pescasubac, 
    wp_posts.quea.wp_posts.post_status, 
    wp_posts.comment_status, 
    wp_posts.ping_status, 
    wp_posts.post_password, 
    wp_posts.post_name, 
    wp_posts.to_ping, 
    wp_posts.pinged, 
    IFNULL(wp_posts.post_modified, NULL) post_modified,
    IFNULL(wp_posts.post_modified_gmt, NULL) post_modified_gmt,
    wp_posts.post_content_filtered, 
    wp_posts.post_parent, 
    wp_posts.guid, 
    wp_posts.menu_order, 
    wp_posts.post_type, 
    wp_posts.post_mime_type, 
    wp_posts.comment_count,
    	(	select wp_postmeta.meta_value 
    		from wp_postmeta 
    		where 
    			wp_postmeta.meta_key = '_bbp_author_ip' and 
    			wp_postmeta.post_id = wp_posts.id
    	) user_ip
    from wp_posts 
    left join wp_users on wp_posts.post_author = wp_users.id
    left join wp_bbp_converter_translator on wp_posts.post_author = wp_bbp_converter_translator.meta_value
    where 
    wp_posts.post_type in ('forum', 'reply', 'topic') and
    (wp_users.id is null or 
    wp_users.id = 1) and /* all posts of type forum looks to be assigned to the site admin (id=1 in my case)*/
    wp_bbp_converter_translator.value_type = 'user' and 
    wp_bbp_converter_translator.meta_key = '_bbp_old_user_id';
    
    /* this is to be able to create indexes later */
    ALTER TABLE TMP_ORPHANS modify column post_date datetime default NULL;
    ALTER TABLE TMP_ORPHANS modify column post_date_gmt datetime default NULL;
    ALTER TABLE TMP_ORPHANS modify column post_modified datetime default NULL;
    ALTER TABLE TMP_ORPHANS modify column post_modified_gmt datetime default NULL;
    ALTER TABLE TMP_ORPHANS modify column user_ip varchar(40);
    ALTER TABLE TMP_ORPHANS modify column post_title varchar(255);
    
    /* indexes to speed up access to the table (some are useless) */
    ALTER TABLE TMP_ORPHANS ADD INDEX(post_date);
    ALTER TABLE TMP_ORPHANS ADD INDEX(post_author);
    ALTER TABLE TMP_ORPHANS ADD INDEX(real_author);
    ALTER TABLE TMP_ORPHANS ADD INDEX(user_ip);
    ALTER TABLE TMP_ORPHANS ADD INDEX(post_title);

    4) Now that you’ve got the list of posts with wrong authors, you can update your wp_posts table accordingly

    /* Revert bad authors to good authors */
    UPDATE 
    wp_postsINNER JOIN TMP_ORPHANS 
    ON wp_posts.id = TMP_ORPHANS.id
    set wp_posts.post_author = TMP_ORPHANS.real_author 
    where wp_posts.post_type in ('reply', 'topic') ;

    Final consideration:
    – this workaround seems to be working for me, but of course I don’t assume any responsibility in case it doesn’t work for you. The update trusts the converter table generated by the bbpress forum converter and assumes that a wrong author id matches the original author id of phpBB forum (I executed some checks and it seems like the problem is always the same = phpBB author id rather than new wordpress author id).
    – the update doesn’t fix posts of type ‘forum’ because by default these are assigned to the wordpress site administrator. If you wish to assign them to the original phpBB author, just modify the where condition:
    where wp_posts.post_type in ('forum','reply', 'topic') ;

    message to the developers: I truly believe somewhere in the converter code a wrong reference is used under certain conditions. The pattern of the error is always the same: when the author doesn’t match it’s because the author id of the phpBB forum rather than the new converted author id.


    @netweb

    #175383
    lflier
    Participant

    Here is a straightforward approach to abbreviating the time. Just put it in your functions.php file. You can modify the abbreviations as you wish:

    add_filter( 'bbp_get_time_since', 'abbreviate_time' );
    function abbreviate_time ( $output ) {
        $output = str_replace( 'minutes', 'min', $output );
        $output = str_replace( 'minute', 'min', $output );
        $output = str_replace( 'hours', 'hr', $output );
        $output = str_replace( 'hour', 'hr', $output );
        $output = str_replace( 'weeks', 'wk', $output );
        $output = str_replace( 'week', 'wk', $output );	
        $output = str_replace( 'months', 'mo', $output );
        $output = str_replace( 'month', 'mo', $output );    
        $output = str_replace( 'years', 'yr', $output );
        $output = str_replace( 'year', 'yr', $output );    
        return $output;
    }
    
    #175370

    In reply to: Freshness URLs Broken

    Robin W
    Moderator

    ok, I’ve had a quick look.

    The page number is set by this line

    $reply_page = ceil( (int) bbp_get_reply_position( $reply_id, $topic_id ) / (int) bbp_get_replies_per_page() );

    I suspect that bbp_get_replies_per_page is not the issue, but that bbp_get_reply_position is.

    so this function is as follows :

    function bbp_get_reply_position( $reply_id = 0, $topic_id = 0 ) {
    
    		// Get required data
    		$reply_id       = bbp_get_reply_id( $reply_id );
    		$reply_position = get_post_field( 'menu_order', $reply_id );
    
    		// Reply doesn't have a position so get the raw value
    		if ( empty( $reply_position ) ) {
    			$topic_id = !empty( $topic_id ) ? bbp_get_topic_id( $topic_id ) : bbp_get_reply_topic_id( $reply_id );
    
    			// Post is not the topic
    			if ( $reply_id !== $topic_id ) {
    				$reply_position = bbp_get_reply_position_raw( $reply_id, $topic_id );
    
    				// Update the reply position in the posts table so we'll never have
    				// to hit the DB again.
    				if ( !empty( $reply_position ) ) {
    					bbp_update_reply_position( $reply_id, $reply_position );
    				}
    
    			// Topic's position is always 0
    			} else {
    				$reply_position = 0;
    			}
    		}
    
    		// Bump the position by one if the lead topic is in the replies loop
    		if ( ! bbp_show_lead_topic() )
    			$reply_position++;
    
    		return (int) apply_filters( 'bbp_get_reply_position', $reply_position, $reply_id, $topic_id );
    	}
    

    so given that you seem fine with accessing the database, and hoping you are fine with editing files and uploading these, let’s see what value are being set in this function. I presume you can edit files, and you say you have a ‘safe’ area in which to play.

    so lets start with

    $reply_position = get_post_field( 'menu_order', $reply_id );
    

    which is set on line 1742 of includes/replies/template.php

    Now we can filter and play with this function, but it is probably easier just to edit the file whilst we test – just take a copy of it before so you can restore at the end.

    So I’d add a line after 1742 saying

    update_option( 'encide', $reply_position ) ;
    

    save and upload, and then display a page which works and one that doesn’t and each time you can access wp_options in the database and look for the encide option name.

    That should tell you what it is set to.

    I’d suspect that it is not correct for the faulty ones, and is returning 1 or 0 – hence no pagination.

    Come back and let me know what it says, and we can progress from there.

    Sybre Waaijer
    Participant

    Thanks for confirming Robin!

    As WP_Query::is_search is a public variable, why don’t we simply alter it in real-time within bbPress itself? This will make sure people won’t need an external fix :), and it will leave plugin/theme developers out of question and responsibility.

    jglemza
    Participant

    You can pull this off by hiding the 3rd li. Something like this should do the trick.

    body.page #bbpress-forums li:nth-child(3) {
    	display: none;
    }
    Sybre Waaijer
    Participant

    Hi there!

    As the title suggests, when dumping $wp_query/$query through pre_get_posts, the is_search value is set to true.

    I don’t believe this should be happening, as this can break compatibility with Search specific alterations.

    #175339

    In reply to: Freshness URLs Broken

    timsilva_
    Participant

    @robin-w I do have access to phpmyadmin. I have been looking around, and the only thing that looks fishy is that the “guid” varchar(255) row has my old local environment in the URL instead of my live domain. So it is http://localhost/forum/topic/title/ when it should be http://example.com/forum/topic/title/ – But after I tried to correct that for the post and the postmeta of the thread’s latest reply (in a safe environment) it didn’t seem to fix the problem. I did notice that my old local URL was hardcoded over 220,000 times in my database though, I wonder if this is something that needs to be corrected for each topic/reply.

    I tried to get creative by changing the “Replies Per Page” in wp-admin > Settings > Forums to a different number. That successfully recalculated the correct number of pages required for the non-affected threads (I set it from 15 replies per page to 30 replies per page, so a thread with 10 pages was updated with 5 pages, and the latest reply link updated to point to page 5), but the affected threads still have no “/page/##/” segment in the URL.

    newguy
    Participant

    Right now I am hosting my site locally but here is an example of my code of my paper:

    Title of Paper
    Section 1 of paper:
    Paragraph:
    [bbp-single-topic id=1]

    Section 2 of paper:
    Paragraph:
    [bbp-single-topic id=2]

    etc…

    I want the ability to have the readers comment after every section. But when I created the “BBP Topic” and use the “id” it automatically displays a blank comment(which I do not want). Do you know if this is possible?

    Thank you for your help.

    #175326
    Robin W
    Moderator

    Also I am not sure there is a visitor WordPress role.

    oops… no there isn’t – old code left on my test site !

    and who gets what were just examples 🙂

Viewing 25 results - 6,301 through 6,325 (of 32,505 total)
Skip to toolbar