-
shanebp replied to the topic Font Awesome breaks ajax on delete link in the forum How-to & Troubleshooting 10 years, 4 months ago
It’s the jquery in global.js
The ‘target’ becomes the icon rather than the a tag.
Soif ( target.hasClass('delete-activity')
fails.Changing to this gets the right target:
if ( target.hasClass('icon-trash') {
And then you need to change:
var link_href = target.attr('href');
to:
var link_href = target.closest("a").attr("href");
otherwise…[Read more]
-
shanebp replied to the topic How to filter "so and so joined the group" from group activity stream? in the forum How-to & Troubleshooting 10 years, 4 months ago
Rather than filter it, prevent the entry from being created.
Try this in your theme/functions.php or plugins/bp-custom.php
It won’t remove existing entries, but should stop new ones.function victor_dont_save_join_group_activity( $activity_object ) {
$exclude = array( 'joined_group' );
if( in_array( $activity_object->type, $exclude…[Read more]
-
shanebp replied to the topic Font Awesome breaks ajax on delete link in the forum How-to & Troubleshooting 10 years, 4 months ago
This issue gets stranger the farther I dig…
1. We aren’t using the BP Default theme, so why is the activity stream using global.js instead of buddypress.js from the legacy theme?
2. in either /js, this click handler is never triggered if an image is used in the < a > tag for activity->delete or activity->fav
jq('div.activity').click(…
[Read more] -
shanebp replied to the topic Trouble finding the PHP behind the "Create a Group" button in the forum How-to & Troubleshooting 10 years, 4 months ago
Always grep in the BP plugin folder first.
bp_group_create_button()
bp-groupsbp-groups-template.php ~L. 1890 -
shanebp replied to the topic Font Awesome breaks ajax on delete link in the forum How-to & Troubleshooting 10 years, 4 months ago
Replacing the text with a basic img tag has the same effect; when clicked, the activity item is deleted but on a page reload instead of via ajax.
So I don’t think it’s specific to font awesome.
-
shanebp started the topic Font Awesome breaks ajax on delete link in the forum How-to & Troubleshooting 10 years, 4 months ago
I can replace the activity stream item ‘Delete’ text with a Font Awesome icon, but it causes a page reload instead of using ajax.
Any ideas as to why or a solution?
function sc_swap_delete_text( $link ) {
$trash = '<i class="icon-trash icon-large"></i>';$link = str_replace("Delete", $trash, $link);
return $link;
}
add_filter(…[Read more] -
shanebp replied to the topic [Resolved] Limited Checkbox Selection in the forum How-to & Troubleshooting 10 years, 4 months ago
format got messed up, so look here for a non-jQuery approach: http://pastebin.com/0afNVh3e
-
shanebp replied to the topic [Resolved] Display group of specific user on wordpress page in the forum How-to & Troubleshooting 10 years, 4 months ago
-
shanebp replied to the topic [Resolved] Limited Checkbox Selection in the forum How-to & Troubleshooting 10 years, 4 months ago
javascript:
function checkboxlimit(checkgroup, limit){
[Read more]
for (var i=0; i<checkgroup.length; i++){
checkgroup[i].onclick=function(){
var checkedcount=0
for (var i=0; i<checkgroup.length; i++)
checkedcount+=(checkgroup[i].checked)? 1 : 0
if (checkedcount>limit){
alert("You can select a maximum of "+limit+"… -
shanebp replied to the topic [Resolved] How to have "Edit" before Profile Group Tab in editing in the forum How-to & Troubleshooting 10 years, 4 months ago
>In the original function, there’s no return statement only echo.
The original function is not a filter hooked function.
echo $tab; is not a return.
Read up on WordPress functions, actions and filters. -
shanebp replied to the topic [Resolved] How to have "Edit" before Profile Group Tab in editing in the forum How-to & Troubleshooting 10 years, 4 months ago
I’m surprised your code works.
Filter should always return something.This is unfinished but outlines another approach, probably more ‘correct’:
function custom_bp_profile_group_tabs( $tabs, $groups, $group_name ) {
tab_names = array('Base', 'GroupProfile' ); // add to as necessary
foreach ( (array) $tabs as $tab ) {
// loop thru…[Read more] -
shanebp replied to the topic [Resolved] How to have "Edit" before Profile Group Tab in editing in the forum How-to & Troubleshooting 10 years, 4 months ago
In bp_profile_group_tabs, there is a filter hook:
$tabs = apply_filters( 'xprofile_filter_profile_group_tabs', $tabs, $groups, $group_name );
Write a filter function and do a string search & replace for each tab.
ex. Search for ‘Base’ and replace it with ‘Edit Base’. -
shanebp replied to the topic Custom Component Help in the forum Creating & Extending 10 years, 4 months ago
Might be related to your component, but probably just the usual cpt issues.
Do you have a theme template called single-music.php so that WP can display it?
Do you have a pre_get_posts filter in your theme/functions.php or plugin file so that WP knows you want a cpt?
// so music cpt is included in cat or tag calls
[Read more]
function… -
shanebp replied to the topic Member Total when excluding subscribers in the forum How-to & Troubleshooting 10 years, 5 months ago
Try using the bp_pre_user_query_construct hook
codex example -
shanebp replied to the topic Creating an iOS accompaniment to my site in the forum Creating & Extending 10 years, 5 months ago
There are various plugins and services for turning a WP site into an app – google it.
Here’s one: appPresserRemember that you don’t need to use WP/BP to call the database.
Often times, devs create apps that only use a subset of the data.
So rolling your own app is feasible and probably the best approach. -
shanebp replied to the topic Create custom notifications in the forum Creating & Extending 10 years, 5 months ago
The bbpress example is a good one.
But just fyi – the BuddyPress codex page is here: bp_notifications_add_notification page.
-
shanebp replied to the topic Duplicate BuddyPress activity in the forum How-to & Troubleshooting 10 years, 5 months ago
That might be tricky to track down, given that ajax is involved.
Your best bet is to ask Headway. -
shanebp replied to the topic Duplicate BuddyPress activity in the forum How-to & Troubleshooting 10 years, 5 months ago
>where both want to display the posts hence the duplication
It’s not a display problem, although that’s how it manifests.
Two entries are being created when an update is created.
http://boyabouttown.net/members/jenifusion/activity/58/
http://boyabouttown.net/members/jenifusion/activity/57/Did you switch to a WP theme ( 2013, etc ) and then…[Read more]
-
shanebp replied to the topic Sanitize Input – groups_update_groupmeta in the forum Creating & Extending 10 years, 5 months ago
Easy enough to test with some ‘bad’ data, but groups_update_groupmeta uses update_metadata which runs the value thru things like sanitize_meta, so you should be fine.
-
shanebp replied to the topic NSFW: Please review my theme | BBFacelook in the forum Showcase 10 years, 5 months ago
It looks fine and is usable.
I like the stripped down listings on pages like ‘members’But the only opinions that count are those of your users.
- Load More
@shanebp
Active 3 days ago