Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 6,276 through 6,300 (of 32,519 total)
  • Author
    Search Results
  • #175804

    In reply to: logout page issue

    Robkk
    Moderator

    Lynqs suggestion in the topic you linked to will not work if you just put his code into a text widget, because the text widget does not output PHP just HTML.

    I see you just placed the bbPress login form shortcode into a text widget, why not just use the bbPress profile widget which includes a login form and register, lost password, and logout links.

    #175803
    Robkk
    Moderator

    As I state in this post, you may not need to even add an emoticons plugin, older conservatives may not even use it, but they might every now and then use the simple smilies like :) :( >:( :P

    https://bbpress.org/forums/topic/smiley-emoticons/#post-175672

    #175802
    Robkk
    Moderator

    Yes you would need to adjust some CSS styles from the forum.

    The styles specifically are these, although these will change when you reach a specific device width. You will need to adjust the width taking some out of the title section most likely. You might want to also look into adding another column heading for views, by copying the loop-topics.php template into your child theme.

    li.bbp-forum-info,
    li.bbp-topic-title {
    	float: left;
    	text-align: left;
    	width: 55%;
    }
    li.bbp-forum-topic-count,
    li.bbp-topic-voice-count,
    li.bbp-forum-reply-count,
    li.bbp-topic-reply-count {
    	float: left;
    	text-align: center;
    	width: 10%;
    }
    
    li.bbp-forum-freshness,
    li.bbp-topic-freshness {
    	text-align: center;
    	float: left;
    	width: 22%;
    }
    #175800
    Robkk
    Moderator

    1. Robins plugin uses the same file that has been tossed around these forums for the past 2 or so years.

    https://github.com/robkk/bbPress-Hierarchical-Forum-and-Category-Layout

    4. You should probably just keep them, as they help with moderation on the frontend. There is a link in the description to show all posts including ones that may be pending moderation. The yellow ones just help notify users whats up, so if they cannot post for soem reason and there is no notice, they would not know what the issue is.

    Here is a link to the code though.

    https://bbpress.org/forums/topic/where-can-i-remove-the-this-forum-contains-topics-and-themes/#post-167642

    5. If you are minifying your CSS, then I say do not worry about this feature.

    I don’t really think there is a best practice for forum rules/admin content, it is whatever works for you and makes most sense in the end.

    #175796
    r083r7
    Participant

    copy and pasted into my child-theme function.php file

    add_filter( 'bbp_verify_nonce_request_url', 'my_bbp_verify_nonce_request_url', 999, 1 );
    function my_bbp_verify_nonce_request_url( $requested_url )
    {
        return 'http://localhost:8888' . $_SERVER['REQUEST_URI'];
    }

    ERROR: Are you sure you wanted to do that? is still there.

    Any other ideas?

    #175795

    In reply to: Freshness Link

    Fuskeduske
    Participant

    I know see i missed some code

    <div class=”bbp-forum-last-topic-name”>” title=”<?php bbp_forum_last_topic_title(); ?>”>

    <?php bbp_forum_last_topic_title(); ?></div>

    <p></p><?php bbp_forum_last_active_time(); ?>

    fpradmin
    Participant

    Thank you both for the help. I installed the “Simple Custom CSS” Plugin and fixed both issues by adding the following code there, after removing the code to “get sidebars” in bbpress.php

    
    /* Change Post Font Color to Black */
    .post-inner .entry{ color: #000; }
    
    /* Increase Forums to Full-Width of Page - after removing get sidebar code from bbpressphp */
    .bbpress .main-inner,
    .bbpress .main,
    .page-template-full-width .main-inner,
    .page-template-full-width .main  {
      background: none !important;
      padding-right: 0 !important;
      padding-left: 0 !important;
    }
    
    /* Increase Font Size on various items in bbPress */
    #bbpress-forums,
    #bbpress-forums ul.bbp-lead-topic,
    #bbpress-forums ul.bbp-topics,
    #bbpress-forums ul.bbp-forums,
    #bbpress-forums ul.bbp-replies,
    #bbpress-forums ul.bbp-search-results,
    #bbpress-forums .bbp-forum-info .bbp-forum-content,
    #bbpress-forums p.bbp-topic-meta,
    div.bbp-breadcrumb,
    div.bbp-topic-tags,
    span.bbp-admin-links a,
    #bbpress-forums div.bbp-forum-author .bbp-author-role,
    #bbpress-forums div.bbp-topic-author .bbp-author-role,
    #bbpress-forums div.bbp-reply-author .bbp-author-role,
    span.bbp-author-ip,
    div.bbp-template-notice p,
    #bbpress-forums #bbp-your-profile fieldset span.description  {
    	font-size: 16px !important;
    }
    
    #bbpress-forums .bbp-forums-list a {
      font-size: 18px;
    }
    
    li.bbp-forum-info a.bbp-forum-title,
    li.bbp-topic-title a.bbp-topic-permalink,
    #bbpress-forums div.bbp-topic-content p,
    #bbpress-forums div.bbp-topic-content p,
    #bbpress-forums div.bbp-reply-content p {
      font-size: 20px;
    }
    
    Robkk
    Moderator

    These are all the files and code I had in my custom child theme I created from Hueman. I also added some font-size CSS styles too.

    https://gist.github.com/robkk/8b323aa0994e87a476054a4f115d1141

    Robkk
    Moderator

    Yeah you can’t do what you want now using that specific plugin, you can using widget logic, or creating a bbpress specific sidebar for all the widgets you want/not want to display on bbPress pages.

    Contact the display widgets plugin author to possibly add this feature to hide/show widgets on bbPress user profiles, and maybe specifically the edit profile page. All they would need is just use these supplied bbPress conditionals.

    bbp_is_single_user_edit()
    bbp_is_single_user()
    #175779
    Robin W
    Moderator

    ok, I think this is now all working for older php versions.

    I have also fixed a small bug, so the code is more robust.

    once the new version appears in your updates, can you upgrade, and just confirm that it all still works for you.

    Regards

    Robin

    #175762
    Robin W
    Moderator

    ok, Ive taken a further look, and the issue is that you are using a php version below php5.5.

    Given that others may do so, I’ve recoded to avoid the error, so can you delete the version you have, and try this one

    http://www.rewweb.co.uk/download/private-groups-3-2-1-rc/

    #175761

    In reply to: Tutorials

    Robin W
    Moderator
    fpradmin
    Participant

    Well, I definitely appreciate the help, but most likely I’m doing something wrong or not placing the code in the right location. I replaced my bbpress.php with yours(although there wasn’t a lot of difference). Then I tried placing the .css code in my custom css file, at the top, then in the middle, then at the bottom.. none of which had any effect. I then tried to edit my styles.css, which is actually my Main.css(because of the way the Hueman Theme moves and hides it for minification). I put the css code there, at the bottom, and it still had no effect, so eventually I took it back out and returned things to the way I had them. If it shouldn’t be just placed at the bottom, where should it go? Again, I’m not a developer so I’m a bit nervous playing around with the code too much.

    Any idea how to increase the Font Size? If I could increase the Font size, I might even consider leaving the sidebars in place, just for the sake of leaving things well enough alone, before I break something.

    Robkk
    Moderator

    Or another possible pinch point is the Tool’s kits option to remove css from non bbpress pages

    the bbp toolkit plugin just dequeues the bbPress default stylesheet if the page is not a bbPress one. Here is the function for that feature.

    function bbptoolkit_unqueue_bbp_scripts() {
    	if( ! is_bbpress() ) {
    		$bbptoolkit_rem_defstyle = get_option('bbptoolkit-rem-defstyle', false);
    		if ($bbptoolkit_rem_defstyle) {
    			wp_dequeue_style('bbp-default');
    			wp_dequeue_style('bbp-default-rtl');
    		}
    	}
    }
    add_action( 'bbp_enqueue_scripts', 'bbptoolkit_unqueue_bbp_scripts', 15 );

    This may not be the conflict as I think robins plugin doesn’t mess with the default stylesheet in bbPress. So it might be something else.

    #175755
    Themezly
    Participant

    I am working on a theme and need to deque all bbpress scripts and enque my own if I am on forum pages. This is what I used to start with

    	if( !is_admin() ){ 
    		/**
    		 *	Replace bbpress style with our own
    		 *  @internal
    		 */
    		function _thz_action_bbpress_style() {
    			
    			wp_dequeue_style( 'bbp-default' );
    			
    			if (is_bbpress()){
    				
    				wp_enqueue_style( THEME_NAME. '-bbpress' );	
    		
    			}
    			
    	
    		}
    		
    		if (function_exists('is_bbpress')){
    			add_action( 'wp_enqueue_scripts', '_thz_action_bbpress_style' );
    		}
    		
    		
    	
    	}

    issue with this is that is_bbpress() is not recognized on pages that use any bbpress shortcodes like

    [bbp-forum-index]

    Can someone please provide a working conditional that runs only on forum pages and not throughout the whole site. Thnx!

    Robkk
    Moderator

    This is the bbpress.php file that you would need and its required code.

    https://gist.github.com/robkk/a89e6cff104f70556f52c6df3f6b69b0

    This is the custom CSS you will need.

    .bbpress .main-inner,
    .bbpress .main {
      background: none !important;
      padding-right: 0 !important;
      padding-left: 0 !important;
    }

    This will not work for pages with bbPress shortcodes though.

    But you can work around that since most shortcodes are supposed to be placed in pages, you can create another template just for full width layouts in your theme. You can use this whenever you create a new page and select the template to use for your page.

    To create a full-width template, you can literally just copy the bbpress.php file I created for you, rename it to full-width.php, put it in your child theme, now you need to edit the file and place

    <?php
    /*
    Template Name: Full-Width
    */
    ?>

    right above

    <?php get_header(); ?>

    You will need more custom css for any page using this template in your theme and it should be

    .page-template-full-width .main-inner,
    .page-template-full-width .main  {
      background: none !important;
      padding-right: 0 !important;
      padding-left: 0 !important;
    }

    If you plan to use both, just combine the two custom CSS statements, and now you should be good to go.

    #175753
    Robin W
    Moderator

    suspect its a wordpress issue since I am calling a wp function

    if you can’t upgrade to 4.5.2, come back and I’ll take a guess at some retrospective code!

    #175741
    Robin W
    Moderator

    loop-forums.php is a file that sites on your server, you cannot ‘call it’ from within php.

    You access the file using FTP and an editor.

    see ‘What is FTP and how do I access it?’ within this link

    https://codex.bbpress.org/functions-files-and-child-themes-explained/

    #175724
    khunmax
    Participant

    The following CSS works to resolve issues .2 and .3 above:

    #bbpress-forums .bbp-forums-list {border:none; color:#INSERTHEXCOLOROFYOURLINKS;}

    I am still hopeful to receive some input on 1. .4 and .5 and the best practice question.

    Kind Regards

    Max

    fpradmin
    Participant

    I didn’t fix it, it’s just the page I created(using the short code), that I thought would hold the Forums. But apparently it just holds the first page, then once you click something it redirects to the injected instance of the Forums inside of the default Page, with the standard sidebar formatting. This is indicative of the way Hueman theme allows the bbpress forums to work. It works within the Global framework only, and won’t let me keep it on a Page I create. At least that’s the way it appears to be working, and I have seen other posts with the exact same issue, but it seemed everybody eventually had a different way to resolve it. I can’t seem to get anything to work.

    #175716
    Robkk
    Moderator

    @aaronbennett2097 sounds like you want something like this?

    function rkk_topic_description() {
    	$excerpt = bbp_get_topic_excerpt();
    		echo '<div style="text-align:left"><p>'.$excerpt.'</p></div>';
    }
    add_action('bbp_theme_after_topic_title','rkk_topic_description');
    #175709

    In reply to: Hide role in the forum

    Robin W
    Moderator
    #175706
    khunmax
    Participant

    Hey Robin

    I installed your snippet as follows:

    // Filter wp_nav_menu() to add profile link
    add_filter( 'wp_nav_menu_items', 'my_nav_menu_profile_link' );
    function my_nav_menu_profile_link($menu) { 	
    	if (!is_user_logged_in())
    		return $menu;
    	else
    		$current_user = wp_get_current_user();
    		$user=$current_user->user_login ;
    		$profilelink = '<li><a href="http://www.mysite.com/forums/users/' . $user . '/edit">My Profile/Edit Profile</a></li>';
    		$menu = $menu . $profilelink;
    		return $menu;
    }

    It works perfectly for front end users, however if I am already logged in as the admin and then click on the My Profile link created by your snippet, rather than being redirected to my profile page, I get the “Oops! That page can’t be found” message. The URL that appears in my browser appears correct:

    http://localhost/forum/forums/users/MYUSERNAME/edit

    Any assistance you can provide is greatly appreciated.

    Kind Regards

    Max

    #175677
    winrarz
    Participant

    SOLUTION!

    REMOVED:
    add_filter( 'bbp_get_reply_content', array( $this, "shortcode_whitelist" ) );
    FROM PLUGIN:
    bbPress Advanced Statistics, file: class-bbpress-advanced-statistics-extras.php
    CAUSE:
    Breaks the loading of shortcodes.

    I’m hopeful this will help someone else. It seemed to be a problem with the bbPress Advanced Statistics plugin.

    #175676
    winrarz
    Participant

    UPDATE 3:
    return apply_filters( 'bbp_get_reply_content', $content, $reply_id );
    in bbpress/includes/replies/template.php

    This code breaks the entire shortcode loading function.

    If I patch this to say return $content; it will start working.
    Now to see why this happened..

Viewing 25 results - 6,276 through 6,300 (of 32,519 total)
Skip to toolbar