Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 7,026 through 7,050 (of 32,505 total)
  • Author
    Search Results
  • #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 $
    || ####################################################################
    \*======================================================================*/

    Pascal Casier
    Moderator

    Hi,
    Try this in a child theme or functions.php (I didn’t really test it, but this could be a way to do):

    function casiepa_mention_gravatar() {
                echo 'Upload a profile picture on <a href="gravatar.com">Gravatar</a>';
    }
    
    add_action( 'bbp_theme_after_reply_author_details', 'casiepa_mention_gravatar' );
    add_action( 'bbp_theme_after_topic_author_details', 'casiepa_mention_gravatar' );

    Pascal.

    #171011
    Robin W
    Moderator

    you put this code :

    [bsp-display-topic-index show=’5′ forum =’10’]

    into the content section of your home page

    #171001
    ZivotsRS
    Participant

    Thank you for your response. Plugin looks great.
    Only too much for me in English and can not find where to adjust. Thus, the basic settings I can see, but I can not find out where to enter a shortcode to work. It is the most English 🙁

    #170998
    Robin W
    Moderator

    latest topics is in a shortcode in my plugin

    https://wordpress.org/plugins/bbp-style-pack/

    [bsp-display-topic-index show=’5′ forum =’10’]

    #170995
    Robin W
    Moderator

    If you know how to add stuff to css, this should do it

    .type-forum .post_info {
    display: none;
    }

    If you don’t know how to do that, your theme may allow custom css – have a look in dashboard>appearance and see what theme changes you can see in there, or have a look at

    https://codex.bbpress.org/functions-files-and-child-themes-explained/

    Do come back if you need further help !

    #170993
    Birchwind
    Participant

    Hi –
    I’m running WordPress 4.4.1
    BBpress is the 2.58
    Theme is Optimizer

    I have successfully increased the font size of the forum itself. What I have not been able to do is figure out how to change the text that one sees to get back to the various Forum categories or Forum home – as shown in image below:
    https://i.gyazo.com/0882075309c65c8058da2fe97caea9aa.png

    I used this info here: https://codex.bbpress.org/bbpress-styling-crib/ and according to that, it is #8 I want to adjust, and on that ‘how-to’ it says that that area is:

    8. Breadcrumb and link colors
    Inherited from your theme

    Just wondering where to find this so I can make it larger in size.

    #170962
    grungyape
    Participant

    Sorry, I must have not set myself up to be notified of your reply.

    I’m not sure I understand you. The forum is working, as in the links go where they should and what not.

    So yes, well it was changed but in short yes, this link does work:

    http://fubar-alliance.com/comms/channel/test/

    The forum software says index is comms, and single forums is channel, but the index looks like it should have an image to represent the forum in question, otherwise the page is hard to read and understand…

    If you go here: http://fubar-alliance.com/comms/

    Notice the odd blocks that highlight when you find them, and have the mini round broken image.

    #170961
    vinstyton
    Participant

    Yes, two colors that I need to change.

    The author/date text color and the link colors of the forums.

    From the codex reference, I am trying to change the colors of #5 and #8.

    I tried the code above but it did not change those two color elements.

    Thanks.

    #170958
    Robin W
    Moderator

    although

    `$forum_id = bbp_get_topic_forum_id($post_id);

    
    or
    
    

    $forum_id = bbp_get_topic_forum_id($post_id);
    `

    would be quicker and easier to get the forum id

    #170944
    Pascal Casier
    Moderator

    Hi,
    1) There is no pagination for the forum archive page.
    2) It is not limited to 50 forums, you can create as much as you want. It is just recommended that you use less than 50. You can use a filter to change the number to what you want. I haven’t tested it myself, so try it yourself in your child theme or functions.php:

    function casiepa_increase-forum-per-page( $args = array() ) {
       $args['posts_per_page'] = get_option( ‘_bbp_forums_per_page’, 100 );
    return $args;
    }
    add_filter( ‘bbp_before_has_forums_parse_args’, ‘casiepa_increase-forum-per-page’ );

    3) To order, Edit your forum (Admin Panels > Forums > All Forums) and on the right you will find ‘Forum attributes’, play with the ‘order’ attribute.

    Hope this helps,
    Pascal.

    #170943
    Aztix
    Participant

    Here is my research :

    I register the forum parent id with this :

    $parents = get_post_ancestors( $post->ID );
    $id = ($parents) ? $parents[count($parents)-1]: $post->ID;
    $parent_id = "forum_parent_".$id;

    and add it on my body class

    <?php body_class($parent_id." ".$style." ....) ?>

    and then i creat this little function :

    if (bbp_is_single_topic($parent_id === ‘forum_parent_11801’)){
    wp_nav_menu(array(‘theme_location’ => ‘primary’, ‘menu’=>’my-menu-name’ ));
    }

    It doesn’t work but i think that i’am not so far from what i want !

    #170936
    Soffiti
    Participant

    I have 63 forums located at soffiti.com, but only 50 are present in the forum index, the other 13 are not shown and only can be searched. I wanted to how I could add the 13 forums so that users can discover them just like the other 50 without running into them during search. I’d like to know if there is a plugin or theme that can solve this without me having to add/edit code (if necessary please give me directions on how I should add/edit the code). Also, I’m guessing that the topics and posts are presented in the same way so I’d like to know how to extend them as well.

    Note:
    1. Extend on the same page
    2. Extend to another page

    #170933
    Pascal Casier
    Moderator

    Hi,
    Check bbP Stylepack. It has a shortcode bsp-display-topic-index that should help you.
    Pascal.

    #170931

    In reply to: Forums Page Layout

    Pascal Casier
    Moderator

    Hi Brandi,
    Seems like you theme goes in conflict with bbPress. What theme do you use and can you confirm that switching theme solves the issue ?
    You will have to play with CSS if you want to stay with this theme:

    .forum {
      width: 100% !important;
    }

    Pascal.

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