Skip to:
Content
Pages
Categories
Search
Top
Bottom

Editing Blog Post Titles in Activity

  • Profile photo of Bülent Sakarya
    sakarya
    Participant

    @sakarya

    Hello.

    I’m tring edit blog posts title in activities. Normally blog posts titles like this in activities:
    sakarya (member name) wrote a new blog post: 2010 ALES ?lkbahar Dönemi S?nav? Soru ve Cevaplar? (blog title) 5 hours, 28 minutes ago · Delete
    I want only show “2010 ALES ?lkbahar Dönemi S?nav? Soru ve Cevaplar?” for blog posts.

    This is my code; http://pastebin.com/rfUxHsYy

    I’ve problem with permalink. Which function i must use for permalink.

    I’ve tried these: bp_activity_get_permalink(), bp_activity_permalink()

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Profile photo of rich! @ etiviti
    rich! @ etiviti
    Participant

    @nuprn1

    you can override the $activity_action via the filter `bp_blogs_activity_new_post_action`
    https://trac.buddypress.org/browser/tags/1.2.5.2/bp-blogs.php see line 416

    Profile photo of Bülent Sakarya
    sakarya
    Participant

    @sakarya

    Thanks @rich! @ etiviti but i don’t know php. May you help. Thanks.

    Profile photo of Bülent Sakarya
    sakarya
    Participant

    @sakarya

    After my first post, i’ve added some code my entry.php;

    New entry.php is here: http://pastebin.com/Vz5A8SyJ

    But with this code i must add a custom field which name is url, all my posts. And i’ve 306 posts on my blog and i don’t want to it. (I’ll install buddypress a live site using wordpress)

    Is there any way to take the post permalink?

    Profile photo of rich! @ etiviti
    rich! @ etiviti
    Participant

    @nuprn1

    something like this, untested but you add it to a functions/custom php file and this will change the text in the activity steam (new posts, not retro active)

    `
    function my_blogs_activity_new_post_action( $content, &$poststuff, $permalink) {
    return ‘‘ . $poststuff->post_title . ‘‘;
    }
    add_filter( ‘bp_blogs_activity_new_post_action’, ‘my_blogs_activity_new_post_action’, 1 ,3 );
    `

    Profile photo of Bülent Sakarya
    sakarya
    Participant

    @sakarya

    yes, it works.. Thanks a lot..

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Editing Blog Post Titles in Activity’ is closed to new replies.
Skip to toolbar