-
Henry replied to the topic [Resolved] Register Page as Homepage redirect issue in the forum How-to & Troubleshooting 11 years, 1 month ago
I came across this exact same thing a few weeks back so wrote the function below:
// redirect front page for logged in visitors
[Read more]
function redirect_front_page_for_loggedin_users() {
global $bp;
// redirect only when user is logged in and we are viewing the front page as set in WP admin
if ( is_user_logged_in() && ( is_front_page() ) )… -
Henry replied to the topic Customising text outputted by bp_members_pagination_count() in the forum How-to & Troubleshooting 11 years, 1 month ago
@hnla in the end this wasn’t a problem with the .pot file. It was a self-inflicted problem caused by messing with wp-config.php. Thanks again for your help.
-
Henry replied to the topic Block Comments When Not Friends in the forum How-to & Troubleshooting 11 years, 1 month ago
You can do this by checking if the displayed member is friends with the logged in member and then showing the comment form conditionally.
$status = friends_check_friendship_status( bp_loggedin_user_id(), bp_displayed_user_id() );
if ( $status ) {
// show comment form
} else {
// don't show it
}Please note I’ve not tested this but that…[Read more]
-
Henry replied to the topic Updating avatar from another page. in the forum How-to & Troubleshooting 11 years, 1 month ago
@martinbeaulne the avatar upload process uses certain scripts (jcrop etc) so you will need to check they aren’t being enqueued only on the /change-avatar/ page
-
Henry replied to the topic oembed for soundcloud via bbPress in group forum in the forum How-to & Troubleshooting 11 years, 1 month ago
Are you removing support for that provider (soundcloud) anywhere? if you take a look in class-oembed.php – soundcloud is supported and looks as though it has been since WP 2.9
-
Henry replied to the topic Must I set up subnav items when creating a new component? in the forum How-to & Troubleshooting 11 years, 1 month ago
sweet! thanks again for the help
-
Henry replied to the topic Must I set up subnav items when creating a new component? in the forum How-to & Troubleshooting 11 years, 1 month ago
bp_action_variables are stored as an array
That does make it easy. you just have to ‘catch’ them right?
so if somebody randomly entered the URL posts/page/2/3/hello and I did something like
if ( $bp->action_variables[2] == 'hello' ) {
// do something
} else {
// do nothing
}then ‘do something’ would happen
-
Henry replied to the topic Must I set up subnav items when creating a new component? in the forum How-to & Troubleshooting 11 years, 1 month ago
@modemlooper got ya! I see now – perhaps the pagination needs the actions variables to be available. Hiding the subnav (but still keeping it) works.
Thanks for all your help in this thread, appreciate it! 🙂
Now i’m off to learn about why this blasted pagination query needs the action variables in order to work…
-
Henry replied to the topic Must I set up subnav items when creating a new component? in the forum How-to & Troubleshooting 11 years, 1 month ago
@modemlooper tried the space, it didn’t work very well for me.
looking through BP core – i noticed every single component has a subnav set – even BP Follow has subnavs set – it’s making me think subnavs (bp_current_actions) are needed as the BP Follow subnavs are highly redundant:
members/username/following/following
members/username/followers/followers -
Henry replied to the topic Must I set up subnav items when creating a new component? in the forum How-to & Troubleshooting 11 years, 1 month ago
actually – it only seems to work when a
bp_current_action
(subnav item) is set. strange!EDIT: Oh right, i’ll give the space a shot…
-
Henry replied to the topic Must I set up subnav items when creating a new component? in the forum How-to & Troubleshooting 11 years, 1 month ago
bp_current_component
bp_current_action
bp_action_variablesmembers/user/bp_current_component/bp_current_action/bp_action_variables
So
bp_current_component
is the main nav item,bp_current_action
is the subnav item andbp_action_variables
is what comes after that.bp_dump() shows me that when bp_current_action has a value,…[Read more]
-
Henry replied to the topic Must I set up subnav items when creating a new component? in the forum How-to & Troubleshooting 11 years, 1 month ago
bp_dump()
V useful thanks – just taking a look through now… -
Henry replied to the topic Must I set up subnav items when creating a new component? in the forum How-to & Troubleshooting 11 years, 1 month ago
I suppose my problem comes down to why paginated posts are only displayed when a subnav is specified.
e.g. If I display my list of posts on page
members/username/COMPONENT-NAME/
then i’d want my paginated posts to display like this:
members/username/COMPONENT-NAME/page/2
As it stands, i’m displaying my list of posts…[Read more]
-
Henry replied to the topic Must I set up subnav items when creating a new component? in the forum How-to & Troubleshooting 11 years, 1 month ago
@modemlooper ah yes I see! – I suppose if it works, why not 🙂
-
Henry replied to the topic Must I set up subnav items when creating a new component? in the forum How-to & Troubleshooting 11 years, 1 month ago
@modemlooper not sure I follow?
-
Henry replied to the topic Must I set up subnav items when creating a new component? in the forum How-to & Troubleshooting 11 years, 1 month ago
@modemlooper – Great stuff, as in doing this?
$nav = array(
'name' => __( 'Component name', 'bp-component-name' ),
'slug' => 'component-name',
'position' => 80,
'screen_function' => 'bp_component_blah'
);This does give the page I need:
example.com/members/username/component-name
Although this leads…[Read more]
-
Henry started the topic Must I set up subnav items when creating a new component? in the forum How-to & Troubleshooting 11 years, 1 month ago
Hi all
Are subnav items mandatory when creating a new component?
I just need the one page (a main nav item) as in:
example.com/members/username/component-name
I don’t need any subnav items such as
example.com/members/username/component-name/sub-page
Not entirely sure I can have what I want here – seems as though you must have a subnav item…[Read more]
-
Henry replied to the topic strong passwords in the forum Creating & Extending 11 years, 1 month ago
@cwjordan just to add – a logged out user can request a password reset link which they can use to enter a new password. This will be another place to enforce strong passwords.
-
Henry replied to the topic User E-Mail Address as Authentification when Signing up in the forum How-to & Troubleshooting 11 years, 1 month ago
Hi @applegateian with user display name you have the problem of spaces in the URLs. I suppose it is possible but in my view it would mean quite a bit of custom code.
-
Henry replied to the topic Creating 'New Group' changes 'http://' to 'HTTPS:// ' in the forum How-to & Troubleshooting 11 years, 1 month ago
If the server isn’t the issue and you are using everything as it comes out of the box then yes you should give a fresh install a shot. Keep a back up of everything for reference.
- Load More
@henrywright-1
Active 9 years, 10 months ago