tapiohuuhaa (@tapiohuuhaa)

Forum Replies Created

Viewing 25 replies - 1 through 25 (of 37 total)

  • tapiohuuhaa
    Participant

    @tapiohuuhaa

    img.avatar {
    display : none ;
    }

    You must define selector before img.avatar
    For topic list:
    body.single-forum #bbpress-forums img.avatar
    body.bbp-view #bbpress-forums img.avatar

    For forum list:
    body.forum-archive #bbpress-forums img.avatar

    In reply to: Custom Topic Sorting

    tapiohuuhaa
    Participant

    @tapiohuuhaa

    Exactly I think this code:

    function my_custom_display_topic_index_query () {
    global $_GET;
    if($_GET[‘myOrderBy’])$myOrderBy=$_GET[‘myOrderBy’];else $myOrderBy=’last_edited’;
    if($_GET[‘myOrder’])$myOrder=$_GET[‘myOrder’];else $myOrder=’DESC’;
    $args[‘orderby’] = $myOrderBy;
    $args[‘order’] = $myOrder;

    return $args;
    }
    add_filter(‘bbp_before_has_topics_parse_args’, ‘my_custom_display_topic_index_query’ );

    function printSelections(){
    global $_SERVER;
    return ‘<div class=”queries”><form action=”https://&#8217; . $_SERVER[‘HTTP_HOST’] . $_SERVER[‘REQUEST_URI’].'”><table class=”querytable”><tr><td><select name=”myOrderBy”><option value=”post_modified”>Viimeisin muutos</option><option value=”post_date”>Luontipäivä</option><option value=”post_title”>Nimi/option><option value=”post_author”>Tekijä/option></select></td><td><input name=”myOrder” type=”radio” value=”DESC” />Laskeva</td><td><input name=”myOrder” type=”radio” value=”ASC” />Nouseva</td></tr></table></form>’;
    }

    add_shortcode( ‘printSelections’, ‘printSelections’ );
    // Add do_shortcode(‘printSelections’); to loop-forums.php
    <li class=”bbp-header”>

    <ul class=”forum-titles”>
    <li class=”bbp-forum-info”><?php _e( ‘Forum’, ‘bbpress’ ); ?><?php topPostLinksEcho(); ?>
    <li class=”bbp-forum-topic-count”><?php _e( ‘Topics’, ‘bbpress’ ); ?>
    <li class=”bbp-forum-reply-count”><?php bbp_show_lead_topic() ? _e( ‘Replies’, ‘bbpress’ ) : _e( ‘Posts’, ‘bbpress’ ); ?>
    <li class=”bbp-forum-freshness”><?php _e( ‘Freshness’, ‘bbpress’ ); ?>

    <?php do_shortcode(‘[printSelections]’); ?>

    In reply to: Custom Topic Sorting

    tapiohuuhaa
    Participant

    @tapiohuuhaa

    I found this also:

    function my_custom_display_topic_index_query () {
    $args[‘orderby’] = ‘date’;
    $args[‘order’] = ‘DESC’;

    return $args;
    }
    add_filter(‘bbp_before_has_topics_parse_args’, ‘my_custom_display_topic_index_query’ );

    You wrote that buttons for that would be complicated, but if I reload the page and use GET-parameters, this way, would this work:

    function my_custom_display_topic_index_query () {
    if($_GET[…]==…) $myOrder=’date’; elseif(…) //or switch – then used a select box)
    if ($_GET[‘descAsc’]==…) $descAsc=’DESC’;
    $args[‘orderby’] = $myOrder;
    $args[‘order’] = $descAsc;

    return $args;
    }
    add_filter(‘bbp_before_has_topics_parse_args’, ‘my_custom_display_topic_index_query’ );

    Buttons or select box would be inside the template and it gets the current webaddress and add desired parameters. If I add also cookies, the change would not need to do every time.


    tapiohuuhaa
    Participant

    @tapiohuuhaa

    Ok. thank’s. I look at the filter.


    tapiohuuhaa
    Participant

    @tapiohuuhaa

    I just too would like to add 1-3 buttons to the forum topics listing in order to change the default order. I would code it to changed template, if I would know what functions to use.

    In reply to: list of all functions

    tapiohuuhaa
    Participant

    @tapiohuuhaa

    Because there seems not a complete list, is there for forum list page something like bbp_is_single_topic()

    I would like to add some conditional code for https://www.sanaristikkofoorumi.net/wordpress/forums/ .
    i quessed that it might be “bbp_is_forum_list()”


    tapiohuuhaa
    Participant

    @tapiohuuhaa

    This helped also me. I asked about this issue also in bbp style pack forum.

    In order to get rendered only in single topic page, I used

    function newTopic3(){
    echo… // something before
    echo bbp_forum_permalink();
    echo … // something after, includes #new-post
    }
    add_action( ‘bbp_template_before_single_topic’ , ‘newtopic3’);


    tapiohuuhaa
    Participant

    @tapiohuuhaa

    I used google search “forum topic get forum” and get this page. Hopefully I get help.

    If I’m in some topic, I would like to get link with the anchor #new_post to the forum, which the topic relates with.

    I assume that this somewhat relates with to the first question because this relates also with forum and topic names.

    I don’t figure how to get for forum_link($topic->forum_id); the id of the topic.

    I would use Code Snippet for adding link.

    In reply to: bbPress Moderation

    tapiohuuhaa
    Participant

    @tapiohuuhaa

    In reply to: bbPress Moderation

    tapiohuuhaa
    Participant

    @tapiohuuhaa

    Thank’s Robin about the Code Snippet suggestion. I can add to HEAD some own code easily.
    I asked https://wordpress.org/support/topic/code-before-the/ about an ssue.

    In reply to: bbPress Moderation

    tapiohuuhaa
    Participant

    @tapiohuuhaa

    I added https://wordpress.org/support/topic/support-translations/#post-11118819

    in order to help another Finnish user of that plugin.

    In reply to: bbPress Moderation

    tapiohuuhaa
    Participant

    @tapiohuuhaa

    Get working with the plugin. I just changed one text, which was not in the report.php file.
    Next time when I update the plugin I must add translation as code snippets.
    Thank’s.
    Yes, I don’t understand, what is child theme function.php file.
    I have used twentyfourteen. I don’t have any child theme for it but the theme does have function.php.

    BTW. A Finnish user had complained in the conversation page of the plugin moderation-tools-for-bbpress about the same issue (I saw from the nickname that the person was Finnish).

    In reply to: bbPress Moderation

    tapiohuuhaa
    Participant

    @tapiohuuhaa

    I got all other front end texts translated into Finnish using *.po(t) files except text of moderation-tools-for-bbpress.

    In reply to: bbPress Moderation

    tapiohuuhaa
    Participant

    @tapiohuuhaa

    Sorry about my inappropriate words, but I just assumed that if some text is used for ordinary participants, the text should IMO be translate able.

    If there is no translation using po/mo-files then fields to set the desired text like in bbp_style_pack. Indeed that doesn’t work with multilingual sites if there is not another installation or WordPress for other languages (I don’t have looked, how WordPress could work with multilingual sites).

    I don’t figure which function file Robin W. means. Many plugins has the functions.php file.
    moderation-tools-for-bbpress does not have functions.php (like for example bbp_style_pack or the used theme has).

    In reply to: bbPress Moderation

    tapiohuuhaa
    Participant

    @tapiohuuhaa

    At least report.php should be able to translate because those relate with front end user.
    All backend features can be in English.

    In reply to: bbPress Moderation

    tapiohuuhaa
    Participant

    @tapiohuuhaa

    Those can’t translate – those has FIXED texts. I must directly edit the text. :(.

    Developers have been extremely lazy!

    In reply to: bbPress Moderation

    tapiohuuhaa
    Participant

    @tapiohuuhaa

    How to get front-end texts translated in Finnish? moderation-tools-for-bbpress

    does not have any *.po or *.pot files.
    These should get translated:
    * approved
    * report
    * report reason + all related options


    tapiohuuhaa
    Participant

    @tapiohuuhaa

    Sorry about last post – Finally I found this topic and I put the temporary fix working again.


    tapiohuuhaa
    Participant

    @tapiohuuhaa

    You can see the differency here
    https://www.sanaristikkofoorumi.net/wordpress/forums/forum/sanaristikot/suomen-kuvalehti/

    On the right bottom corner of the main menus is (double) arrow down, which has the link
    #new-post

    That goes to the right place

    Clicking + ALOITA UUSI KESKUSTELU
    goes
    https://www.sanaristikkofoorumi.net/wordpress/forums/forum/sanaristikot/suomen-kuvalehti/#bsptopic

    That goes a little bit too far.


    tapiohuuhaa
    Participant

    @tapiohuuhaa

    A request.

    When you update your plugin, IMO would be better to forward the “Create New Topic” link to #new-post.
    Now I must go back to set the title. Forwarding to #new-post I get the title field.


    tapiohuuhaa
    Participant

    @tapiohuuhaa

    sorry – there was some delay. Works as expected! Thank’s


    tapiohuuhaa
    Participant

    @tapiohuuhaa

    I added it to the end of the functions.php of bbp style pack. No chage.


    tapiohuuhaa
    Participant

    @tapiohuuhaa

    The back button would be nice on the bottom of the page just above the footer part of page. It would not needed on the top of the page. Alternatively breadcrumbs would be duplicate on the bottom of the page.

    See a XenForo forum:
    https://www.matkapuhelinfoorumi.fi/threads/tablettia-ostamassa-mikä-tabletti-hankinnassa.65833/


    tapiohuuhaa
    Participant

    @tapiohuuhaa

    I have searched a way to get this better too. I know that breadcrumb can be used. I added also a manual made menu to the footer-part of the page.

    Still back button would be nice. Also back button from single discussion to the forum, which lists topics.

    If that could be done, that could be added to the bbp style pack plugin?


    tapiohuuhaa
    Participant

    @tapiohuuhaa

    The small problem is that in the second link, the anchor has been stripped off.

Viewing 25 replies - 1 through 25 (of 37 total)