Search Results for 'wordpress'
-
AuthorSearch Results
-
July 12, 2011 at 1:27 pm #116188
In reply to: Activity not working
4colourprogress
ParticipantIf you’re website doesn’t currently run off wordpress I think you maybe over complicating this somewhat.
There are a number of social networking solutions available for php that have activity streams and such and would probably be easier to implement.
Try checking out Elgg http://www.elgg.org/features.php
It’s open source too.July 12, 2011 at 8:44 am #116184thinkluke
MemberRoger, This is the code I have thus far….
add_filter(“gform_post_submission_1”, “set_post_thumbnail_as”, 10, 2);
function set_post_thumbnail_as($entry, $form){//getting first image associated with the post
$post_id = $entry[“post_id”];
$attachments = get_posts(array(‘numberposts’ => ‘1’, ‘post_parent’ => $post_id, ‘post_type’ => ‘attachment’, ‘post_mime_type’ => ‘image’, ‘order’ => ‘ASC’));
if(sizeof($attachments) == 0)
return; //no images attached to the post//setting first image as the thumbnail for this post
update_post_meta( $post_id, ‘_thumbnail_id’, $attachments[0]->ID);// update bp activty stream content.
$activity_id = bp_activity_add( array( ‘id’ => $post_id, ‘content’ => ‘$attachments’ ));
}I understand the activity post id is different from the wordpress post id? How can I get this activity post id. Also is it okay I am using the post-submission gf filter? Is it just this simple with the correct activity add code?
Can you please help me? I’m really stuck and almost thinking of scrapping the project just because I suck at buddypress and PHP.
July 12, 2011 at 6:29 am #116177In reply to: Custom HTML in posts
Paul Wong-Gibbs
KeymasterPlease would you clarify what exactly you mean by “[posts] in BuddyPress”? When I read that, I immediately think of writing blog posts, which is part of WordPress core.
July 12, 2011 at 2:27 am #116170jf0
Memberbetter late than never
How can I make wordpress shortcodes work anywhere in buddypress?
July 11, 2011 at 9:54 pm #116160In reply to: Invite Tool
Boone Gorges
Keymasterhttps://wordpress.org/extend/plugins/invite-anyone/ has nice email support. I haven’t built Facebook or Twitter integration, though it’s something I’d like to do in the future.
July 11, 2011 at 8:42 pm #116157In reply to: How to upgrade from 1.2.8 to 1.2.9
aces
ParticipantI had the same problem with the wordpress admin menus in ie9 and online (linux) sites but not on local (vista) sites. Once I viewed and played with the menus in firefox they worked as expected in ie9…. I hope others using the same sites would not have to go through the same process…
Also the buddypress upgrade didn’t show up unless I ran add new plugins first….
July 11, 2011 at 3:03 pm #116142thinkluke
MemberHi Roger, I jumped to a solution then, when in fact it does not work correctly, sorry…
I have used your code from page 1 to display featured image on the bp activity stream. However I have a gravity form that lets user upload posts from their, I have used this simple snipet of code to make the upload image a featured image.
add_filter(“gform_post_submission”, “set_post_thumbnail_as”, 10, 2);
function set_post_thumbnail_as($entry, $form){
//getting first image associated with the post
$post_id = $entry[“post_id”];
$attachments = get_posts(array(‘numberposts’ => ‘1’, ‘post_parent’ => $post_id, ‘post_type’ => ‘attachment’, ‘post_mime_type’ => ‘image’, ‘order’ => ‘ASC’));
if(sizeof($attachments) == 0)
return; //no images attached to the post
//setting first image as the thumbnail for this post
update_post_meta( $post_id, ‘_thumbnail_id’, $attachments[0]->ID);
}This works perfectly for wordpress and displays the featured image correctly. However the featured image does not appear in the buddypress activity stream until I manually go to that post and hit update in the backend… really defeats the purpose of publishing the post… pulled my hair out for days on this.. Do you have any suggestions? I believe it is something to do with the way bp saves posts… Maybe bp_activity_post_update would work
July 11, 2011 at 1:01 pm #116141In reply to: A quick note about WordPress 3.2
James
Participantthank you Paul, already found an issue. It was some conflict of divs/classes in my child theme, which, somehow, appearead only after update.
thanks again.
July 11, 2011 at 12:35 pm #116136In reply to: A quick note about WordPress 3.2
Paul Wong-Gibbs
KeymasterNo — see https://codex.buddypress.org/theme-development/bp-default-theme-changelog/
(ignore all the property changes, those are irrelevant)
July 11, 2011 at 11:37 am #116133In reply to: A quick note about WordPress 3.2
James
Participantspent few hours and no success.
I do see that in bp-default 1.2.9 reveal is working (help section with question sign in profile header), but why after update it stoped working in my child theme?
tried to switch off all plugins, removed functions.php, member-header.php etc.were there any changes to default.css in 1.2.9?
thanks.
July 11, 2011 at 8:48 am #116125In reply to: A quick note about WordPress 3.2
James
Participantthanks Paul, I had to write that these are two separate questions.
First one is still opened.July 11, 2011 at 8:44 am #116124In reply to: A quick note about WordPress 3.2
Paul Wong-Gibbs
KeymasterBuddyPress.org is being worked on, and is unrelated to the 1.2.9 release.
July 11, 2011 at 8:10 am #116123thinkluke
MemberI have found a solution if you are using gravity forms… I just need to know who to add the post id into the form submission function because atm it just uploads the image to the actually form page

add_action(“gform_pre_submission_2”, “gform_registration”);
function gform_registration( $form_meta ){
// $post_id gets set here by some code I have removed for clarity
// If there is a logo, attach that file and make it the post featured image
if($_FILES) {
//WordPress Administration API required for the media_handle_upload() function
require_once(ABSPATH . ‘wp-admin/includes/file.php’);
require_once(ABSPATH . ‘wp-admin/includes/image.php’);
require_once(ABSPATH . ‘wp-admin/includes/media.php’);
$media_id = media_handle_upload(‘input_3’, $post_id);
my_set_post_thumbnail( $post_id, $media_id);
}
}
// This function will be obsolete once WP 3.1 is release since that includes
// an identical function name set_post_thumbnail
function my_set_post_thumbnail( $post, $thumbnail_id ) {
$post = get_post( $post );
$thumbnail_id = absint( $thumbnail_id );
if ( $post && $thumbnail_id && get_post( $thumbnail_id ) ) {
$thumbnail_html = wp_get_attachment_image( $thumbnail_id, ‘thumbnail’ );
if ( ! empty( $thumbnail_html ) ) {
update_post_meta( $post->ID, ‘_thumbnail_id’, $thumbnail_id );
return true;
}
}
return false;
}
July 11, 2011 at 7:51 am #116122In reply to: A quick note about WordPress 3.2
James
Participantdoes anyone have same issue in BP 1.2.9, that help section in member’s header (after @username) does not reveal anymore?
what is happening to buddypress.org? I cannot search, do not see updates in single view. Support topics don’t have pagination anymore, cannot edit/delete topics etc.
thanks.
July 11, 2011 at 7:44 am #116121@mercime
ParticipantDouble-checked this for a friend, BuddyPress does not work where WordPress is given its own directory. I figured the rationale was one cannot create a network with that set up https://codex.wordpress.org/Create_A_Network#WordPress_Settings_Requirements. I just moved WP to physical subdomain and it was good to go
July 10, 2011 at 10:08 pm #116098Boone Gorges
Keymasterbp_before_members_loop is not a function, it is a WP action hook. Plugins and themes can use this hook to add functionality to your members page. Read the first limo provided by chouf1 to learn more, or google “WordPress hooks”.
Also, as megainfo suggests, it’s a good idea to learn a little about grep, which will help a lot in these instances.
July 10, 2011 at 7:19 pm #116088In reply to: Making an exclusive login?
David Carson
ParticipantI haven’t used or tested this plugin, but it looks like it might work for you.
https://wordpress.org/extend/plugins/user-domain-whitelist/
P.S. Go Jumbos! I’m an alum.
July 10, 2011 at 3:57 pm #116083In reply to: Adding the admin bar to a php file.
NoahY
MemberIn case anyone googles here, the article posted by r-a-y works for different subdomains, but needs a bit of tweaking, based on this post:
Basically, we need to put the wordpress page with the adminbar only in an invisible iFrame and access its content from the parent.
To do this, first we add the iFrame to the external php / html file. Something like this works:
`
`
Next, we need to edit the `page-component.php` file, adding a head and body onload element:
`
document.domain = “site.com”
`
This sets document.domain to the same domain as we will specify in our external file. It also adds jQuery (needed for buddypress-ajax-chat on my site). Finally, it sets an onload event to tell the parent window to grab it’s content.
Next, we have to add some more javascript to the parent, along with the other links mentioned in the article above:
`document.domain=”sirimangalo.org”;
function getNav() {
var content = document.getElementById(‘bpsrc’).contentWindow.document.body.innerHTML;
document.getElementById(‘bpContainer’).innerHTML = content;
}`This sets the domain again, allowing the function to pass from the iFrame on up, and provides the function to grab the content of the source frame and output it to the “bpContainer” div.
July 10, 2011 at 2:37 pm #116081thinkluke
MemberI got the exact same issue here @tindell … featured image will not display in buddypress activty until I update it in the backend of wordpress manually
Has anyone come up with a solution? This is really frustrating!!!! Ah buddypressJuly 10, 2011 at 11:04 am #116077danbpfr
Participanthttps://codex.wordpress.org/Function_Reference/do_action
https://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-members-loop/The function is in bp-themes/bp-default/members/members-loop.php]
Line 3 :July 9, 2011 at 6:44 pm #116053@mercime
ParticipantJuly 9, 2011 at 6:38 pm #116052In reply to: Move Buddypress from subfolder to root
@mercime
ParticipantWhat do you currently have at the root of your domain?
It would be pretty much the same as moving WordPress from subfolder to domain root or elsewhere.
Always backup database and server files to your computer hard drive before attempting the change, just in case.https://codex.wordpress.org/Moving_WordPress
https://codex.wordpress.org/Changing_The_Site_URLJuly 9, 2011 at 10:48 am #116046Paul Wong-Gibbs
KeymasterWhat versions of WordPress and BuddyPress are you using? Has the URL stayed the same?
Also, I suggest you revert to a standard WordPress theme (e.g. twentyten) and disable all plugins. Go to Settings > Permalinks and re-select/save your choice. Reactivate BuddyPress. Hopefully no errors, and that twentyten continues to work ok.
Then switch back to the theme that you were using, and check the BuddyPress functionality.
July 9, 2011 at 2:25 am #116039In reply to: Notification on Profile Update
r-a-y
KeymasterHi Steve,
Missed your mentions.
do_actions can be found by searching for them. If you have a good search program, do a search for “do_action” throughout the /plugins/buddypress/ folder. (You’ll get a lot of results! It’s better to just sift through the code to find what you want though.)
As for specifics, the do_action for activity updates is “bp_activity_add”:
https://buddypress.trac.wordpress.org/browser/tags/1.2.9/bp-activity.php#L679The code snippet above will not work with this as the parameter for “bp_activity_add” is different.
July 9, 2011 at 2:17 am #116038In reply to: How do you enable user blog in buddypress 1.2.9?
r-a-y
KeymasterYou need to convert WordPress into a network before users can create individual blogs:
https://codex.wordpress.org/Create_A_Network
https://codex.buddypress.org/getting-started/configure-buddypress-components/#post-1855 (scroll down to “Blog tracking”)—
Or you might consider allowing your users to post on your current blog by making them an Author:
https://codex.wordpress.org/Roles_and_Capabilities#AuthorBy default, users are Subscribers.
-
AuthorSearch Results