Topic RSS
It's in the code above (the actual function) which uses an SP hook.
See our wiki for details.
In the actiity stream overview.
When you click the VIEW activity (as in view the given forum post) button in activity stream, it takes you to an activity display, and not the actual forum/post. Is there a way to make the VIEW button, take the user to the actual post or make the title/heading of the post in the activity stream, function as a link in the activity stream?
4:46 pm
This might be an easy question.. 
Works great! Thanks to the author for sure.
As it stands now, when notification of a forum post is inserted into the stream, it looks like this:
stang5_0 created the topic Get points for posting in the forum and replying: sometime ago ·
With it like that, forum posts are always at the top, where with a normal activity, is has a time stamp such as:
stang5_0 [Image Can Not Be Found] posted a tweet: 4 hours, 9 minutes ago ·
Is there a parameter I can add to the call or something that will allow for a time stamp as opposed to whatever it is doing?
Thank you,
Stang
Made some progress. Now when you filter activity in buddypress it's under "Show Forum Replies".
I have it set up so you can't reply to forum topics/blog posts/blog comments in the activity feed. So people can't reply to your forum post in the activity feed. Which can get confusing.
Anyway, last piece of the puzzle is a direct link to the post. So I'm using $directURL as a test and it is pointing to Google. So how do a put in the permalink to the post in simple press forum?
After some more thought .. wouldn't this post to the activity feed even if the forum is only for certain members/levels?
function sf_hook_post_save($newpost, $action){global $bp;$activity = new BP_Activity_Activity();$date_recorded = date('Y-m-d H:i:s', strtotime('+6 hours'));$user_fullname = bp_core_get_user_displayname($newpost['userid']);$username = bp_core_get_username($newpost['userid']);$directURL = 'http://www.google.com';$topic_title = sf_get_topic_name_from_id($newpost['topicid']);//$topic_title = $newpost['topic_slug'];$mycontent = $newpost['postcontent'];$max_length = 300;if(strlen($mycontent) > $max_length){$mycontent = substr($mycontent,0,$max_length);$mycontent = $mycontent . ".....";}if ($action=="topic") { $the_action = " created the topic "; } else { $the_action = " posted in the topic "; }$activity = new BP_Activity_Activity ();$activity->user_id = $newpost['userid'];$activity->component = "simplepress";$activity->type = "new_forum_post";$activity->action = ''.$user_fullname.'' . $the_action . '' . $topic_title . ':';$activity->content = $mycontent;$activity->primary_link = $directURL;$activity->secondary_item_id = '';$activity->date_recorded = $date_recorded;$activity->hide_sitewide = 0;$activity->save ();return;}
That did it! 
add
global $current_user;
and then where you want to check, add
if ($current_user->sfaccess)
{
// allowed stuff here
} else {
// whoops no access
}
basically, sfaccess is a permission check for permission to view current forum…
Just as an FYI, I have uninstalled BuddyPress and I am running solely on Wordpress and Simple:Press Forum. BuddyPress just didn't add anything to my community.
Visit the Twitter Poker Tour Forum to see my Simple-Press implementation
Most Users Ever Online: 444
Currently Online: SPQC, joelrob
56 Guest(s)
Currently Browsing this Page:
3 Guest(s)
Top Posters:
-Radio-: 1251
Lee H: 606
Luffer: 535
Conrad_Farlow: 502
jim: 478
neon: 263
ovizii: 240
Tal: 240
Member Stats:
Guest Posters: 2626
Members: 7363
Moderators: 1
Admins: 2
Forum Stats:
Groups: 5
Forums: 16
Topics: 10898
Posts: 79583
Newest Members: Rick Thomas, joelrob, ndc, MacBravO, irlandes1, triphop, betokan, Jonathan Yovani Muñoz, somosguatemala, ahcreate
Moderators: Brandon C (162)
Administrators: Yellow Swordfish (22240), Mr Papa (23688)
Log In
Register
Home
Add Reply
Add Topic
Offline


Quote


Visit 
Privacy Policy



