Skip to main content

Home/ buddypress/ Group items tagged PHP

Rss Feed Group items tagged

Vernon Fowler

Stealth Mode for Buddypress Site Admin Plugin | Buddy Dev - 0 views

  • Another Alternative, with less features Ok,  Now for all of you who have yet not joined, buddydev Premium, well, you can use an alternative. Put this code in bp-custom.php and None of the site admin activity ime will be recorded.So if you are a site admin, you will never appear in the Who is Online/ recently active members widget. 12345add_action("plugins_loaded","bpdev_init_sm_mode");function bpdev_init_sm_mode(){if(is_site_admin())remove_action("wp_head","bp_core_record_activity");//id SM is on, remove the record activity hook}
Vernon Fowler

bp-custom.php · BuddyPress Codex - 0 views

  • bp-custom.php is often compared to your theme’s functions.php file. However, there are two primary differences between bp-custom.php and your theme’s functions.php.
  • independent from your theme
  • If you are packaging a BuddyPress theme, then you might want to consider using your theme’s functions.php instead. However, for the most part, you should use bp-custom.php
Vernon Fowler

BuddyPress.org → Docs → bp-custom.php - 0 views

  •  
    Developers may modify the functions of BuddyPress through the file bp-custom.php, placed in the directory wp-content/plugins/bp-custom.php. Please note: the bp-custom.php file is not included by default but must be manually created.
Vernon Fowler

bp-custom.php | BuddyPress Codex - 0 views

  • bp-custom.php is often compared to your theme’s functions.php file. However, there are two primary differences between bp-custom.php and your theme’s functions.php.
  • bp-custom.php runs from the /wp-content/plugins/ folder and is therefore independent from your theme. This is useful for adding code snippets that are BuddyPress-specific. Also, this code will always load regardless of what theme you are using.
  • bp-custom.php runs early in the BuddyPress-loading process. This allows you to override various settings in BuddyPress.
Vernon Fowler

Template Hierarchy · BuddyPress Codex - 0 views

  • The base templates that BP looks for in order of priority are: plugin-buddypress.php buddypress.php community.php generic.php page.php single.php index.php
  • If you are on a single group page, BuddyPress will use the following template hierarchy:
  • If you are on a single member page, BuddyPress will use the following template hierarchy:
  • ...6 more annotations...
  • If you are on an activity permalink page, BuddyPress will use the following template hierarchy:
  • If you are on the activity directory page, BuddyPress will use the following template hierarchy:
  • If you are on the members directory page, BuddyPress will use the following template hierarchy:
  • If you are on the group creation page, BuddyPress will use the following template hierarchy:
  • If you are on the groups directory page, BuddyPress will use the following template hierarchy:
  • If you are on the registration page, BuddyPress will use the following template hierarchy:
Vernon Fowler

Getting Started with bbPress 2.0 | ServerPress.com - 0 views

  • First, bbPress will look for bbpress.php, and if it can’t be found it will progress through the complete list that follows: bbpress.php forum.php page.php single.php index.php
Vernon Fowler

Function Reference/wp is mobile « WordPress Codex - 0 views

  • This Conditional Tag checks if the user is visiting using a mobile device. This is a boolean function, meaning it returns either TRUE or FALSE.
  •  
    Nice to use in bp-custom.php rather than functions.php - especially when using the BuddyMobile plugin from @modemlooper
Vernon Fowler

Achievements | Forum | Change Displayed Description Length? | BuddyPress.org - 0 views

  • By default, bp_create_excerpt (found in /bp-core/bp-core-template.php) sets a default length of 225. The Achievements plugin calls it in achievements-templatetags.php, causing descriptions longer than 225 characters to be truncated. As a temp fix, I copied bp_create_excerpt over to bp-custom.php, increased the $length, renamed it my_bp_create_excerpt, and then renamed it within the Achievements plugin as well. (I’m sure there’s a better way to change the $length, but this works for now)
Vernon Fowler

Function Reference/get template part « WordPress Codex - 0 views

    • Vernon Fowler
       
      TIL buddypress theme compatibility only plays nicely if the theme has been going with references to get_template_part e.g. http://codex.wordpress.org/Function_Reference/get_template_part [28/05/2013 4:35:25 PM] Bronson Quick: we have a client who didn't have budget and wants to use an existing theme and i couldn't work out why theme compatibility wouldn't generate permalinks properly [28/05/2013 4:35:30 PM] Bronson Quick: turns out that was the reason 
  •  
    "Load a template part into a template (other than header, sidebar, footer). Makes it easy for a theme to reuse sections of code and an easy way for child themes to replace sections of their parent theme. Includes the named template part for a theme or if a name is specified then a specialized part will be included. If the theme contains no {slug}.php file then no template will be included. "
Vernon Fowler

WordPress › Support » [Plugin: BP BookMarklet] Window size - 0 views

  •  
    "Plugin main file (bp-bookmarklet.php) line 144, edit this width=550,height=230to what you need. Once done, you'll need to delete the bookmarklet from your browser and drag and drop it again."
Vernon Fowler

BuddyPress.org → Docs → Changing Internal Configuration Settings - 0 views

  •  
    There are many internal configuration settings that can be changed by adding a configuration definition line to your wp-config.php file. Here's a list of the current setting that can be changed:
Vernon Fowler

gglnx/private-buddypress · GitHub - 0 views

  • Can I change the URL where non-loggedin users are being redirected? = Yes, currently you need to write a filter function in your functions.php. `function redirect_nonloggedin_users($current_uri, $redirect_to) { // Redirect users to the homepage // Caution! Exclude the homepage from 'Private BuddyPress' options // to avoid redirection loops! return get_option('siteurl') . '/?from=' . $redirect_to; } add_filter('pbp_redirect_login_page', 'redirect_nonloggedin_users', 10, 2);`
  •  
    Protect your BuddyPress Installation from strangers. Only registered users will be allowed to view the installation and all other users will be redirected to the login page. Users attempting to view blog content via RSS are also authenticated via HTTP Auth. You can exclude the registration, the homepage and blog pages (e.g. posts, archives and non-buddypress pages) from protection. In combination with the plugin 'Invitation Code Checker' your installation stays private but the registration is for users with a special password open.
Vernon Fowler

WordPress Q&A Plugin - WPMU DEV - 0 views

  • Reputation point values can be changed by editing qa.php, which lists the values as follows: // Reputation multipliers define( ‘QA_ANSWER_ACCEPTED’, 15 ); define( ‘QA_ANSWER_ACCEPTING’, 2 ); define( ‘QA_ANSWER_UP_VOTE’, 10 ); define( ‘QA_QUESTION_UP_VOTE’, 5 ); define( ‘QA_DOWN_VOTE’, -2 ); define( ‘QA_DOWN_VOTE_PENALTY’, -1 );
  •  
    "Q&A allows any WordPress site to have a fully featured questions and answers section - just like StackOverflow, Yahoo Answers and Quora."
Vernon Fowler

Topic: BuddyPress 1.6.3 released · BuddyPress.org - 0 views

  • If custom theme has a folder _inc replace the javascript files and ajax.php replace them with same file in bp-default
Vernon Fowler

WordPress › Support » [Plugin: Private BuddyPress] Only exclude SOME pages (h... - 0 views

  • Simply modify the example code from the plugin FAQs in order to unblock a page by its ID number: // unblock a page by id function make_page_visible($visibility) { global $bp; if (is_page(26)) return false; return $visibility; } add_filter('pbp_login_required_check', 'make_page_visible');
    • Vernon Fowler
       
      This works by page ID as well as the array option including slug and Page Title - see highlight below.
  • is_page(array(42,'about-me','Contact'))
    • Vernon Fowler
       
      Works in combination with the above highlight in a theme's functions.php file.
  •  
    Only exclude SOME pages (how-to)
Vernon Fowler

BuddyPress: How to change avatar (picture) size larger or smaller | Otreva Designs - 0 views

  • You can add code to a functions file or adda file bp-custom.php to the wp-content/plugins folder to change image sizes Avatar specific settings can be changed: define ( ‘BP_AVATAR_THUMB_WIDTH’, 50 ); define ( ‘BP_AVATAR_THUMB_HEIGHT’, 50 ); define ( ‘BP_AVATAR_FULL_WIDTH’, 150 ); define ( ‘BP_AVATAR_FULL_HEIGHT’, 150 ); define ( ‘BP_AVATAR_ORIGINAL_MAX_WIDTH’, 640 ); define ( ‘BP_AVATAR_ORIGINAL_MAX_FILESIZE’, $max_in_kb ); define ( ‘BP_AVATAR_DEFAULT’, $img_url ); define ( ‘BP_AVATAR_DEFAULT_THUMB’, $img_url ); Reply
Vernon Fowler

6 BuddyPress Power Hacks You Don't Want to Miss - WPMU.org - 0 views

  • This may be a built-in option to enable or disable the required activation for user accounts in future releases of BuddyPress. For now, just add this quick hack as a plugin or in your theme’s functions.php file
Vernon Fowler

Best Practices for Preventing BuddyPress Spam User Registrations | Wptuts+ - 0 views

  • The first level of security is to change the footer text to remove mentions of WordPress and BuddyPress. Spammers target the words “proudly powered by WordPress and BuddyPress” in search engines to find sites they can compromise.
  • In BuddyPress, the default URL for the registration page is “http:/yoursitedomain.com/register”. This is why spambots include the “insite:register” when performing the search described in the above section. Make it harder for them to find your site by easily changing the default slug for BuddyPress in your wp-config.php file.
  • We use the honeypot technique to thwart spambots and it has worked pretty well from our experience. I didn’t invent the idea, but I built this implementation for BuddyPress and it works like a champ.
  • ...4 more annotations...
  • BP_REGISTER_SLUG
  • All you need to do is set the slug for the registration page that has been created. If you’re on BuddyPress 1.5+ that is.
  • It enables you to block IP addresses and even entire domains from accessing your site, a very useful thing to do against known bots trying to create fake BuddyPress user accounts.
  • Be wary of trying every single security plugin under the sun, as this slows down your site and adds to your maintenance workload by having more things to update and go through if something breaks. At first, stick to the highest rated ones that have proven themselves over time with a lot of users. One such plugin, which is highly recommended by many BuddyPress and WordPress users, is Bad Bahavior. This plugin will not only block a lot of spam, but will make your site invisible to many bots in the first place and thereby prevent fake registrations.
Vernon Fowler

BuddyPress.org → Docs → Theme Dev: Building a BuddyPress Child Theme - 0 views

  • This guide is for building themes for BuddyPress 1.2 and above.
  • The default BuddyPress theme is not located in the usual /wp-content/themes/ directory. It is stored in the BuddyPress plugin folder
  • Note the “Template:” entry, which tells WordPress that we want to use the BuddyPress default theme (bp-default) as the parent theme
  • ...6 more annotations...
  • your own theme is in /wp-content/themes/
  • and the tag “buddypress”
  • to inherit the CSS, in BP 1.5+, you don’t have to do anything!  Just start writing your new styles in style.css and skip to section 3
  • copy this file and paste it directly into your child theme’s folder (the same place as your style.css file)
  • if you want to override a template file that is in a sub folder, you must also recreate the sub folder in your child theme
  • There is one exception to the template override rule — functions.php.
1 - 20 of 21 Next ›
Showing 20 items per page