Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 11,326 through 11,350 (of 32,504 total)
  • Author
    Search Results
  • #149112
    Robkk
    Moderator

    Thanks so much. I am not an expert in this, so I will wait until Sunday.

    haha im no expert , im just some guy helping out people on here the best i can

    -Login/Register buttons above the forum

    quicksprout has ajax login and its also in a popup window

    so if you want that install wp-modal-login

    after that copy your content-archive-forum.php to your child theme

    and make sure that is has this code inside of it , heres a snippet

    <?php do_action( 'bbp_template_before_forums_index' ); ?>
    
    	<?php if ( bbp_has_forums() ) : ?>
    	
    	<?php if ( is_user_logged_in() ) {
    
    } else { ?>
    
    <div class="bbp-modal-login"> 
    
     <?php add_modal_login_button( $login_text = 'Login', $logout_text = 'Logout', $logout_url = 'http://sitename', $show_admin = true ); ?>
     
     </div>
     
       <?php
    };
    ?>
    
    		<?php bbp_get_template_part( 'loop',     'forums'    ); ?>
    
    	<?php else : ?>
    
    		<?php bbp_get_template_part( 'feedback', 'no-forums' ); ?>
    
    	<?php endif; ?>

    style the link to whatever you want with custom css
    here is a template

    .bbp-modal-login a.login.wpml-btn.login-window {
    float: left;
    padding:5px;
    color:#fff;
    background:#333; 
    text-decoration:none;
    text-transform:uppercase;  
    }

    and like i said you could also do the shortcode version too

    nice round images of members

    i saw your site , and see you already have this

    images for read/unread posts

    if you want the images here

    the whole functionality of the unread posts on their forums is like 2 unread posts plugins from the wordpress plugin respository mixed together

    https://wordpress.org/plugins/bbpress-mark-as-read/
    https://wordpress.org/plugins/bbpress-unread-posts/

    i cant really help on this

    statistics at the bottom

    this should be the bottom of your content-archive-forum.php

    	<?php do_action( 'bbp_template_after_forums_index' ); ?>
    
    </div>
    
    <?php echo do_shortcode("[bbp-stats]"); ?>

    to style the bbpress statistics shortcode put content-statistics.php into your child theme

    this should be your entire content-statistics.php

    <?php
    
    /**
     * Statistics Content Part
     *
     * @package bbPress
     * @subpackage Theme
     */
    
    // Get the statistics
    $stats = bbp_get_statistics(); ?>
    
    	<?php do_action( 'bbp_before_statistics' ); ?>
    	
    	<div class="bbp-stats">
    	
    	<ul class="bbp_stats">
    
    	<li> <?php _e( 'Users', 'bbpress' ); ?></dt>
    		<strong><?php echo esc_html( $stats['user_count'] ); ?></strong></li> 
    
    	<li> <?php _e( 'Topics', 'bbpress' ); ?></dt>
    		<strong><?php echo esc_html( $stats['topic_count'] ); ?></strong></li> 
    
    	<li> <?php _e( 'Replies', 'bbpress' ); ?></dt>
    
    		<strong><?php echo esc_html( $stats['reply_count'] ); ?></strong></li> 
    		
    		 </ul>
    		 
    		 </div>
    		
    	<?php do_action( 'bbp_after_statistics' ); ?>
    
    </dl>
    
    <?php unset( $stats );

    add this for custom css

    .bbp-stats .bbp_stats {
        list-style-type: none;
        display: block;
        text-align: center;
        margin-left: 0px;
        float: none;
    }
    
    .bbp-stats .bbp_stats li {
        margin: 0;
        display: inline-block;
        padding: 5px;
    }

    “New Thread button”

    this is just a drop link , example of a drop link would be to put #new-post at the end of the url of this topic and you will see that you will end up at the new topic/reply form

    copy content-archive-topic.php into your child theme right now then

    ILL tell you the rest when im done , because right now im having some trouble

    Jerry
    Participant

    Hi Robin. I’m on my way to the UK to support the Farnborough airshow, so I can’t access my home computer to replicate the error for another week. What I can tell you is; when I removed the switch_to_blog id input parameter and instead assigned a variable $cat to ‘post_parent’, and set $cat = $attr[‘id’];, I received no errors. I hard-coded to the blog site, then I can adjust the id to equal the forum id. So my feeling is that shortcodes cannot accept two inputs? If I’m wrong about that, then I will re-address this upon my return to the states.

    #149081
    Robkk
    Moderator

    I can’t post any code right now I’m on my cell , I’ll do it tomorrow , but its not really much though I just made a menu in HTML and put the admin links in each list .

    The only problem I have is just making the specific admin links show up on their specific post type.

    I can tell you other ideas I have thought to place the menu of links besides HTML but that might confuse you more.

    #149080
    Robin W
    Moderator

    ok, my brain is now mush, but I am still hooked.

    Can you post you solution so far, then I’ll put it in my test site

    So I need to know

    what code you put in your functions file

    what code you have in loop single reply (and starting where!)

    any other code you have, and where you’ve put it

    I’ll then have a play !

    Robin W
    Moderator

    you’ll need to have some logic in here

    eg

    if there are replies find latest reply, and then find that replies author and insert that.
    if there are no replies, then put in topic author

    At the moment you looking up the reply author for a topic, and that won’t work.

    just had a play and this seems to work, but only tested quickly, so you’d need to set up a few topics with and without single and multiple replies and check that it worksin all circumstances

    // Maybe get the topic author
    if ( ! empty( $settings['show_user'] ) ) {
    //see if there has been replies, and if so set to latest
    $replycheck = get_post_meta( $topic_id, '_bbp_last_reply_id',true);
    //if we have replies ie replycheck holds the latest reply number
    if (!empty ($replycheck)) 
    $author_link = bbp_get_reply_author_link( array( 'post_id' => $replycheck, 'type' => 'both', 'size' => 14 ) );
    else
    $author_link = bbp_get_topic_author_link( array( 'post_id' => $topic_id, 'type' => 'both', 'size' => 14 ) );
    				} ?>
    
    
    #149074
    localmarketingus
    Participant

    Because on a ‘conatact form” you can’t enter html or code like in bbpress.. thats why i asked the question.

    #149069
    Robkk
    Moderator

    If this confuses you wait til Sunday or if anyone knows what I ment and wants to properly describe every detail and post code

    #149068
    Robkk
    Moderator

    For login and register you could create individual pages for login and registration , you could use the login and register form short codes by bbpress and put them in your pages or if you use theme my login or something similar that creates custom frontend membership pages use that. And put an HTML link to both pages above loop-forums.php or above the call of loop-forums.php in archive-forum.php

    Round avatar images use border-radius:50%; or something like that , you could probably right click inspect element target the avatar image and get the CSS code right off of quick sprout and put that in your custom css

    Unread posts you have to wait til its sunday (time I will be home to see my desktop)

    Stats at bottom you could use the bbpress stats short code , if you want it in your templates use the php do shortcode function with the bbpress stats short code

    I don’t know how the new thread button fuctions , but you could create a page let’s say “new topic” and link to it the same as the login/register buttons

    #149067
    Stephen Edgar
    Keymaster

    You shouldn’t really be letting users add styles, you should have your theme do that, that said., just add a new section for the p tag and style within p like so:

    
    	// Paragraph
    	'p'        => array(
    	'style'    => true,
    	),
    
    #149062

    In reply to: BBPress advise wanted

    Stephen Edgar
    Keymaster

    Cool, most of things you mention can be done, some are ready to go, others need a few tweaks and custom PHP code to achieve the results.

    1. create login in the wp home page for BBpress

    Create a WordPress page, set that as your home page, add the bbPress login/register shortcodes

    2. allow only offline registered members to be registered as BBpress users

    Not quite sure what you mean here, you can set your forums to ‘private’ so only logged in registered members can see or use the forums.

    3. enable/disable users, and hence their profiles

    This is more of a WordPress question than bbPress, if the member has an active and valid WordPress account then they can login. If you want to remove the user and their associated profile then you’d delete the actual WordPress user which inherently flows down to bbPress.

    4. allow users to create profiles with their filmography and perhaps a vimeo embed or two

    With a few minor tweaks/customisations you could achieve this, you may also want to take a look at BuddyPress’ Extended profiles which will let you do this also.

    5. can users have simple URLs for their profiles, like perhaps example.com/username?

    Yep, this is built in, here’s yours here on bbpress.org https://bbpress.org/forums/profile/parambyte/

    #149059
    Stephen Edgar
    Keymaster

    Click the ‘download gist’ link, it will download a zip archive, unzip it and use FTP to upload the plugin to your WordPress plugins folder, typically /wp-cntent/plugins

    Edit: Or go to ‘Plugins’ -> ‘Add new’ -> ‘Upload’ and you can then upload it directly.

    #149053
    Stephen Edgar
    Keymaster

    I have hardly dug into bbPress 1.x and am not familiar with the code base at all.

    How about grab the latest bbPress v1.2 and create a test/demo site on your local PC with a backup your database, things should theoretically work though you ‘d have to make sure the database upgrade routine was triggered of course.

    That should then give you a working version with your database to then start comparing the base code of your test site vs your live site.

    That said, what is stopping you from upgrading? I am presuming here that there is something stopping you from installing WordPress and upgrading bbPress 1.x to the v2.x plugin?

    #149051
    Stephen Edgar
    Keymaster

    Grab this custom plugin from here https://gist.github.com/ntwb/7797990

    You will need to change one part of it though:

    From:

    
    		// Span
    		'span'             => array(
    			'class'     => true,
    		),
    

    To:

    		// Span
    		'span'             => array(
    			'class'     => true,
    			'style'     => true,
    		),
    

    That will then modify the allowed tag span to also include style inside the span.

    #149043
    Stephen Edgar
    Keymaster

    Create a page or two and use the bbPress shortcodes

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

    #149042
    Stephen Edgar
    Keymaster

    That is up to the the forum software you choose to use, all our source code is open source and any forum software package is free to create an import tool to import from bbPress, we do the same, we import from many forum packages but it is up to each application to add support if they want new customers to be able to import from bbPress, I know a few of the common ones do.

    #149040
    Stephen Edgar
    Keymaster

    I just had a play with this and you are correct, it works for administrators/keymasters but not standard ‘participants’ or ‘anonymous’ users.

    Grab this custom KSES plugin I have here https://gist.github.com/ntwb/7797990

    I just added class to to the pre section as that is where the issue is, pre is allowed but <pre class="whatever"> is not.

    Double check any of the other allowed tags and/or remove ones you don’t want/need.

    Edit: I just double checked against the default bbPress allowed tags and all are there, you may or may not want the table sections, up to you. I also made a note to add class as an allowed tag of pre for bbPress core, I can’t think of a reason for us not to add this by default.

    #149038

    In reply to: phpBB Import Error(s)

    Stephen Edgar
    Keymaster

    I added support for the anonymous/deleted phpBB user topics and replies, just finalizing all of this for the any other forums that also have this feature, SMF, Drupal, Vanilla.

    For the redirects I need to find a workaround to have WordPress correctly verify that viewtopic.php?f=3&t=9 is a valid URL, if we can do that then redirects could be included for imported forums and that would be awesome.

    #149037
    Stephen Edgar
    Keymaster

    @leonyipa Don’t get you bb’s confused, what you wrote way up there and quoted here:

    And I paste the code into: /public_html/wp-content/themes/bp-default/functions.php

    That is the BuddyPress Theme ‘BP Default’, nothing to do with bbPress so make sure you are updating the correct files 😉

    #149031
    Robin W
    Moderator
    #149030
    Robin W
    Moderator

    @obinyc sorry missed this post

    try

    <?php get_sidebar(); ?>


    @drceng

    lots of different boats, and yours is probably not the same.

    Do you have a sidebar at all showing?
    Have you followed

    Step by step guide to setting up a bbPress forum – Part 1

    Come back if you need further help

    #149020

    In reply to: Remove Breadcrumbs

    Robin W
    Moderator
    #149017

    In reply to: disabling breadcrumbs

    Robin W
    Moderator
    SeeingBlueS2
    Participant

    Ok so I played around with lines 807 and made it match what line 1157 looked like.
    This is line 1157:$author_link = bbp_get_reply_author_link( array( 'post_id' => $reply_id, 'type' => 'both', 'size' => 14 ) );
    Then I moved line 1152$reply_id = bbp_get_reply_id( $widget_query->post->ID ); between lines 802 & 803 thinking this might work and it doesn’t make any difference which was confusing to me.. What am I doing wrong?

    #148988
    Robkk
    Moderator

    to test out the code make pictures really small and add important

    #bbpress-forums div.bbp-topic-content img, #bbpress-forums div.bbp-reply-content img {
        max-width: 100px!important;
        max-height: 50px!important;
    }

    but you could also send me a link to a forum post with a picture too

    #148987
    Leonyipa
    Participant

    How to allow all users to use HTML codes, because at the moment, only keymaster can have access to all HTML tags.

    I would like to allow user to use this code:
    //<span style=”font-size: 36pt; font-family: impact, chicago;”>Pademelon</span>

    <span style=”font-size: 36pt; font-family: impact, chicago;”>Pademelon</span>

Viewing 25 results - 11,326 through 11,350 (of 32,504 total)
Skip to toolbar