Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 1,926 through 1,950 (of 32,481 total)
  • Author
    Search Results
  • #218174
    athep
    Participant

    Are there buttons or individual links for the subscription link? a substitute to this

    
    <?php echo bbp_get_forum_subscription_link( array( 'before' => '', 'subscribe' => 'Subscribe', 'unsubscribe' => 'Unsubscribe' ) ); ?>
    

    I tried modifying this but all I could change was the string and that wouldn’t work well also, I’d add icons to the strings and they’d disappear once the toggling starts.

    I’d like to wrap two buttons in a an if statement once I get those individual subscription buttons, if there are any that is

    athep
    Participant

    I don’t have a code for this but basically I’d like to see the pagination of topics ahead of me and the others behind me. For example

    
    Topic 1 link
    Topic 2 link
    Topic 3 link <----- I'm here
    Topic 4 link
    Topic 5 link
    

    And once I click on let’s say topic 5 then I’d get:

    
    Topic 3 link
    Topic 4 link
    Topic 5 link <----- I'm here
    Topic 6 link
    Topic 7 link
    

    Apologies in advance, I couldn’t get to code this, I don’t know where to start thus the lack of a snippet

    #218163
    athep
    Participant
    Fatal error: Uncaught Error: Cannot use a scalar value as an array in ..\wp-content\plugins\bbpress-post-topics\index.php:924
    Stack trace: #0 ..\wp-includes\class-wp-hook.php(287): bbppt_activate('')
    #1 ..\wp-includes\class-wp-hook.php(311): WP_Hook->apply_filters('', Array)
    #2 ..\wp-includes\plugin.php(484): WP_Hook->do_action(Array)
    #3 ..\wp-admin\plugins.php(193): do_action('activate_bbpres...')
    #4 {main} thrown in ..\wp-content\plugins\bbpress-post-topics\index.php on line 924

    Edit: formatted for readability

    Robin W
    Moderator

    if so it is being caused by line 62 of et-divi-customizer-cpt-global-16127219190526.min which says

     .et-db #et-boc .et-l .et_pb_section {
      padding:54px 0; 
     }
    
    #218159
    athep
    Participant

    I can’t see to get <?php comments_template(); ?> to work, it only outputs the string comments are closed. The plugin ‘bbPress Topics for Posts’ could’ve helped buy I’m getting an error when I activate it.

    Is there a way I could enable comments on/under forum or topic pages?

    #218151
    Robin W
    Moderator

    ok,

    so if I am understanding, you have bbpress template files in your child theme under a folder called bbpress

    These are just templates which can be amended to get the look you want, which is obviously what tyhe multinews theme has done.

    so if correct you have 3 choices

    • stay with the new files and lose the presentation you had
    • go back to the old files – if they work, they are just templates and should be fine
    • work out which templates are causing the issue and look to update these to any new code (which would require you to understand some php)
    • If everything was working, then I’d suggest you go back to the old files.

    #218138
    Robin W
    Moderator

    sorry shoudl be != means not equal

    $role = bbp_get_user_role( $user_id );
    if ($role != 'bbp_blocked' && $post_count > 4)
    #218137
    mllapan
    Participant

    Thanks again for the answer.
    Your code check if user is blocked.

    Should I write like if ($role == 'bbp_keymaster' || $role == 'bbp_moderator'|| $role == 'bbp_participant'|| $role == 'bbp_spectator' && $post_count > 4)

    Or I can use ! as counter statement to blocked somewhere in your code?

    #218136
    Robin W
    Moderator
    $role = bbp_get_user_role( $user_id );
    if ($role == 'bbp_blocked' && $post_count > 4)
    #218074
    neon67
    Participant

    I m using the Loco plugin for translation – there you can insert new words that are not in the 100%-translation list.

    In this case, if these words are not important to you, prohibit through css display: none

    #218066
    emanibr
    Participant

    Please check the red boxes are still not translated
    I tried to change the main code for translation
    https://drive.google.com/file/d/1FvUTGZoBl5etnrzeyjeDMTrM_zaSlIOK/view?usp=sharing

    #218039
    SirLouen
    Participant

    Hey @robin-w Tested but not working 🙁
    What can be failing in your idea?

    This doesn’t work either 🙁

    Remove NoFollow from BBPress Posts

    Will have to review the code and what’s going on with that filter nowadays

    anhduc.bkhn
    Participant

    My env:

    WooCommerce version: 4.9.0
    WordPress version: 5.6
    PHP version: 7.4.14
    MySQL version: 5.7.31
    
    Plugin:
    bbp style pack: 4.7.2
    bbPress: 2.6.6
    Easy WP SMTP: 1.4.4

    The feature “Notify me of follow-up replies via email” does not work on my site.
    I tested: go to Settings->bbp-style-pack->Subscriptions Emails -> 9. Send test email, click on ‘Send test email(s)’, but it still does not work.

    Pls guide me on this.

    purityboy83
    Participant

    Oh! mistake
    did not close the tag “< / a>”

    $replacement = '<a href="$1" rel="prettyPhoto"><img src="$1"/>';
    
    to
    
    $replacement = '<a href="$1" rel="prettyPhoto"><img src="$1"/></a>';
    purityboy83
    Participant

    Hi

    i finally solved it with your idea, and i modified the function a little bit

    function add_image_responsive_class($content) {
        global $post;
        $pattern ="/<img src=\"(.*?)\"(.*?)>/i";
        $replacement = '<a href="$1" rel="prettyPhoto"><img src="$1"/>';
        $content = preg_replace($pattern, $replacement, $content);
        return $content;
    }
    add_filter ('bbp_get_reply_content', 'add_image_responsive_class');
    add_filter ('bbp_get_topic_content', 'add_image_responsive_class');

    thanks

    Best Regards,
    Hyunho

    neon67
    Participant

    The easiest way is to install the GD attachments plugin – and in the settings note something like a class = ”my-class” rel = ”prettyPhoto”
    In addition, your WP must have a lightbox mechanism on board – there are many lightbox plugins in the repository. This script will to command light box style when you click on the picture.

    But I went the other way – I added a class with a new relay through the filters – and the lightbox mechanism is already built into my bbp-theme. This also works.

    #218000
    chieleijt
    Participant

    Found it. Download the plugin: bbpress do shortcodes

    #217999
    chieleijt
    Participant

    But where can you enable shortcodes? I also have this problem with the polls.

    #217987
    athep
    Participant

    For anyone looking for a solution, it’s as simple as calling

          <?php
            echo '<pre>';
            print_r(bbp_get_moderators(bbp_get_forum_id()));
            echo '</pre>';
          ?>

    Or you could echo bbp_get_moderator_list(bbp_get_forum_id()); for a simple list of moderators. Remember to put it inside the loop!

    #217980
    Julia
    Participant

    I could get the code to set on the thumbnails in the topic index page using GD bbPress Attachments.

    
    function action_bbp_topic_row_actions() { 
    
        $medias = get_attached_media( 'image', bbp_get_topic_id() );
        
        foreach($medias as $media){
        the_attachment_link( $media->ID,false );
        }
    } 
    add_action( 'bbp_theme_before_topic_title', 'action_bbp_topic_row_actions', 10, 0 ); 
    
    #217979
    Julia
    Participant

    Add other method.
    I have succeeded to set the images on topic index page.
    but I have no idea to change images to thumbnails.

    Do you have any ideas for thumbnails?

     
    function action_bbp_topic_row_actions() { 
       if ( have_posts() ) while ( have_posts() ) : the_post();
      
        $medias = get_attached_media( 'image', bbp_get_topic_id() );
        foreach($medias as $media){
          the_attachment_link( $media->ID );
        }
       endwhile;
      }
    add_action( 'bbp_theme_before_topic_title', 'action_bbp_topic_row_actions', 10, 0 ); 
    
    #217974
    athep
    Participant

    Hello,

    I’m trying to get a list of the current forum’s moderators, I have this argument that filters all the users and lists me all the moderators from all the other forums.

    $args = array( 'role' => 'bbp_moderator');

    The above code lists all of the moderators from all the forums, I only want the moderators of the current forum, any parameters or snippet that could help me?

    #217973
    Julia
    Participant

    The bbress Support 7 years ago. Topic Thumbnails?

    
    add_action( 'bbp_theme_before_topic_title', 'assylumn_insert_thumbnail' );
    function assylumn_insert_thumbnail() {
    	echo('<a href="http://www.mysite.com/wp-content/uploads/2013/09/picture.jpg">') ; 
        echo('<img class="bbp-topic-thumbnail"  width="100%" style="max-width: ' . get_option('thumbnail_size_w') . 'px; max-height: ' . get_option('thumbnail_size_h'). 'px; vertical-align:middle;" src="http://www.mysite.com/wp-content/uploads/2013/09/picture.jpg"/>' .'</a>');
    	}
    

    I did not know how to get the url in each topic pictures using plugin, GD bbPress Attachments.
    Please show me other code to get the url in the topic pictures.

    #217949
    Robin W
    Moderator

    yes, strtotime(‘now’) will pick up gmt, so needs adjusting, you night want to look at

    $now = date_create( date_i18n( 'Y-m-d H:i:s' ) );

    #217947
    neon67
    Participant

    So, the final css looks like this (you must put “a”)

    #bbpress-forums .bbp-topic-freshness .dayfresh  a {
    background-color : #f4ffe8 ;
    	border: 1px dashed;
    	color: #475656;
    }

    also 86400 looks a lot – captures the 2nd day. Perhaps need to set 23 hours. But these are little things ))

    Thanks to Robin for the great code!))
    I think this is a useful find for those who visit the forum once a day and immediately see how many topics have been updated in the last day.
    Colored blocks are very noticeable – it’s better than straining and peering at the date numbers.

Viewing 25 results - 1,926 through 1,950 (of 32,481 total)
Skip to toolbar