Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 10,801 through 10,825 (of 32,511 total)
  • Author
    Search Results
  • #151147
    Robkk
    Moderator

    ok heres the code

    .widget_display_stats  dt, .widget_display_stats  dd {
    	text-align: center;
    }
    
    .widget_display_stats dd {
    	background:#CCC;
    	padding: 5px;
    	margin-top: 5px;
    	color: #222;
    }

    category tags and forums number

    if your talking about whats in the stats widget

    just copy content-statistics.php into your child theme if you havent already.

    and edit the file and remove what you want.

    #151146
    divyesh25
    Participant

    Hi robin,

    i want list that all topics since user last visit to site, so for that some how i am update user last activity date and time and when user logged in next time i am get that date and time. so using this date & time i want to list topics since last visit of user.

    i hope u got it what i want to say. the code is below. if i do any mistake please suggest me.

    if u have better solution then please suggest me.

    thanks

    <?php$week = date( ‘W’ );
    $year = date( ‘Y’ );?>
    <?php if ( bbp_has_topics(‘author’ => 0, ‘order’ => ‘DESC’, ‘post_parent’ => ‘any’,’year’ => $year, ‘&w’ => $week) ) : ?>
    <?php while ( bbp_topics() ) : bbp_the_topic(); ?>
    <?php bbp_get_template_part( ‘loop’, ‘single-topic’ ); ?>
    <?php endwhile; ?>
    <?php else : ?>
    <?php bbp_get_template_part( ‘feedback’, ‘no-topics’ ); ?>
    <?php endif; ?>

    #151143
    Robin W
    Moderator

    You explain me in detail with code?

    Can you explain what you are trying to do and where on your site eg put a shortcode on the front page, add a widget that does this etc.

    #151142
    divyesh25
    Participant

    hi Robin,

    thanks for reply.. i am implemented your suggestion, but not getting result. can You explain me in detail with code?

    thanks

    LoraLu
    Participant

    I am attempting to use the shortcode [bbp-forum-form] to allow users (keymasters) to be able to add new forums as needed. I set up a new page and added this shortcode. The page looks great and the shortcode pulls up the form to add a new forum (as desired). However, when I test it by filling out this form and clicking submit, nothing seems to happen. The page does seem to refresh but a new forum is not added.

    Am I missing something? I am new to bbpress so perhaps I just missed a setting somewhere? I am running the latest version of WordPress (3.9.2) and bbPress 2.5.4. My site URL is http://wwcustomercare.azurewebsites.net.

    Thank you in advance for your help!
    Lora

    Robin W
    Moderator

    you’d do better to just steal the replies widget I wrote for private groups

    download

    https://wordpress.org/plugins/bbp-private-groups/

    and then open up and edit

    includes/pg_forum_widgets.php

    line 464 onwards has the replies widget, I’m pretty sure that lines 539 to 542

    //PRIVATE GROUPS Get an array of IDs which the current user has permissions to view
            $allowed_posts = private_groups_get_permitted_post_ids(new WP_Query($query_data));
            // The default forum query with allowed forum ids array added
            $query_data['post__in'] = $allowed_posts;
    

    is all that’s added to the orginal code, so remove those lines.

    and line 574 contains the size

    you can just fork all that to the end of the file into your functions file

    Robkk
    Moderator

    ok i think i have found an alternative to styling the recent replies widget better.

    your topic archive shortcode plugin, i bet i can edit that to create a new recent replies widget

    but the only thing i need help on is how to not show topics that have no replies at all.

    what would i need to add to your plugin to do that?

    Robin W
    Moderator

    I’d suggest that you

    1. create a test site (which everyone should have in nay case !)

    and

    2. Google sql tutorial video, and work out how to code my statements

    3. go into phpmyadmin on your test site and play until you get it right

    4. Come back and post the resultant code to help others

    sorry, but almost all of the stuff I have learn’t has been by spending time googling to find some examples, and then hours getting it to work 🙂

    #151119

    In reply to: registered users?

    Stephen Edgar
    Keymaster

    Do you have registration enabled?

    WordPress -> Settings (/wp-admin/options-general.php)

    Membership Membership Anyone can register

    A link to your site or some screenshots would also be helpful…

    #151112

    In reply to: registered users?

    rust12
    Participant

    I have used the bbpress shortcodes and widgets, but i can only display the login credential, but not the register and not the lost password.

    i understand the steps are
    1. to show the register and lost password page, i need to create a new web page, and then put the bbpress shortcodes. I already did that.
    2. to show the login credential (user and pass), i use the widget. When installing the widget, it will ask for the url for the register and lost password page. i provided the url in the widget. Widget shows successfully.

    But when i click the register and lost password link in the widget, it only show me the new webpage with the shortcode [bbp-register], [bbp-lost-pass], that’s all i see in my new web page.

    Please let me know what i do wrong.

    Thanks.

    #151110

    In reply to: Visual editor font

    EzYRiDaH
    Participant

    @Robkk, many many thanks! Put the code in the child theme css stylesheet and it works like a charm!

    Hopefully somebody knows how to change the font of the Visual Editor with CSS 😉
    Thanks again!

    #151105

    In reply to: Visual editor font

    Robkk
    Moderator

    1. Is it possible to disable the Text editor, hopefully with CSS?

    yeah , heres a way

    I dont know for sure if the visual editor is displayed by default when you see the reply form.

    post it anywhere where you can put custom css

    in your child themes css stylesheet
    the jetpack plugin module custom css
    a standalone custom css plugin

    #bbpress-forums div.bbp-the-content-wrapper div.quicktags-toolbar {
        display: none;
    }
    
    #bbpress-forums .wp-editor-tabs {
      display:none;
    }
    #151104
    Robkk
    Moderator

    i just did this with css.

    #qt_bbp_topic_content_code.button ,#qt_bbp_topic_content_close.button , 
    #qt_bbp_topic_content_li.button , #qt_bbp_topic_content_ol.button ,
    #qt_bbp_topic_content_strong.button , #qt_bbp_topic_content_em.button ,
    #qt_bbp_topic_content_block.button , #qt_bbp_topic_content_del.button ,
    #qt_bbp_topic_content_ul.button,
    #qt_bbp_reply_content_code.button ,#qt_bbp_reply_content_close.button , 
    #qt_bbp_reply_content_li.button , #qt_bbp_reply_content_ol.button ,
    #qt_bbp_reply_content_strong.button , #qt_bbp_reply_content_em.button ,
    #qt_bbp_reply_content_block.button , #qt_bbp_reply_content_del.button ,
    #qt_bbp_reply_content_ul.button
    {
    display:none;
    }
    #151102

    Topic: Visual editor font

    in forum Showcase
    EzYRiDaH
    Participant

    Hi there,

    I enabled the Visual Editor by using the example code:

    function bbp_enable_visual_editor( $args = array() ) {
       $args['tinymce'] = true;
        return $args;
    }
    add_filter( 'bbp_after_get_the_content_parse_args', 'bbp_enable_visual_editor' );

    Two questions:
    1. Is it possible to disable the Text editor, hopefully with CSS?
    2. How can I get the same Font used in the Text editor in the Visual editor?

    I’m not a die hard CSS expert, so please bring it to me gently 😉 I managed to change a lot of the look and feel with a lot of trial and error, but this is beyond my limited skills.

    Thanks in advance!

    #151100
    Robkk
    Moderator

    ok i dont know how to disable arrangement from activity , and just leave it where its topics arranged by published date and nothing else. Maybe some other person could help on this forum , or you are going to need to get some freelancers

    I do know how to show the published date though

    if you haven’t made a child theme create one , and put all the necessary templates into your child theme

    ok to display the published date use <?php the_date(); ?>

    heres is a

      snippet

    of how your loop-single-topic.php should look

    <li class="bbp-topic-freshness">
    
    		<?php do_action( 'bbp_theme_before_topic_freshness_link' ); ?>
    
    		<?php bbp_topic_freshness_link(); ?>
    
    		<?php do_action( 'bbp_theme_after_topic_freshness_link' ); ?>
    
    		<p class="bbp-topic-meta">
    
    			<?php do_action( 'bbp_theme_before_topic_freshness_author' ); ?>
    
    			<span class="bbp-topic-freshness-author"><?php bbp_author_link( array( 'post_id' => bbp_get_topic_last_active_id(), 'size' => 14 ) ); ?></span>
    
    			<?php do_action( 'bbp_theme_after_topic_freshness_author' ); ?>
    
    		</p>
    	</li>

    heres a

      snippet

    of how your loop-topics.php should look like

    <?php do_action( 'bbp_template_before_topics_loop' ); ?>
    
    <ul id="bbp-forum-<?php bbp_forum_id(); ?>" class="bbp-topics">
    
    	<li class="bbp-header">
    
    		<ul class="forum-titles">
    			<li class="bbp-topic-title"><?php _e( 'Topic', 'bbpress' ); ?></li>
    			<li class="bbp-topic-voice-count"><?php _e( 'Voices', 'bbpress' ); ?></li>
    			<li class="bbp-topic-reply-count"><?php bbp_show_lead_topic() ? _e( 'Replies', 'bbpress' ) : _e( 'Posts', 'bbpress' ); ?></li>
    			<li class="bbp-topic-freshness"><?php _e( 'Published', 'bbpress' ); ?></li>
    		</ul>
    
    	</li>
    
    	<li class="bbp-body">

    end result should look like this.

    #151098
    Robkk
    Moderator

    I have created a folder “bbpress” within my theme and copied the bbpress.css, could it be the original .css is overriding it?

    the one in your theme should overwrite the original

    did you get the button now , heres now it looks when i checked out your site.

    and that code i gave you should remove the space.

    heres what it looked like while editing that css

    #151095
    Robkk
    Moderator
    #bbpress-forums div.bbp-the-content-wrapper input {
    font-size: 12px;
    padding: 5px;
    margin: 0 2px 0 0;
    line-height: 1em;
    background: #222;
    color: #fff;
    }

    its in black in white because thats how i had it in my local site right now, does that work??

    #151088

    After getting deep into the guts of Pagelines, I think this is now fixed… first of all, thanks very much Stephen for being willing to assist. It’s been very good of you.

    In case the autopsy helps anyone else, here we go…

    There was a transient that Pagelines uses – pagelines_sections_cache – that keeps a record of what different section types are registered with the Pagelines theme.

    I haven’t worked out why yet (and won’t try), but though this transient is meant to last 24 hours, it would get re-generated more frequently than that. That plays into what follows.

    Pagelines (in my view) runs some of its code much too early on the front-end, unconditionally – and sometimes it was re-generating the transient on requests that another of our plugins was picking up for API calls (i.e. calls that don’t generate a front-end page). On those requests, for performance, the pagelines-bbpress plugin was not active. As a result, the BBPress section type did not get registered with Pagelines. The transient got saved without knowledge of that section type.

    Thus, later, when the cached transient was getting used, no BBPress section type was known – so Pagelines would output nothing.

    And here’s the really annoying bit. What was the magical BBPress/Pagelines integration code that they used to sell in their store but now give away in the Pagelines-BBPress plugin? What is the wonderful code to get the two to work together? When you scrape away all the boilerplate to find the core code that does something, the whole of it is:

    function section_template() { 
                    while (have_posts()) :
                            the_post();
                            the_content();
                    endwhile;
            }

    Excuse me whilst I go and bang my head against a wall for a bit.

    David

    #151087
    Robin W
    Moderator

    yes it should be as bbpress just uses wp_query once args has been parsed.

    see

    https://codex.wordpress.org/Class_Reference/WP_Query dates are quite a way down

    untested but something like

    $week = date( 'W' );
    $year = date( 'Y' );
    bbp_has_topics( array( 'year' => $year, '&w' => $week ) );
    

    would do last 5 days

    #151086
    melanie bund
    Participant

    Hi robkk
    Am afraid neither of above solutions work.
    I have created a folder “bbpress” within my theme and copied the bbpress.css, could it be the original .css is overriding it?
    The breadcrumbs space still remains.
    The button code does not change the button
    My theme buttons css below – could i somehow alter it to also include the bbpress button?

    #searchform input[type=”submit”] {
    padding: 9px 15px;
    background: #F93;
    border: 0;
    font-size: 14px;
    color: #000;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    width: auto;
    }
    #searchform input[type=”submit”]:hover {
    color: #5e5e5e;
    background-color: #ebebeb;
    background-repeat: repeat-x;
    background-image: -moz-linear-gradient(top, #f9f9f9, #ebebeb);
    background-image: -ms-linear-gradient(top, #f9f9f9, #ebebeb);
    background-image: -webkit-linear-gradient(top, #f9f9f9, #ebebeb);
    background-image: -o-linear-gradient(top, #f9f9f9, #ebebeb);
    background-image: linear-gradient(top, #f9f9f9, #ebebeb);
    }
    thank you in advance
    site page
    http://bunddesign.com/pdm/lets-talk/
    Melanie

    #151081
    Stephen Edgar
    Keymaster

    Ahhh… Now I’m looking at the theme…. <- That part of your previous post I inferred you were ‘looking’ at your theme and had found ‘something’ that a change you made had reverted the bad behaviour.

    I’m still seeing the page so that makes two times more than the past few days, it ‘could’ be just one of those things that by deactivating one of those plugins and then reactivating it again has fixed whatever, rare, but has been known to happen in the WordPress plugin world!

    #151080
    divyesh25
    Participant

    Hi everyone,

    Any one know how to filter topics on date base. means i want to list all last 5 days topics.

    i see code this code in function bbp_has_topics( $args = '' )

    
    $default = array(
    		'post_type'      => bbp_get_topic_post_type(), // Narrow query down to bbPress topics
    		'post_parent'    => $default_post_parent,      // Forum ID
    		'meta_key'       => '_bbp_last_active_time',   // Make sure topic has some last activity time
    		'orderby'        => 'meta_value',              // 'meta_value', 'author', 'date', 'title', 'modified', 'parent', rand',
    		'order'          => 'DESC',                    // 'ASC', 'DESC'
    		'posts_per_page' => bbp_get_topics_per_page(), // Topics per page
    		'paged'          => bbp_get_paged(),           // Page Number
    		's'              => $default_topic_search,     // Topic Search
    		'show_stickies'  => $default_show_stickies,    // Ignore sticky topics?
    		'max_num_pages'  => false,                     // Maximum number of pages to show
    	);
    

    is it possible to pass date filter in function bbp_has_topics argument.

    #151076
    Stephen Edgar
    Keymaster

    When I click on the link in your menu “Discussion Forums” here http://www.aceachievers.in/#try

    I see This content is for Pro and Revision Series with forum members only.

    Though I see your forums here http://www.aceachievers.in/forums/

    But I cannot read your topic here: http://www.aceachievers.in/forums/topic/test-1/

    I can see the topic and replies here: http://www.aceachievers.in/forums/topic/biochem-doubts/

    Most likely this is an issue with a plugin that is restricting the viewing of topics and replies, a look at your source shows you are using “Paid Memberships Pro” and this is most likely the cause of your issues.

    Can you update or configure it’s settings for any permission changes that differ between the links I added above?

    It could also be generally more of an issue with bbPress and “Paid Memberships Pro” as I have seen a few recent issue pop up with this plugin, I’d check their support forum for any related topics and make sure you are using the latest version of their plugin.

    #151069
    Stephen Edgar
    Keymaster

    As a suggestion I’d also change your permalink settings to:

    Post name http://example.com/sample-post/

    #151068

    In reply to: registered users?

    Stephen Edgar
    Keymaster

    bbPress is a WordPress plugin thus bbPress uses WordPress for it’s users.

    You can use bbPress shortcodes or widgets depending on your site structure so uses do not need to go near or even see the backend of WordPress:

    https://codex.bbpress.org/shortcodes/ https://codex.bbpress.org/widgets/

Viewing 25 results - 10,801 through 10,825 (of 32,511 total)
Skip to toolbar