Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 5,926 through 5,950 (of 32,505 total)
  • Author
    Search Results
  • #177918
    wautom
    Participant

    Hi All,

    I already spent two hours working on this, but failed miserably.

    I want to change the font of the topics listed in Recent Topics widget as normal, instead of bold style.
    Which code should I change?

    I tried in bbpress.css, line 166, it seems it has no effect at all.

    Please see this image: the font is too bold, I want it be normal

    Thanks very much.

    #177909
    Robkk
    Moderator

    Its a common issue related to WordPress comments theme styling having issues with bbPress replies since they have a common class attribute .reply.

    Since your theme is a free WP theme, I was able to test it out real quick to see the issues.

    Use all this custom CSS, add it into a child themes style.css file or in a custom css plugin.

    Know that if it does not work, try adding !important at the end, for example like this.

    Also know that some of the CSS is for your replies links color, so change that if you end up changing your links color so that it would match.

    .example {
      position: relative !important;
      right: auto !important;
    }

    Here is all the custom CSS you would need to use to fix your theme related issue.

    #bbpress-forums .reply a {
      position: relative;
      right: auto;
      bottom: auto;
      display: initial;
      padding: 0;
      border: none;
      font-size: inherit;
      text-transform: none;
      -webkit-transition: none;
      transition: none;
    }
    
    #bbpress-forums .reply a {
      border-color: inherit;
      color: #BF4D28;
    }
    
    #bbpress-forums .reply a:hover {
      color: #E6AC27;
      background-color: inherit;
    }
    #177898

    In reply to: Threaded layout

    Stephen Edgar
    Keymaster

    You shouldn’t need to edit any of bbPress functions.

    You can achieve what you are after by adding your own custom templates:

    This is a guide to getting started with these: https://codex.bbpress.org/themes/amending-bbpress-templates/

    This is a helpful reference for bbPress’ templates: https://codex.bbpress.org/themes/theme-compatibility/template-hierarchy-in-detail/

    What I think you’d be looking to do is make changes to your child themes loop-single-reply.php template so that only the links to replies are there by removing bbp_reply_content() .

    #177890
    Robkk
    Moderator

    Yeah you can probably do it. You may need to customize the bbPress templates in a child theme. Then just add a link where it says to login in html or php. I think the files you will need to edit are in the form-reply.php and form-topic.php files.

    https://codex.bbpress.org/themes/theme-compatibility/

    #177877
    Robkk
    Moderator
    #177866
    siparker
    Participant

    You can use this

    Mediapress BBpress Gallery Insert From Editor


    It works with media press but even if you dont use mediapress it works by adding the img bbcode into the posts.

    #177836
    haddly
    Participant

    Hi there, sorry it has taken so long to reply to this.
    The code you gave me works but the email address overlaps with the text in the post.
    Any idea how to fix that?
    Thanks again

    #177814
    antoinemayer
    Participant

    Hi everyone 🙂

    I want my bbPress threads to be automatically marked as “solved” if the question (first message) gets 50 upvotes (yeah, I know that’s weird) and the upvotes/downvotes to get blocked. Yet, I want the thread to remain “open” even while it is solved, allowing users to keep on writing answers.

    Is there some code (something like “if $upvotes>=’50’ { $threadStatus=’Solved’ };”) I could use to achieve that?

    themichaelglenn
    Participant

    Alright, I probably didn’t do this in the best way, but I figured out how to “fork” your github code and create a separate branch but it’s under my username (I didn’t know if it’s okay to just go creating branches in someone else’s repository, so I just set up in my own):

    https://github.com/themichaelglenn/bbpress-vbulletin-permalink/tree/no-f-s-or-id-s-in-forums

    Again I need to make clear that I do not know what I’m doing – but whatever I did is working on my localhost and on my test site (which site will only be up long enough to test everything on an actual server, so no link to that site, sorry)

    I don’t know if I would still get the topic URLs forum/forum-name/ID-topic-name if I kept removing more code, to get it down to where we were only rewriting the topic URLs? I’d like to try that but I don’t know how much more I can remove before the plugin just stops working altogether.

    #177809
    Robin W
    Moderator

    bbp_get_topic_author_id( $topic_id )

    bbp_get_reply_author_id()

    #177792
    Robkk
    Moderator

    @evanevans333

    It seems that’s all we got to work with. Participant role is not supposed to be for wordpress Subscribers apparently. You need to become something else, to read topics and replies inside forums marked private, and I guess shouldn’t mark a forum private with bbPress unless it’s supposed to be private for Moderators and Administrators.

    That seems so … ridiculous if you pardon my French. That Forum Roles are not for forum privacy, but more for Forum administrative privacy.

    You are probably experiencing a bug, or just some issues with your current configuration, private forum should be for logged in users only. Also a specific forum for mods and admins might be a hidden forum.

    Im skimming through the topic right now, but I will look at this topic more tomorrow morning and see if I need to report any issues.

    What I say that we do is try to fix the private forum issue in bbPress by default without using Robins plugin for now, then when its fixed you can decide to use it later if you want to.

    Run the repair tools one at a time in Tools > Forums. There are a few that are definitely helpful like repairing private forum relationships.

    Editing user role caps for some users could cause issues as well, so we might need to refresh each roles caps, and remap the default ones to users.

    that I am supposed to set their privacy to Public and use some kind of FORUM PRIVACY plugin to make sure the content doesn’t get leaked out to Google and anonymous web surfers.

    If you want a forum for only logged in users setting a forum or parent forum private will do that. Other niche privacy features could be obtained through plugins.

    Now, the issue moving forward is, that topic and reply activity that go on inside those forums, is not properly being set to Private and so those Activities are showing up in widgets and shortcode locations and archives as public information

    Do you want all your forums to be private? It might be better to put anything bbPress as members only content, like just block off sections of your site to only members using a different type of plugin.

    If you do want some forums to be public, then I guess we can use some conditionals for some widgets to display different widgets for logged in users and those who are not. Like say the recent replies widget, I would display only replies from public forums to users not logged in in one widget, and display all replies to users who are not logged in another. If you do want to use Robins plugin, he does have custom widgets in it, but that is if you want group forums.

    #177788
    Robkk
    Moderator

    Sorry to bump this old topic, but I’m looking over some old topics of mine to see if I put any real fixes to some issues where I had to contact people personally to troubleshoot things to find issues instead of guessing.

    On this one I forgot to post the solution to the issue.

    I would like to point out that @xponera posted the code that would fix the issue.

    This issue could be only specific to certain web hosts like one.com hosting, but I am not totally sure on that.

    Here is a step by step guide for users that are using one.com hosting to follow that come across this same issue stated in this topic.

    http://one-docs.com/guides/en/wordpress-login-blocked/

    #177786
    nkwsmo
    Participant

    Hi Guys,
    I am trying to show the most popular topics of last 7days, 30days, all time,
    Is that possible to Adding Custom View Shortcode?

    themichaelglenn
    Participant

    Thanks @siparker

    I’m actually good with forum/subforum/ID-topic-name

    (which for all purposes is the same as the Kunena forum/forumName/topicID-topic-name

    FWIW, I have bbPress set so the “Forums” slug is NOT pre-fixed, so my bbPress URL structure for any given forum is ‘forum/subforum-name’ without any ID, and I removed the lines in your plugin that assign an ID to anything other than the topic name, and everything still works for me.

    (It’s only when I try to remove ID from the topic-name part, that the URLs no longer work – and now I know why) 🙂

    #177781
    evanevans333
    Participant

    Oh my goodness! haha. That’s quite the coincidence, or is it? 🙂

    Regarding your widgets and shortcodes, yes I am aware, but prefer to use my current widgets. The ultimate problem though is how it’s writing information into the Activity Stream in BuddyPress without said information staying under wraps.

    Would you like to provide me a link to your support forum for your plugin (wow man, great job), and we can continue discussing these potential improvements to your plugin over there?

    Best,
    Evan

    #177778
    priom
    Participant

    Hey guys,

    I’ve been slowly configuring css on bbpress (amazing btw) but having some issues with odd and even replies. I added code to add a border for each reply and spaced out the bottom by about 10px.

    All works fine for the first reply (initial topic).
    But for next consecutive ones – the “right” border is missing.

    you can find my site forums at weareoblivion.com/forums

    -> Navigate to General Discussions > Test Topic
    and you’ll see what I mean.

    I added in these to create the borders:

    #bbpress-forums div.odd, #bbpress-forums div.even {
      border: 1px solid rgba(44,130,201,.22) !important;
      border-bottom: none !important;
      margin-bottom: 10px;
    }
    
    div.bbp-forum-header, div.bbp-topic-header, div.bbp-reply-header {
      border-top: 1px solid rgba(44,130,201,.22) !important;
      border-left: 1px solid rgba(44,130,201,.22) !important;
      border-right: 1px solid rgba(44,130,201,.22) !important;
    }

    I have tried different browsers and same issue occurred.
    Tried changing it to add individual borders (like i did for the header)
    – Still the same issue
    Even removed alot css
    – still same issue

    Any help is appreciated please ! 🙂

    #177775
    Robin W
    Moderator

    ok.

    I am the author of the private groups plugin, which I wrote to get over the limitations of bbpress. I have no relationship to bbpress, and can only work with what bbpress gives me, hence we end up with something that is ‘public’ and then using a plugin to make it private.

    …so those Activities are showing up in widgets and shortcode locations and archives as public information

    In the private groups plugin there are shortcodes and widgets that work with my plugin to hide stuff, go into

    Dashboard>settings>bbp private groups

    and look at the ‘widget warning’ and ‘shortcode warning’ tabs you will see the replacements.

    #177768
    evanevans333
    Participant

    Hi Robin, thanks for helping some more…

    What I’m saying is, I used a plugin called BBP PRIVATE GROUPS in order to “privatize” certain forums because the forum was set to be viewable only by people of a certain “group”. In that plugin, the main group is called GROUP1, which I just named “Subscribers” (just a coincidence that I name it that) and I can apply it to everyone who has registered (Subscriber role) on my website across the board.

    Then I set the bbPress privacy of the Forum, to PUBLIC, and made it so that only GROUP1 people can access it in the privacy settings of BBP PRIVATE GROUPS, by setting that Forum to require GROUP1 access.

    It’s an absolutely absurd workaround, because I’m literally setting the privacy to PUBLIC in bbPress and than using another plugin to make the Forum Private, but by doing it this way, at LEAST my Participant Subscribers can access the “Public” forum, so long as they are members of the BBP PRIVATE GROUPS – GROUP 1 “Subscribers” group.

    So basically, I am doing what bbPress should do by default, but as a workaround with an entirely different plugin to handle it. The privacy restriction or permissions could not be properly handled with bbPress setting a forum to “Private”, so I am using that BBP PRIVATE GROUPS plugin to set it to private.

    The ultimate goal of all this, was, to make sure that people who are registered to my site, can view and participate in Forums that anonymous/google/bots cannot see. But when I tried to do that by setting a forum’s privacy to “Private” bbPress annoyingly made it so that Participants registered with my website could go INTO the forum and see the Forum and Topic counts, and could post topics, but could NOT see the topics in there nor replies or reply to anything.

    In order for a role to “See” those Topics and Replies, they had to be a Moderator, Keymaster, or Administrator. Even IF bbPress team wants Participant member caps to behave like this, they should at LEAST provide a role between Participant and Moderator, so that normal registered users of a bbPress enabled website, can participate in forum discussions cutoff from anonymous web viewing because they are set to “private”.

    Now, the issue moving forward is, that topic and reply activity that go on inside those forums, is not properly being set to Private and so those Activities are showing up in widgets and shortcode locations and archives as public information, because those kinds of presentations of the information inside those forums are not governed by the BBP PRIVATE GROUPS plugin. In other words, it’s a mess, and this really should be handled by bbPress. bbPress should give us the ability to modify caps on Participant, or like I said, at least provide a ROLE that is an inbetween that is compatible with the development of all other plugins that work with bbPress (ie: we need bbPress to create this role as a standard).

    #177765
    Robin W
    Moderator

    ok, without having time to do all the work, I’ve quickly edited this bit of code – it may need debugging, but should get you there with some playing

    add_filter( 'wp_nav_menu_items', 'rew_edit_profile', 10,2 );
    
    function rew_edit_profile ($menu, $args) { 
    global $bsp_login ;		
    if (!is_user_logged_in())
    		return $menu;
    	//if primary set and not primary then return
    	if ($args->theme_location !== 'primary' )   {
    		return $menu ;
    	}
    	
    	else
    		$current_user = wp_get_current_user();
    		$user=$current_user->user_nicename  ;
    		$user_slug =  get_option( '_bbp_user_slug' ) ;
    			if (get_option( '_bbp_include_root' ) == true  ) {	
    			$forum_slug = get_option( '_bbp_root_slug' ) ;
    			$slug = $forum_slug.'/'.$user_slug.'/' ;
    			}
    			else {
    			$slug=$user_slug . '/' ;
    			}
    			//set link to welcome xxx
    			$edit_profile= 'Welcome!'. esc_html( $current_user->user_firstname ) ;
    						
    			//get url
    			$url = get_site_url(); 
    			$profilelink = '<li> <a href="'. $url .'/' .$slug. $user . '/edit">'.$edit_profile.'</a></li>';
    			
    
    			
    		$menu = $menu . $profilelink;
    		return apply_filters( 'rew_edit_profile', $menu );
    }
    siparker
    Participant

    @themichaelglenn @readmenow
    You are welcome.

    No one actually made any contributions in the end.

    the f- part of the plugin was in order to replicate exactly my old vbulletin urls. So it can be removed if not required for your install.

    We are just putting a few final touches to our bigger plugin for bbpress / buddypress which includes all the various bits of development we have done in order to make bbpress work more like vbulletin. should be launching in the next few weeks. One of the main aprts of this is i want a configurable permalink structure part in there so things can be added / removed from the rewrite rules to provide variations on the hierarchy.

    One thing is the way it deals with forums and subforums.

    for your query about removing the number before the forum name and the structure bit

    The URL for the child forum is now

    forum/square-enix/final-fantasy-vii

    and I want it to be

    forum/final-fantasy-vii

    The interesting thing is that the topic “Cloud’s Limit Break” still shows as

    forum/final-fantasy-vii/143-cloud-s-limit-break

    which is the URL structure that I want, when someone clicks on a topic, so I’m happy with that.

    But I can’t seem to figure out how to remove the parent or top level forum from the forum URL.

    You Cannot currently remove the identifying number from the last url part.

    if it is a forum or a topic or a reply you must have the ID of the final item in the last url part.
    the reason for this is because of the way BBpress saves these as custom post types the id is required to determine what post type it is. forum topic or reply.
    without the ID you cannot govern what is displayed. There is no other (correct me if i am wrong @netweb ) for the system to know if /new is a forum a reply or a topic without the id being passed in.

    We can certainly build it so the Id is after the name rather than before it. i will sort that out so it works.

    So you can have

    forum/subforum/ID-topic-name
    or
    forum/ID-topic-name
    or
    forum/subforum/topic-name-ID

    for topics to be shown. basically the pieces preceding the final topic item are not really relevant its just what you want in there. you can have as much or as little hierarchy as you want. So long as the ID is in the last url part.

    however you cannot have

    forum/subforum-name/ because we must have an ID

    so it would always be

    forum/ID-sub-forum-name/ or forum/subforum-name-ID/

    IF you check you can actually remove mostly anything before the final url part which contains the ID. discussion on that in github where i explain why this is not an SEO problem. its how most things work in WP.

    If you want to post your current forum structures here i will create permalink optioins to replicate these. or rewrites to deal with moving from them to the new structure.

    I have the Kunena one from above

    forum/forumName/topicID-topicName

    #177748
    skyynet
    Participant

    Since installing 2.5.10 of the BBPress Plugin the corresponding function improved a bit. The function which creates the noreply sender sits in includes/common/functions.php and reads

    function bbp_get_do_not_reply_address() {
    	$sitename = strtolower( $_SERVER['SERVER_NAME'] );
    	if ( substr( $sitename, 0, 4 ) === 'www.' ) { $sitename = substr( $sitename, 4 ); }
    	return apply_filters( 'bbp_get_do_not_reply_address', 'noreply@' . $sitename );
    }

    In my case the domain is something like subdomain.domain.de

    The above function creates the noreply address noreply@subdomain.domain.de
    Correct would be (in my case) noreply@subdomain.de

    IMHO the function could create the sender by parsing the $sitename from right to left (TLD DOT DOMAIN until DOT or //). I was too lazy and just added my specific case

    function bbp_get_do_not_reply_address() {
    	$sitename = strtolower( $_SERVER['SERVER_NAME'] );
    	if ( substr( $sitename, 0, 4 ) === 'www.' ) { $sitename = substr( $sitename, 4 ); }
    	else if ( substr( $sitename, 0, 10 ) === 'subdomain.' ) { $sitename = substr( $sitename, 10 );}
    	return apply_filters( 'bbp_get_do_not_reply_address', 'noreply@' . $sitename );
    }
    #177730
    ajiaim
    Participant

    I have a top menu that I want to display Welcome Username once the user logs in and ideally once they click it they get taken to their profile page on BBPress/BuddyPress.

    My original code was as below but it only showed log out once the user logs in.

    add_filter( 'wp_nav_menu_items', 'woohoo_add_auth_links', 10 , 2 );
    function woohoo_add_auth_links( $items, $args )
    {
    	if( $args->theme_location == 'topmenu' )
    	{
    		if ( is_user_logged_in() ) {
    			$items .= '<li><a href="'. wp_logout_url() .'">Log Out</a></li>';
    		}
    		elseif ( !is_user_logged_in() ) {
    			$items .= '<li><a href="'. site_url('wp-login.php') .'">Log In</a></li>';
    			$items .= '<li><a href="'. site_url('wp-login.php?action=register') .'">Register</a></li>';
    		}
    	}
    	return $items;
    }

    I then changed it to the below but it doesn’t link or align up nicely…

    add_filter( 'wp_nav_menu_items', 'woohoo_add_auth_links', 10 , 2 );
    function woohoo_add_auth_links( $items, $args )
    {
    if( $args->theme_location == 'topmenu' )
    {
        if ( is_user_logged_in() ) {
        $current_user = wp_get_current_user();
        printf( 'Welcome %s!', esc_html( $current_user->user_firstname ) );
        }
        elseif ( !is_user_logged_in() ) {
            $items .= '<li><a href="'. site_url('wp-login.php') .'">Log In</a></li>';
            $items .= '<li><a href="'. site_url('wp-login.php?action=register') .'">Register</a></li>';
        }
    }
    return $items;
    }

    Any ideas?

    #177725
    Robkk
    Moderator

    bbPress doesn’t have any fontawesome css file.

    Check to see if its a theme or plugin. Most likely a theme.

    Try some plugin and theme troubleshooting.

    https://codex.bbpress.org/getting-started/troubleshooting/

    #177720
    Robkk
    Moderator

    @robin-w

    Oh no problem Robin. 🙂

    I should have stated its just my opinion that we should try to help users that may come across “forum page” related issues by creating a guide in the codex to better explain how to do it, and show how helpful it would be, but more importantly stop all these similar issues users would get that I see in these forums all the time, so that us moderators do not have to repeat ourselves or try to guess what could be causing an issue.

    You can either change recommended in my earlier statement with required. As it is not required during setup. I am sometimes terrible at choosing the right words to explain what I mean. Great that you pointed that out Robin!

    And although yes, it is recommended for further customization of a users forums in the settings. Like I said, my opinion is that the “forum page” is not recommended, until most of the user generated issues are laid out with possible solutions for users in a new guide, and either we or anyone that wants to can make a trac ticket to avoid these type of issues all together, and improve the bbPress plugin user experience.

    I would like to talk to you privately through email if you have time, about improving your codex guides also, and I do not want to butt heads with you over just some guides.

    Edit: Created the ticket https://bbpress.trac.wordpress.org/ticket/2993

    #177718
    Robin W
    Moderator
Viewing 25 results - 5,926 through 5,950 (of 32,505 total)
Skip to toolbar