Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 10,801 through 10,825 (of 32,521 total)
  • Author
    Search Results
  • #151204
    Robin W
    Moderator

    it is in

    \bbpress\templates\default\bbpress\form-reply.php

    However it would be easiest to change the text using a function which you put in your functions file

    //This function changes the text wherever it is quoted
    function change_translate_text( $translated_text ) {
    	if ( $translated_text == 'old text' ) {
    	$translated_text = 'new text';
    	}
    	return $translated_text;
    }
    add_filter( 'gettext', 'change_translate_text', 20 );

    Functions files and child themes – explained !

    #151202
    Robin W
    Moderator

    So basically on the forum, when someone clicks edit my profile at the top of the page, it goes to the backend. Even though, it would be preferable to go to the front end.

    I would not let users see the toolbar, this is really just for admins.

    You need to disable the toolbar – add this to your functions file

    add_filter('show_admin_bar', '__return_false');
    

    then put the profile into your menu

    Layout and functionality – Examples you can use

    #151198
    cybarmitzvah
    Participant

    Thanks Stephen Edgar for the help, in request by him, I am posting this here and starting this new topic:

    disable front end editing

    So basically on the forum, when someone clicks edit my profile at the top of the page, it goes to the backend. Even though, it would be preferable to go to the front end. Currently, the only way a user can go to the front end is by clicking their name next to a post or in a topic/replies sequence.

    I am using the mesocolumn theme and am new to wordpress. site: http://www.astronomertalk.com

    I also moved template-full-width.php, to my child theme, and called it bbpress.php. After doing this, nothing has changed except now the forum specific sidebar, that came with the theme, does not show up.

    Source code from bbpress.php:

    <?php
    /*
    Template Name: Full Width
    */
    ?>
    
    <?php get_header(); ?>
    
    <?php do_action( 'bp_before_content' ); ?>
    <!-- CONTENT START -->
    <div class="content full-width">
    <div class="content-inner">
    
    <?php do_action( 'bp_before_blog_home' ); ?>
    
    <!-- POST ENTRY -->
    <div id="post-entry">
    <section class="post-entry-inner">
    
    <?php if (have_posts()) : ?><?php while (have_posts()) : the_post(); ?>
    
    <article <?php post_class('post-single page-single'); ?> id="post-<?php the_ID(); ?>">
    
    <h1 class="post-title entry-title"><?php the_title(); ?></h1>
    
    <div class="post-content">
    <div class="entry-content"><?php the_content( __('...Continue reading', TEMPLATE_DOMAIN) ); ?></div>
    <?php wp_link_pages('before=<div id="page-links">&after=</div>'); ?>
    
    </div><!-- POST CONTENT END -->
    
    </article>
    
    <?php endwhile; ?>
    <?php comments_template(); ?>
    <?php else : ?>
    <?php get_template_part( 'lib/templates/result' ); ?>
    <?php endif; ?>
    
    </section>
    </div>
    <!-- POST ENTRY END -->
    
    <?php do_action( 'bp_after_blog_home' ); ?>
    
    </div><!-- CONTENT INNER END -->
    </div><!-- CONTENT END -->
    
    <?php do_action( 'bp_after_content' ); ?>
    
    <?php get_footer(); ?>

    Thank You,
    JB

    Robkk
    Moderator

    no i dont want to do that , its harder for me to design the look of the widget.

    here let me explain a little bit more on why i want to hack your shortcodes plugin to show recent replies.

    well first i want my recent replies (and also recent topics) to look sort of like any recent comments widget. im going to use jetpacks recent comments on their website as an example.

    jetpack website example

    I have already pretty much made a copy of your shortcode plugin , edited it and threw it in my functions.php and put the shortcode in the visual editor widget by blackstudio

    heres what it looks like vs the default recent topics widget.

    my recent topics vs default

    now to make a replies widget with your shortcode all i have to do is rearrange code and use css to style everything together.

    to make it look like its showing recent replies, i just show the latest reply authors avatar , their name and what topic they replied on and im done.

    The only problem when doing this is if there is no replies on a topic , it would just show the topic author instead.

    Plus if you can figure this out i can also make a hack to make a replies archive. Which would be cool for something else i might do and ILL share it all when im done.

    i just need help on only showing topics with replies instead of all topics. if that is possible.

    #151190
    divyesh25
    Participant

    hi everyone,

    i have one page in which i am listing “no-replies” topics. for that i am using shortcode this [bbp-single-view id="no-replies"]. currently i have total 11 topics and i am listing 5 topics per page, among them 10 topics have “no replies”. paging 1 and paging 2 list 5 topics properly but there is paging 3 is also show and on that i got message like this “Oh bother! No topics were found here!”.

    please help me how i can remove paging 3.

    thanks

    #151182
    tiredofit
    Participant

    I’ve dusted off an old site of mine – using buddypress.

    I have the Forums component setup as a seperate site in Multisite, and just went to go through to make sure all the features worked on this site.

    When I went to the forums site, I was presented with the Forum list as usual (I have created a Static page and use the shortcode to load the forums list). The forums themselves have topics inside of them, and I can view them seperately by visiting the backend and viewing the topic. When I click the seperate board links, it instead takes me to the Create New Topic section.

    What could be going wrong?

    #151181
    Robkk
    Moderator

    the css or content-statistics.php

    if its the css ,

    test to see if you need to add more classes to the code so it could with the tab widget,

    test it by seeing if another stats widget has the css if you place it alone in the sidebar by itself in the tab widget

    Komal23
    Participant

    Hi

    I have used registration widget and logged in shortcode in a widget. But I wanted to show registration widget only when user is not logged in.
    But it shows both. What should i do for that?
    Here is the link of forum of my site.

    R-CE Forum

    Please help me in this ASAP.

    Thanks in advance.

    #151160
    Stephen Edgar
    Keymaster

    Don’t use bbPress login widgets or shortcodes then, use whatever is supplying that form instead, essentially we are all just piggy backing the standard WordPress login form.

    #151156
    Stephen Edgar
    Keymaster

    Create new topic and per my previous replies, and include the name of the theme. You are using and include the source code of the contents of the bbpress.php file you created.

    disable front end editing

    disable front end editing

    #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.

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