Forum Replies Created
-
I don’t think so? It seems to be adding a whole different type of profiles. All I want is to be able to redirect non logged in users away.
I tried googling it before I made an account to ask here! I haven’t been able to find a solution
We can agree to disagree on that. There’s a concept in software development called close coupling and loose coupling that you might like to read up on.
Could I get your comments on this topic?
https://buddypress.org/support/topic/how-to-restrict-non-logged-in-users-from-viewing-profiles/Those methods are not future proof and are hackish, if in future they decide to move the css class from the body to somewhere else, my code will break.
Thanks for your help though. How can I submit a patch?
Again, its not just the body class, as I said its the avatar as well, plus in future there might be other changes introduced which I’d like to be introduced in my custom pages as well. I don’t see why there can’t be a hook added to this function, it will be a one line change and its consistent with all the other hooks that are added.
Is it your decision to add/not add a hook?
> That function can not have filter because it is true or mot based on one thing.
Yes, and with a filter, that one thing can be expanded. If someone wants to create their own page for displaying a single activity, they should have a filter here so they can perform their own checks if needed. There are many other boolean functions in wordpress as well as buddypress which have filters.
That’s not the only thing though, as I said the avatar is sized differently on the permalink page and regular activity loop. I don’t see why you can’t add a filter to this function? It seems to be needed, users can have other ways of showing a single activity and should have control over whether it is a single activity page or not.
Are you part of the buddypress team?
Well, I was hoping my request for a filter is considered. This seems like a reasonable place to add a filter to.
The only way to control which layout is shown (whether single or loop) is to get bp_is_single_activity() to return true, the functions in the loop which govern the layout + avatar size all check this function to decide which avatar size/layout to show.
> the only difference of a permalink activity and one in a loop is avatar size.
That’s not correct. The entire layout is different for permalink and loop activities, including avatar size, size of the activity box itself, size of buttons and text, etc.
Are you referring to bp-themes/members/single/activity.php? I have already tried copying that file and using it, but even within that file it calls on bp_is_single_activity() to determine which layout to show, and without having it return true it shows the group layout instead. Therefore I’m requesting for a filter to be put in this function. 🙂
I want the layout for permalinks of activities to be duplicated in other places, including the bigger avatar, thought bubbles, and everything else
The function is called from multiple places though, not just once. Its also called when checking the size of the avatar (if single activity, a bigger avatar is shown, otherwise a smaller one).