Skip to:
Content
Pages
Categories
Search
Top
Bottom

Hello from Japan! How to remove the anchor tag…


  • yoosuke
    Participant

    @yoosuke

    Hello from Japan!
    bbpress is great!

    Well, I’m in trouble.
    so I would appreciate if you help me.

    1.
    By default, an anchor tag is given to texts of “freshness“. like…

    <a>2hours, 1minute ago</a>

    To remove the anchor tag from freshness texts, which files should I modify ?
    Could you please tell me a path to get to the file?

    2.
    By default, a comma is used in display of “freshness”. like..

    2hours,(←here!) 1minute ago

    I want to also remove the comma.
    In this case, a file to be modified will be the same as the file described above?

    Thanks for reading,
    and I’m looking forward to your reply…

    WordPress: ver3.9.1
    bbPress: ver2.5.3

Viewing 4 replies - 1 through 4 (of 4 total)

  • Robin W
    Moderator

    @robin-w

    you will need to filter two functions

    1. bbp_get_forum_freshness_link

    2. You will need to amend the freshness function

    Layout and functionality – Examples you can use

    I have no idea how into coding you are, so come back and let me know so that I can help you further

    How much php do you know
    do you know how to edit files
    do you know how to ftp


    yoosuke
    Participant

    @yoosuke

    I really appreciate your response!
    bbPress support is great!

    I’ve worked for about 3years as a Web designer.
    So, I can understand HTML and CSS3,
    and how to edit and ftp files as well.

    For php, I learned the just basics before.
    So, I can read basic php codes,
    but I can’t write php codes by my own.

    Thanks for telling URL “Shorten freshness wording”.
    The codes should be helpful for me.
    However, I have no idea to customize the codes to get to my Two goals…


    Robin W
    Moderator

    @robin-w

    ok, so

    //function to remove the comma
    function change_comma_time($output) {
    $output = preg_replace( ‘/[,]/’ , ‘ ‘ , $output );
    return $output;
    }
    add_filter( ‘bbp_get_time_since’, ‘change_comma_time’ );
    add_filter(‘bp_core_time_since’, ‘change_comma_time’);

    will take out the commas. You need to add this to your functions file and

    ‘function custom_get_forum_freshness_link() {
    $time_since = bbp_get_forum_last_active_time( $forum_id );
    $anchor = $time_since ;
    return $anchor ;
    }

    add_filter( ‘bbp_get_forum_freshness_link’, ‘custom_get_forum_freshness_link’ );’

    will take out the link

    You will need to add these to your functions file.

    Come back if you need further help


    yoosuke
    Participant

    @yoosuke

    Wow! At last!

    I could solve all problems of mine!
    It is thanks to you, Mr Robin W!

    Well, yesterday I came up with new ideas.
    And I tried, but It’s too hard for me to make it.

    So, Would you please advice me one more time?

    I’ve made ​​a new topic.(here)

    many thanks…

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Skip to toolbar