Robkk (@robkk)

Forum Replies Created

Viewing 25 replies - 3,701 through 3,725 (of 3,781 total)
  • @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.

    @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

    @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

    @robkk

    Moderator

    Definitely a lot of CSS work

    Tell me what you like about that forum

    And I might give you some pointers on how to do what , but you gotta wait awhile til I get on my desktop CPU right now I’m on my cell

    @robkk

    Moderator

    OK great

    @robkk

    Moderator

    No problem

    @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

    @robkk

    Moderator

    change the numbers to whatever you want

    #bbpress-forums div.bbp-reply-content img, #bbpress-forums div.bbp-topic-content img {
    max-width: 500px;
    max-height:250px;
    height: auto;
    }

    you add this into anywhere where you can have custom css

    in bbpress.css in your child theme(you copy the original in your child theme)
    in your child themes css stylesheet
    the jetpack plugin module custom css
    a standalone custom css plugin

    @robkk

    Moderator

    oh great!!! and i just was making sure it worked haha thats why i posted three

    @robkk

    Moderator

    this is the best i got it right now, but you can also see what i was trying to go for

    @robkk

    Moderator

    well you should change your sitewide hyperlink color because you want people to see links you post.

    for topics

    a.bbp-topic-permalink  {
    color:#222;
    } 

    for forums

    a.bbp-forum-title  {
    color:#222;
    } 

    @robkk

    Moderator

    ok this changes the style of all the links on your site so it is not white (i copied googles link color)

    a {
        color: #3a84df;
    }
    
    a:hover {
        color: #3a84df;
        text:decoration: underline;
    }

    you add this into anywhere where you can have custom css

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

    @robkk

    Moderator
    a {
        color: #676768;
    }

    try that

    In reply to: Forum index

    @robkk

    Moderator

    i also forgot that buddypress uses a nav id of #subnav but thats easy to fix just change subnav to bbnav

    so all the code would be

    to register the menu

    function register_menu() {
    	register_nav_menu('bbmenu', __('bbpress Forum Menu'));
    }
    add_action('init', 'register_menu');

    place this below <?php do_action( 'bbp_template_before_forums_loop' ); ?>

    <nav id="bbnav" role="navigation">
    
    <?php
    if ( has_nav_menu( 'bbmenu' ) ) { /* if menu location 'bbmenu' exists then use custom menu */
          wp_nav_menu( array( 'theme_location' => 'bbmenu') ); 
    }
    ?>
    
    </nav>

    now add custom css

    #bbnav ul {
    	font-size: 13px;
    	list-style: none;
    	margin: 0;
    }
    
    #bbnav li {
    list-style-type: none;
    display: inline-block;
    margin: 6px 4px;
    }
    
    #bbnav a {
    text-decoration: none;
    color: #555;
    background: #ddd;
    padding: 2px 8px;
    border: 1px solid #e4e4e4;
    }
    
    #bbnav li a:hover {
    background: #333;
    color: #fff;
    border-color: transparent;
    text-shadow: none;
    }

    ok i found a css way of showing the menu only on the forum archive page

    create a page called forums that leads to the forum archive

    now make sure to grab the page id

    heres how to get the page id

    now add this css , replace (#) with the page number id for the forum archive page

    .post-# #bbnav {
    	background: none;
    	clear: both;
    	display: block;
    	float: left;
    	margin: 0 auto 6px;
    	width: 100%;
    }
    
    #bbnav {
    	display: none;  
    }
    

    now it should only show on the forum archive page only

    not in subscribed forums anymore

    if you dont see the menu , you probably need a special way to register menus for your theme

    @robkk

    Moderator

    here use this code instead and remember put this into your functions.php in your child theme
    change the numbers to whatever you want

    add_filter('embed_defaults','themename_embed_defaults');
    function themename_embed_defaults($defaults) {
       $defaults['width']=500;
       $defaults['height']=250;
       return $defaults;
    }

    @robkk

    Moderator

    @leonyipa ok great on the youtube video width , at least the code is doing something

    there is probably another function on the web that i can direct you to if i find something that works on both height and width, so wait til i come back with a function that works for both

    if i give you a new function delete the old one

    paste codes into a child themes functions.php and style.css so that the code wont disappear during theme upgrades

    and dont edit the core files inside of bbpress
    copy those files into your child theme so you can be safe on bbpress plugin upgrades

    so copy bbpress.css to your child theme, if you dont have a child theme , make one they are great for customizing your bbpress install

    for more about customizing bbpress with css , plugins, and functions read this

    Step by step guide to setting up a bbPress forum – part 2

    @robkk

    Moderator

    @iblifefordummies the links you added go to a closed topic

    bbpress adds styling to closed topics

    hardly seeing it is kind of suppose to happen

    @robkk

    Moderator

    try all of these

    span.bbp-admin-links a {
    color: #404040;
    }

    div.bbp-reply-header span.bbp-admin-links a {
    color: #404040;
    }

    #bbpress-forums div.bbp-reply-header span.bbp-admin-links a {
    color: #404040;
    }

    @robkk

    Moderator

    not sure but you probably have to set a max width for oembed embeds

    http://www.wpbeginner.com/wp-themes/how-to-set-oembed-max-width-in-wordpress-3-5-with-content_width/

    add the code to your functions.php in your child theme.

    change 600 to whatever number you want as the width, im sure you could copy the function to width to height and also do the height to.

    if the code doesnt work , look at the comments and try that user posted code. (i havent tried any of these codes so i dont know if they work really, if they dont just delete the function from your child functions.php)

    for images (using img quicktag) i think you can use css

    #bbpress-forums div.bbp-reply-content img, #bbpress-forums div.bbp-topic-content img {
    max-width: 100%;
    height: auto;
    }

    for images (posted by link using oembed , imgur , flickr picture, instagram picture) the oembed code that i linked to should do the same for these.

    @robkk

    Moderator

    @robin-w (hope this doesnt confuse you anymore)

    i have done that already

    i added the filter to my functions.php to leave the reply links on both topic and replies

    now im trying to make a drop-down menu with the rest of the other links on both topic and replies , right by the admin links by adding an html menu with the rest of the other links(trash, split, spam, etc.)

    when creating a menu i use echo bbp-get-name-of-link between li that is between a ul which makes a menu in html , and this shows each other admin link in a dropdown menu

    however i want the topic admin links to be on topics and the reply admin links to be on replies each in their own dropdown menu

    and if i use these two functions in loop-single-reply (where i am building my menu)

    -this is an example- if i use topic_reply_link and reply_tp_link it would be the same

    `<?php echo bbp_get_topic_edit_link(); ?>

    <?php echo bbp_get_reply_edit_link(); ?>`

    there will be 1 edit link in the topic (topic_edit_link) , and two edit links in the reply (topic_edit_link and reply_edit_link)

    so i have to fix the two edit links on replies when creating a dropdown menu

    or find a way to make a dropdown menu using a function so that it will show two different dropdown menus for the topic and the reply

    @robkk

    Moderator
    <?php if ( bbp_is_topic() ) 
    echo bbp_get_topic_reply_link(); ?>
    <?php if ( bbp_is_topic() ) 
    return bbp_get_topic_reply_link(); ?>

    these dont show an error but it wont show the link

    @robkk

    Moderator

    oh yeah in loop-single-reply i have my admin links on the very bottom of the template and i have this code right above it

    @robkk

    Moderator

    @robin-w i couldnt get the if ( bbp_is_topic function working

    i wanted to test out if i could do this , took code from this

    <div class="dropdown" id="dropdown">
    				<input type="checkbox" id="drop1" />
            <label for="drop1" class="dropdown_button">Topic Tools</label>
            <ul class="dropdown_content">
                <li class="active"></li>
                  <li> <?php echo bbp_get_reply_to_link(); ?></li>
                  <li><?php if ( bbp_is_topic( $r['id'] ) ) {
    echo bbp_get_topic_reply_link(); ?></li>
                  <li><?php if ( bbp_is_topic( $r['id'] ) ) {
    return bbp_get_topic_reply_link(); ?></li>
            </ul>
            
        </div>

    then make a dropdown menu from that i guess , but im just swinging the dark not really getting a exactly great way of doing what i want to achieve.

    plus i might have to go to a jquery menu template like this

    because the css menus arent working on all replies.

    @robkk

    Moderator

    i cant access your site to take pictures

    @robkk

    Moderator

    you want to change the

    links that come up with a topic or reply so that only some show, and others are in a dropdown list.

    is that correct?

    yes

    This also gives you the ability to add a new link

    yeah i added the topic favorite link to see if it worked and it did with the ajax too
    and also a mark topic as read from the bbpress go to first unread plugin

    You’ll also see that this function checks if it is a topic on line 1825

    i used this as a filter for the topic admin links

    //change admin links displayed
    function change_topic_admin_links ($r) {
    $r['links'] = apply_filters( 'rw_topic_admin_links', array(
    				'edit'  => bbp_get_topic_edit_link ( $r ),
    				'reply'  => bbp_get_topic_reply_link ( $r )
    				
    			), $r['id'] );
    return $r['links'] ;
    }
    add_filter ('bbp_topic_admin_links', 'change_topic_admin_links' ) ;

    i tried using this function to post a single admin link for a topic
    and also just by replacing return with echo
    but i cant seem to get that to work

    if ( bbp_is_topic( $r['id'] ) ) {
    			return bbp_get_name_of_link();
    		}
    
    		if ( !bbp_is_reply( $r['id'] ) ) {
    			return bbp_get_name_of_link() ;
    		}
Viewing 25 replies - 3,701 through 3,725 (of 3,781 total)