Images in wire
-
Is it possible to allow img tags to be allowed and interpreted on wire posts? I’d really like to get that on the wire
-
In the realm that anything is possible, yes.
But currently the activity feed strips out any html and anything it thinks is an image. Mostly to avoid mucking up the feed with huge images, etc…
The best answer I have for this for now, is that BP1.0 is the jumping off point without too many bells and whistles. It shows how to intertwine WordPress MU installs together to become a basic social networking structure. In theory you could certainly add all sorts of activity feed filters and ajax and images and fancy things to it, but there is no on/off option for images.
Could you point me in the right direction in adding a new activity feed filter?
A new filter, like adding a new action to the activity feed? Or a new filter, like adjusting the way that the feed filters information?
Either way, you could start at bp-activity/bp-activity-filters.php and see if that gets you what you’re looking for?
I will take a look. Thanks for your help John.
Allowing if someone wants to post an image to a wire with the <img> tag, it wont get striiped out and so it will show up in the activity feeds
I added this to my bp-custom.php hoping it would fix my issue.
<?php
function my_allowed_tags($allowedtags){
$allowedtags['img'] = array();
return $allowedtags;
}
add_filter( 'edit_allowedtags', 'my_allowed_tags' );
add_filter( 'bp_get_activity_content', 'my_allowed_tags' );
add_filter( 'bp_get_wire_post_content', 'my_allowed_tags' );
?>that should be wrong :S
it should be like that:
function my_allowed_tags($allowedtags){
$allowedtags .= <img>;
return $allowedtags;
}
add_filter( 'edit_allowedtags', 'my_allowed_tags' );
add_filter( 'bp_get_activity_content', 'my_allowed_tags' );
add_filter( 'bp_get_wire_post_content', 'my_allowed_tags' );anyway try bpdev tinymce it should do what want
Can this display images or media in the activity feeds like facebook newsfeed or what?
Thanks Nicola. I will try that. I do have your Tiny MCE editor plugin installed but it does not support images from what I can see.
Thanks
@Roy McKenzie The Tiny MCE editor plugin needs advance features for media and activity feeds needs media enabled
@Gpo1 Am I correct in guessing that both of these options are not available at the current moment?
Hey @Nicola. I tried
function my_allowed_tags($allowedtags){
$allowedtags .= <img>;
return $allowedtags;
}
add_filter( \'edit_allowedtags\', \'my_allowed_tags\' );
add_filter( \'bp_get_activity_content\', \'my_allowed_tags\' );
add_filter( \'bp_get_wire_post_content\', \'my_allowed_tags\' );It didn\’t work because i didnt have quotes around <img> so i tried
$allowedtags .= \'<img>\';
and
$allowedtags .= \'img\';
but no dice! the last one did show \’img\’ in the wire when
<img src=\"http://whatever.com/image.jpg\">
was published.
We need this sorting like Facebook news feed?
Didn’t work for me either… it’s boring without images, is there any way to display them?
@Avazbek, Your right its boring without images, we need this sorted like FB newsfeed !
Agreed!!! Life doesn’t just happen textually
- The topic ‘Images in wire’ is closed to new replies.