Forum Replies Created
-
I’m still stuck on this…
Can anyone suggest a code snippet that might get me started?
Thx so much in advance!
Thanks for your reply @boonebgorges, it’s greatly appreciated;
I like option one, but I’m not that proficient at coding…. as you’ll see. lol!
How do you “hook a function to bp_blogs_new_blog_post that takes the post content and uses bp_activity_update_meta to add the category to the activity meta table”?
Then, how do you “build a function that does something like what you want in_category to do, which would work by using bp_activity_get_meta to get the category that you recorded when the blog post was saved”?
Thx @Xevo, we are trying to add the class using this code:
class="<?php if ( in_category(1)) { echo "cat_a"; } elseif ( in_category(2)) { echo "cat_b"; } else { echo 'cheese';} ?>"
Obviously not working, but as you say, BP doesn’t seem to pass the category with the rest of the post info.
Any ideas how to create a function to do that?
Bump. Any ideas anyone?
The .htaccess solution posted above is working sweet for us.
Actually, because our site has such a wide niche and entices people to speak their mind, not sure that we want anyone from a proxy IP to have access anyway, so this kills two birds….
Hey @modemlooper;
I’d like to know how you do that… I’m trying to alter the layout of the updates on our (child theme) activity stream page at http://www.hypergripe.com/activity/ so that when a blog update is mentioned, the permalink to the blog post is on the next line and bolded, or in an h3 tag or something to look like a blog title – (the way the code is now the second link does not have a css identifier, and adding css to that specific link is impossible – i think).
I tried to alter the core bp-blogs.php file on line 433 and line 468, where it SEEMS the code for the activity stream is getting generated, but when I change this line:
$activity_action = sprintf( __( '%s wrote a new blog post: %s', 'buddypress' ), bp_core_get_userlink( (int)$post->post_author ), '' . $post->post_title . '' );
to this:
$activity_action = sprintf( __( '%s wrote a new blog post: %s', 'buddypress' ), bp_core_get_userlink( (int)$post->post_author ), '
' . $post->post_title . '' );then upload it, there is no change on the activity stream page….
I’m baffled. Ya, I know I’m changing core files – I’ve customized a few core files but have made a schedule of changes for future updates – or until there are gentler fixes.
Thanks in advance – your participation in other threads has been very helpful!
Success!
JJJ – I implemented your fix mentioned above and here: https://trac.buddypress.org/ticket/1970
*****
bp-core-avatars.php line 389
Replace
if ( !$path = get_option( 'upload_path' ) )<br />
$path = WP_CONTENT_DIR . '/uploads';<br />With:
if ( !$path = get_option( 'upload_path' ) )<br />
$path = WP_CONTENT_DIR . '/uploads';<br />
else<br />
$path = ABSPATH . $path;</p>
<p>and then in “Settings >> Miscellaneous” simply kept “Store uploads in this folder” as wp-content/uploads and in “Full URL path to files” added the full url path of the uploads folder: http://www.yoursite.com/wp-content/uploads
Worked beautifully! Thanks so much all for all your help!!
Hey All – Thanks for your help.
I found exactly what I was looking for here: https://wordpress.org/extend/plugins/post-from-site/
This plugin lets users make posts “from the site” rather than going int the dashboard or admin.
It is a very sweet popup interface that lets users create post title, content, upload images, add tags, etc, and is fully configurable. I ‘ve tried it out and really like it so far….
BTW, I am using WP 2.9.2 and BP 1.2
Thanks Paul!
I have switched to the default theme, but cannot figure out how a user would make a blog post?? Suggestions? http://www.hypergripe.com –
Thanks again…
Hey JJJ;
I would like to reiterate that @etiviti (rich!) posted a potential solution earlier, but I can’t figure out how/where to implement it in the bp core files.
I am having the same problem that the avatar image is not being displayed, but when checking the code, (and using firebug) it is clear there is a simple ‘/’ missing from the image url path:
PAGE SOURCE CODE WAS:
<h5>Crop Your New Avatar</h5>
<img id="avatar-to-crop" class="avatar" alt="Avatar to crop" src="wp-content/uploads/avatars/1/paul23.jpg"/>
<div id="avatar-crop-pane">
<img id="avatar-crop-preview" class="avatar" alt="Avatar preview" src="wp-content/uploads/avatars/1/paul23.jpg"/>
</div>
Notice there is no ‘/’ before the wp-content in the image src= call.
SOURCE CODE SHOULD BE:
<h5>Crop Your New Avatar</h5>
<img id="avatar-to-crop" class="avatar" alt="Avatar to crop" src="/wp-content/uploads/avatars/1/paul23.jpg"/>
<div id="avatar-crop-pane">
<img id="avatar-crop-preview" class="avatar" alt="Avatar preview" src="/wp-content/uploads/avatars/1/paul23.jpg"/>
</div>
When I add the slash in front of wp-content in the src= call, the image(s) appear. Problem is, I can’t figure out how to get the core files to display the src= url properly.
PLEASE HELP US ALL!!!