Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 7,026 through 7,050 (of 32,519 total)
  • Author
    Search Results
  • #171190
    Robin W
    Moderator
    #171168
    Pascal Casier
    Moderator

    Hi,

    Check out the bbpress shortcuts on https://codex.bbpress.org/features/shortcodes/
    Under the ‘Topics’ header you will probably find what you need.

    Pascal.

    #171167
    Robin W
    Moderator
    #171160
    Andrew Tibbetts
    Participant

    Ooops.
    I have been jumping back and forth testing forum home and topics as they both don’t work and I copied the wrong line I was using.
    So, correction:

    …when i put echo is_singular( bbp_get_topic_post_type() ) ? 'yes' : 'no'; exit; on line 255 of bbpress/includes/common/template.php inside bbp_is_single_topic(), I get a white page that says “no”.

    I get the same “no” doing the forum check in the forum function while on the forum page.

    #171159
    Stephen Edgar
    Keymaster

    Your checking for is_singular() on the forum post type rather than the topic post type above in your code above.

    #171157
    Andrew Tibbetts
    Participant

    Thanks, Stephen.
    Ok, so, Query Monitor is telling me that topic pages are returning true on a bunch of is_s:

    is_page()
    is_singular()
    is_bbpress()
    bbp_is_single_topic()
    is_buddypress()
    bp_is_group()
    bp_is_group_forum_topic()
    bp_is_group_single()
    bp_is_groups_component()
    bp_is_single_item()

    But, when i put echo is_singular( bbp_get_forum_post_type() ) ? 'yes' : 'no'; exit; on line 255 of bbpress/includes/common/template.php inside bbp_is_single_topic(), I get a white page that says “no”.

    #171151
    Stephen Edgar
    Keymaster

    @andrewgtibbetts can you install the following two plugins and take another look?

    https://wordpress.org/plugins/query-monitor/
    https://wordpress.org/plugins/query-monitor-bbpress-buddypress-conditionals/

    Here’s what I see, is_single(), is_singular() and bbp_is_single_topic() all return true

    BbPress Topic JS

    #171150
    Stephen Edgar
    Keymaster

    @ dots Nice size forum, heres a few things that I hope will help:

    Firstly, can you try by using bbPress 2.6-alpha, you can find it here https://bbpress.org/download/

    1) Sometimes scripts are automatically stopped and script not start automatically.

    Sometimes things timeout, a workaround for this is to open another tab in your browser to example.com/wp-admin and refresh it occasionally

    2) Currently, lots of data is still pending to import in BBPress but the script is not running and in tools bottom section I can see only “Starting Conversion” and loader.

    This is similar to 1), by refreshing you should in another browser tab this should keep that issue at bay, this particular issue is usually when PHP drops the MySQL connection and needs refreshing to update the connection between WordPress and the database.

    3) I have noticed in the tool having the duplication issue you can see above in Xenforo only 83,813 topics but BBPress tool imported 83,867 records. So 54 records are duplicates. so this issue resolved using BBPress repair forum tabs?

    It could be duplicates, though I’ve only ever tested 3 or 4 Xenforo forums with bbPress, potentially using the repair tools might fix this though without some more information here it will be hard to take a guess. If you can supply a copy of a couple of duplicates I can take a closer look as to the reason why.

    4) BBPress import tool taking random data from the Xenforo database. I have noticed when I have started the script first the users come from the Xenforo. But unfortunately, the users are skipped and the tool has started to import the topic. So, I am a bit confused here BBpress import tool can complete import all the users, topic, forums, and replies successfully? you can see above my total Xenforo user is 1,59,679 and BBPress tool has imported only 94,600. and the now script has started to import replies.

    Again, it should do all of this correctly, though testing with bbPress 2.6-alpha per above will hopefully fix many, or most of the issues you are having, can you try using 2.6-alpha and let me know how that goes for you please 🙂

    Also a couple more tips in our docs:

    Import Troubleshooting

    mauryg
    Participant

    @membershipsite101
    Don’t know if we are talking about the same problem. It seems like your site is using a different HEADER template for the Welcome page. Also noted that the Welcome page is a subpage of the HELP page, not of the FORUMS page. Are you using bbpress shortcodes for this? You might want to check the bbpress settings page and see if the slugs are set correctly.
    But anyway, I looked at your site and I noticed that the bbpress.css file was being loaded from the bbpress plugin directory, not from the theme directory.
    Did you in fact copy the template.php file you want to use into the theme directory and rename it bbpress.php? I also strongly suggest copying the bbpress.css file into the theme directory as well so you can make changes to the bbpress styling easily.
    Hope this helps.
    Maury

    #171131
    dot
    Participant

    When BBPress is turned off, the error stops. When it is turned back on, the error starts again.

    Also, the BBPress rewrite rules, especially the root rewrite stub, are the only place in the entire code base that I can find the rewrite rule RegEx fragment.

    #171126
    Pelowtz
    Participant

    I am having the same problem as @aaronos.

    The bbPress page with the shortcode has the URL /forums, with the page title of “Forum”
    The forum root slug is set to “forum” in the forum settings
    The single forum slugs is set to “forums”
    The yoast SEO breadcrumb I am using shows home>forum on the forum index page (/forums)
    When I click into a topic the URL changes to /forum/forums/[FORUM TITLE]
    On the /forum/forums URLS the Yoast breadcrumb changes to “/forums” but it actually links to “/forum”

    NOTE: /forum is a page that does not technically exist (i.e. I did not create a page with this URL) yet some random topics show up on this page.

    I have tried every iteration of changing the UTL of the index page, the page name, and the two settings in bbPress with no success.

    I have to set the forum index URL to /forums for my forum index page to look properly, but essentially whenever I navigate to any post or topic the breadcrumb breaks.

    Thanks for any guidance and advice.

    http://vapementors.com/forums/

    #171114
    sr3
    Participant

    I am trying to remove the author’s real name and only display the @ username.

    With the code I found here, I could add the username below the name. But how can I remove the real name and only display the @ username?

    #171108
    Manuel Fritsch
    Participant

    @Johnnieasear: To me, MS is the future of WP. Why have one site, if I can have at least one more for testing purposes? That was what I thought about before setting up my network. Of course, that means mostly styling tests, since plugins are integrated with the network and some plugins can only be (de-)activated on network level, so testing is limited. But still.

    Do you refer to this Guide? “Extensive” would too far-fetched a word for that, in my opinion. It’s more of a brief overview. Useful, of course. 🙂

    #171101
    dot
    Participant

    I am trying to debug an intermittent 404 issue that has been traced to BBPress. I’ve read several other reports about intermittent 404s and BBPress, but none of them are quite applicable to my situation, so I’m creating a new support topic.

    The main page of my website will intermittently load with a 404.The intermittent access issue appears to last between 10 seconds and 3 minutes at a time. When this happens, it’s down for everyone trying to access the site (confirmed while on the phone with hosting service tech support). Other pages on the site appear to load correctly during this time window. Hitting refresh will eventually successfully reload the page correctly.

    I am using Query Monitor to examine the rewrite rules. Here are the results when the page is loading incorrectly:

    Request	account-2/conscious-business-design-dashboard
    Matched Rule	[^/]+/([^/]+)/?$
    Matched Query	attachment=conscious-business-design-dashboard
    Query String	attachment=conscious-business-design-dashboard
    Query Vars	attachment	conscious-business-design-dashboard
    comments_per_page	50
    name	conscious-business-design-dashboard
    order	DESC
    posts_per_page	10
    update_post_meta_cache	1
    update_post_term_cache	1

    Here are the results when the page is loading correctly:

    Request	account-2/conscious-business-design-dashboard
    Matched Rule	(.?.+?)(?:/([0-9]+))?/?$
    Matched Query	pagename=account-2%2Fconscious-business-design-dashboard
    &page=
    Query String	pagename=account-2%2Fconscious-business-design-dashboard
    Query Vars	comments_per_page	50
    name	conscious-business-design-dashboard
    order	DESC
    pagename	conscious-business-design-dashboard
    posts_per_page	10
    update_post_meta_cache	1
    update_post_term_cache	1
    Queried Object	
    Single Page: #225 (WP_Post)

    Here is the most relevant query that is being run during the 404:

    	SELECT wp_posts.*
    FROM wp_posts 
    WHERE 1=1 
    AND wp_posts.post_name = 'conscious-business-design-dashboard'
    AND wp_posts.post_type = 'attachment' 
    ORDER BY wp_posts.post_date DESC 

    Here is the query run when the page successfully loads:

    SELECT wp_posts.*
    FROM wp_posts 
    WHERE 1=1 
    AND (wp_posts.ID = '225')
    AND wp_posts.post_type = 'page' 
    ORDER BY wp_posts.post_date DESC 

    When I look at the BBPress code, I can identify the rewrite rules here:

    	// Rewrite rule matches used repeatedly below
    		$root_rule    = '/([^/]+)/?$';
    		$feed_rule    = '/([^/]+)/' . $feed_slug  . '/?$';
    		$edit_rule    = '/([^/]+)/' . $edit_slug  . '/?$';
    		$paged_rule   = '/([^/]+)/' . $paged_slug . '/?([0-9]{1,})/?$';

    However, all slugs are correctly set in the database, and I can’t figure out how they might be getting corrupted.

    Any suggestions for further troubleshooting?

    #171100
    Andrew Tibbetts
    Participant

    I am trying to figure out why bbPress (inside Buddypress) isn’t enqueueing topic.js on topic pages so that favoriting and subscribing buttons ajax instead of refresh (which they currently do).

    In enqueue_scripts(), bbp_is_single_topic() is being checked before allowing the js files to be enqueued.

    In the bbp_is_single_topic() function declaration, is_singular( bbp_get_topic_post_type() ) || bbp_is_query_name( 'bbp_single_topic' ) must be satisfied to return true.

    Issue: is_singular( bbp_get_topic_post_type() ) returns false (also is_singluar('topic') and just is_singluar() — also, no matter where I go in bbpress, is_singluar() returns false).
    Tangential: echoing bbp_get_query_name() returns nothing.

    Any ideas?

    NB: This was tested on fresh Twenty Twelve with all non-essential plugins disabled and bp-custom.php emptied.

    WP: 4.4.1
    BP: 2.4.3
    BBP: 2.5.8

    #171084
    Pascal Casier
    Moderator

    Error, debugging and solution, all in 1 go !
    Will have a look for the codex, thanks.
    Pascal.

    Stephen Edgar
    Keymaster

    There are no themes or plugins that I know of that support _bbp_old_user_id, bbPress offers that and exposes it for developers to use as they will.

    I pretty much cannot see any use case where displaying the old vBulletin user ID would be required, it really would only be needed to map previous vBulletin extensions and plugins to bbPress after migration.

    #171073

    In reply to: adding forum to a page

    Robin W
    Moderator

    just put

    [bbp-forum-index]

    in to the page

    other shortcodes that might interest you

    https://codex.bbpress.org/features/shortcodes/

    Manuel Fritsch
    Participant

    Hi,

    in the Codex, it says that the automatic loading of locales should begin when they are at 100%. However, the German locale has not been updated in my installation since three days, that is the current date of the files in my webspace. Even though I approved strings in Glotpress every day since then.

    Do you know if there is some “push” mechanism? Because WP-Members always gets updated at night (UTC) after I edited some strings. Or maybe bbpress needs to pull translations, but it does not do so, sufficiently?

    ~Manuel

    _az_
    Participant

    Hi,

    i was doing some performance analysis with the Xdebug and Xhprof profiling tools and noticed that many of my DB queries/per request are something similar to:

    SELECT option_value FROM wp_options WHERE option_name = '_bbp_enable_subscriptions' LIMIT 1

    In Trac Ticket 1550 it is mentioned, that the WordPress Object Cache is used, but this “error_log” (in wp-db.php Version 4.4.1 line 1809) tells me a different story:

    
    	private function _do_query( $query ) {
    		if ( defined( 'SAVEQUERIES' ) && SAVEQUERIES ) {
    			$this->timer_start();
    		}
    
    		if ( $this->use_mysqli ) {
    			error_log($query . "\n", 3, '/tmp/wpdb.log');
    			$this->result = @mysqli_query( $this->dbh, $query );
    		} else {
    			$this->result = @mysql_query( $query, $this->dbh );
    		}
    		$this->num_queries++;
    
    		if ( defined( 'SAVEQUERIES' ) && SAVEQUERIES ) {
    			$this->queries[] = array( $query, $this->timer_stop(), $this->get_caller() );
    		}
    	}

    Am i missing some Cache Settings here?

    I am using WordPress 4.4.1 with bbPress 2.5.8

    #171063
    Manuel Fritsch
    Participant

    I wanted to change two titles, so I wrote this (had to take the translated strings though, so this fix will fail again when roles are renamed in bbress or our locale):

    function my_custom_roles( $role, $user_id ) {
    	if( $role == 'Teilnehmer' )
    		return ' ';
    
    	return $role;
    	
    }
    
    add_filter( 'bbp_get_user_display_role', 'my_custom_roles', 10, 2 );
    
    function my_custom_roles2( $role, $user_id ) {
    	if( $role == 'Keymaster' )
    		return 'Administrator';
    
    	return $role;
    }
    
    add_filter( 'bbp_get_user_display_role', 'my_custom_roles2', 10, 2 );
    #171061
    Manuel Fritsch
    Participant

    It doesn’t say anything in the Codex about “don’t you dare activate on network once you activated on subsite only, you will never again be able to activate on subsite only”. I looked.

    However, I am not 100% sure that I first activated on subsite only. Maybe I only thought so, and am now back to original configuration: network yes, subsite no.

    #171046

    In reply to: vbulletin 3.x import

    Stephen Edgar
    Keymaster

    Can try the other one, i.e. vBulletin please? Theres a possibility I’ve messed things up here 🙁

    #171038

    In reply to: vbulletin 3.x import

    Stephen Edgar
    Keymaster

    Be careful when you post code here on the forums, next time you’ll want to make sure you do not post passwords 😉 (I’ve removed them)

    If your using the 2.6 alpha (you should) are you selecting vBulletin or vBulletin3 from the dropdown?

    #171030

    In reply to: vbulletin 3.x import

    blandow
    Participant

    So it didn’t work…
    (The results I get when I start the import is no topics to import, no threads to import, etc)

    This is my config.php file:

    <?php
    /*======================================================================*\
    || #################################################################### ||
    || # vBulletin 3.7.1 Patch Level 1 – Licence Number REDACTED
    || # —————————————————————- # ||
    || # All PHP code in this file is ©2000-2008 Jelsoft Enterprises Ltd. # ||
    || # This file may not be redistributed in whole or significant part. # ||
    || # —————- VBULLETIN IS NOT FREE SOFTWARE —————- # ||
    || # http://www.vbulletin.com | http://www.vbulletin.com/license.html # ||
    || #################################################################### ||
    \*======================================================================*/

    /*——————————————————-*\
    | ****** NOTE REGARDING THE VARIABLES IN THIS FILE ****** |
    +———————————————————+
    | If you get any errors while attempting to connect to |
    | MySQL, you will need to email your webhost because we |
    | cannot tell you the correct values for the variables |
    | in this file. |
    \*——————————————————-*/

    // ****** DATABASE TYPE ******
    // This is the type of the database server on which your vBulletin database will be located.
    // Valid options are mysql and mysqli, for slave support add _slave. Try to use mysqli if you are using PHP 5 and MySQL 4.1+
    // for slave options just append _slave to your preferred database type.
    $config[‘Database’][‘dbtype’] = ‘mysql’;

    // ****** DATABASE NAME ******
    // This is the name of the database where your vBulletin will be located.
    // This must be created by your webhost.
    $config[‘Database’][‘dbname’] = ‘insidestlforums_beta’;

    // ****** TABLE PREFIX ******
    // Prefix that your vBulletin tables have in the database.
    $config[‘Database’][‘tableprefix’] = ”;

    // ****** TECHNICAL EMAIL ADDRESS ******
    // If any database errors occur, they will be emailed to the address specified here.
    // Leave this blank to not send any emails when there is a database error.
    $config[‘Database’][‘technicalemail’] = ‘insideSTL_host@insideSTL.com’;

    // ****** FORCE EMPTY SQL MODE ******
    // New versions of MySQL (4.1+) have introduced some behaviors that are
    // incompatible with vBulletin. Setting this value to “true” disables those
    // behaviors. You only need to modify this value if vBulletin recommends it.
    $config[‘Database’][‘force_sql_mode’] = true;

    // ****** MASTER DATABASE SERVER NAME AND PORT ******
    // This is the hostname or IP address and port of the database server.
    // If you are unsure of what to put here, leave the default values.
    $config[‘MasterServer’][‘servername’] = ‘localhost’;
    $config[‘MasterServer’][‘port’] = 3306;

    // ****** MASTER DATABASE USERNAME & PASSWORD ******
    // This is the username and password you use to access MySQL.
    // These must be obtained through your webhost.
    $config[‘MasterServer’][‘username’] = ‘redacted’;
    $config[‘MasterServer’][‘password’] = ‘redacted’;

    // ****** MASTER DATABASE PERSISTENT CONNECTIONS ******
    // This option allows you to turn persistent connections to MySQL on or off.
    // The difference in performance is negligible for all but the largest boards.
    // If you are unsure what this should be, leave it off. (0 = off; 1 = on)
    $config[‘MasterServer’][‘usepconnect’] = 1;

    // ****** SLAVE DATABASE CONFIGURATION ******
    // If you have multiple database backends, this is the information for your slave
    // server. If you are not 100% sure you need to fill in this information,
    // do not change any of the values here.
    $config[‘SlaveServer’][‘servername’] = ”;
    $config[‘SlaveServer’][‘port’] = 3306;
    $config[‘SlaveServer’][‘username’] = ”;
    $config[‘SlaveServer’][‘password’] = ”;
    $config[‘SlaveServer’][‘usepconnect’] = 0;

    // ****** PATH TO ADMIN & MODERATOR CONTROL PANELS ******
    // This setting allows you to change the name of the folders that the admin and
    // moderator control panels reside in. You may wish to do this for security purposes.
    // Please note that if you change the name of the directory here, you will still need
    // to manually change the name of the directory on the server.
    $config[‘Misc’][‘admincpdir’] = ‘admincp’;
    $config[‘Misc’][‘modcpdir’] = ‘modcp’;

    // Prefix that all vBulletin cookies will have
    // Keep this short and only use numbers and letters, i.e. 1-9 and a-Z
    $config[‘Misc’][‘cookieprefix’] = ‘bb’;

    // ******** FULL PATH TO FORUMS DIRECTORY ******
    // On a few systems it may be necessary to input the full path to your forums directory
    // for vBulletin to function normally. You can ignore this setting unless vBulletin
    // tells you to fill this in. Do not include a trailing slash!
    // Example Unix:
    // $config[‘Misc’][‘forumpath’] = ‘/home/users/public_html/forums’;
    // Example Win32:
    // $config[‘Misc’][‘forumpath’] = ‘c:\program files\apache group\apache\htdocs\vb3’;
    $config[‘Misc’][‘forumpath’] = ”;

    // ****** USERS WITH ADMIN LOG VIEWING PERMISSIONS ******
    // The users specified here will be allowed to view the admin log in the control panel.
    // Users must be specified by *ID number* here. To obtain a user’s ID number,
    // view their profile via the control panel. If this is a new installation, leave
    // the first user created will have a user ID of 1. Seperate each userid with a comma.
    $config[‘SpecialUsers’][‘canviewadminlog’] = ‘1’;

    // ****** USERS WITH ADMIN LOG PRUNING PERMISSIONS ******
    // The users specified here will be allowed to remove (“prune”) entries from the admin
    // log. See the above entry for more information on the format.
    $config[‘SpecialUsers’][‘canpruneadminlog’] = ‘1’;

    // ****** USERS WITH QUERY RUNNING PERMISSIONS ******
    // The users specified here will be allowed to run queries from the control panel.
    // See the above entries for more information on the format.
    // Please note that the ability to run queries is quite powerful. You may wish
    // to remove all user IDs from this list for security reasons.
    $config[‘SpecialUsers’][‘canrunqueries’] = ”;

    // ****** UNDELETABLE / UNALTERABLE USERS ******
    // The users specified here will not be deletable or alterable from the control panel by any users.
    // To specify more than one user, separate userids with commas.
    $config[‘SpecialUsers’][‘undeletableusers’] = ”;

    // ****** SUPER ADMINISTRATORS ******
    // The users specified below will have permission to access the administrator permissions
    // page, which controls the permissions of other administrators
    $config[‘SpecialUsers’][‘superadministrators’] = ‘1’;

    // ****** DATASTORE CACHE CONFIGURATION *****
    // Here you can configure different methods for caching datastore items.
    // vB_Datastore_Filecache – to use includes/datastore/datastore_cache.php
    // vB_Datastore_APC – to use APC
    // vB_Datastore_XCache – to use XCache
    // vB_Datastore_Memcached – to use a Memcache server, more configuration below
    // $config[‘Datastore’][‘class’] = ‘vB_Datastore_Filecache’;

    // ******** DATASTORE PREFIX ******
    // If you are using a PHP Caching system (APC, XCache, eAccelerator) with more
    // than one set of forums installed on your host, you *may* need to use a prefix
    // so that they do not try to use the same variable within the cache.
    // This works in a similar manner to the database table prefix.
    // $config[‘Datastore’][‘prefix’] = ”;

    // It is also necessary to specify the hostname or IP address and the port the server is listening on
    /*
    $config[‘Datastore’][‘class’] = ‘vB_Datastore_Memcached’;
    $i = 0;
    // First Server
    $i++;
    $config[‘Misc’][‘memcacheserver’][$i] = ‘127.0.0.1’;
    $config[‘Misc’][‘memcacheport’][$i] = 11211;
    $config[‘Misc’][‘memcachepersistent’][$i] = true;
    $config[‘Misc’][‘memcacheweight’][$i] = 1;
    $config[‘Misc’][‘memcachetimeout’][$i] = 1;
    $config[‘Misc’][‘memcacheretry_interval’][$i] = 15;
    */

    // ****** The following options are only needed in special cases ******

    // ****** MySQLI OPTIONS *****
    // When using MySQL 4.1+, MySQLi should be used to connect to the database.
    // If you need to set the default connection charset because your database
    // is using a charset other than latin1, you can set the charset here.
    // If you don’t set the charset to be the same as your database, you
    // may receive collation errors. Ignore this setting unless you
    // are sure you need to use it.
    // $config[‘Mysqli’][‘charset’] = ‘utf8’;

    // Optionally, PHP can be instructed to set connection parameters by reading from the
    // file named in ‘ini_file’. Please use a full path to the file.
    // Example:
    // $config[‘Mysqli’][‘ini_file’] = ‘c:\program files\MySQL\MySQL Server 4.1\my.ini’;
    $config[‘Mysqli’][‘ini_file’] = ”;

    // Image Processing Options
    // Images that exceed either dimension below will not be resized by vBulletin. If you need to resize larger images, alter these settings.
    $config[‘Misc’][‘maxwidth’] = 2592;
    $config[‘Misc’][‘maxheight’] = 1944;

    /*======================================================================*\
    || ####################################################################
    || # Downloaded: 16:07, Tue Jun 17th 2008
    || # CVS: $RCSfile$ – $Revision: 26534 $
    || ####################################################################
    \*======================================================================*/

Viewing 25 results - 7,026 through 7,050 (of 32,519 total)
Skip to toolbar