Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 5,951 through 5,975 (of 32,519 total)
  • Author
    Search Results
  • #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
    Robkk
    Moderator

    Is the TinyMCE editor showing in your regular topic forms as well?? If not then you would have to just enable Post Formatting in Settings > Forums.

    What specific code did you use to enable the visual editor.

    Does the forum form page work fine in a WordPress default theme like TwentySixteen. If not this could be plugin related. If it works fine then it is theme related and some function in your currently active theme could dequeuing bbPress scripts.

    If it is plugin related it could be a plugin that dequeue bbPress scripts unless its on forum pages.

    It might be possible to come across this issue while trying to minify or combining JavaScript files too.

    Anthony Carbon
    Participant

    Hi Guys,

    I create a page where I can create a new forum. I have several solutions on how to display the visual editor (WYSIWYG, Rich text editor) using this shortcode [bbp-forum-form] but it is not working. instead it gives me a plain textarea without visual editor (WYSIWYG, Rich text editor).

    Solution found but not working on my end

    #177708
    Robin W
    Moderator

    @Robkk

    I usually do not say use a “forums page” as it is not recommended during setup

    1. Can’t see where it is not recommended -Indeed in dashboard>settings>forums it says “Customise your Forums root. Partner with a WordPress Page and use Shortcodes for more flexibility.”

    2. There’s a massive difference between recommending something and saying ‘it is not recommended’ As far as I know bbPress is just neutral – either works fine.

    #177705
    Robkk
    Moderator

    I was just pointing out that its possible that you may need to use another conditional as well if you did create a “forum page”.

    So you would possibly need another conditional for a user created “forum page”. If you didn’t already make sure that the “forum page” was set to have the same page slug as the default forums slug in your site set in Settings > Forums.

    An example of the additional conditional you would use would be is_page{1} where “1” is the specific page ID of your “forums page”.

    if (!is_bbpress() || is_page(1) ) {

    You can also use is_page(‘forums’) as well instead.

    https://developer.wordpress.org/reference/functions/is_page/

    I usually do not say use a “forums page” as it is not recommended during setup, but it could be useful to workaround bugs that I think usually happens when using a Genesis theme, but I guess use it until the bug is fixed in bbPress/Genesis. Well if there is still a bug.

    I would contact your theme developers support since you have a paid theme, and they can help you better since they understand the code in that specific theme, and only if you really want to dig into the code and modify it like your trying to do, or you can just use a plugin like Widget Logic to use a conditional to hide/display widgets depending on certain conditionals like is_bbpress() and is_page{}.

    #177700
    Robkk
    Moderator

    Have you tried any plugin and theme troubleshooting??

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

    #177696

    In reply to: Threaded layout

    xmanca
    Participant

    OK so I’ve had some limited success thanks to your help, but I am stuck on where the replies are displayed. What I have now is the main topic on top and then the paginated replies below.

    I would like to get the replies to only be shown as links to the actual replies. I believe that I have isolated where this is in the code:
    line 45 of the includes/replies/function.php
    $reply_id = wp_insert_post( $reply_data );

    Am I on the right track here or totally off base?

    #177695

    In reply to: Threaded layout

    xmanca
    Participant

    OK so I’ve had some limited success thanks to your help, but I am stuck on where the replies are displayed. What I have now is the main topic on top and then the paginated replies below.

    I would like to get the replies to only be shown as links to the actual replies. I believe that I have isolated where this is in the code:
    line 45 of the includes/replies/function.php
    $reply_id = wp_insert_post( $reply_data );

    Am I on the right track here or totally off base?

    #177694
    evanevans333
    Participant

    Does this code still work? I tried it and am not seeing any results. I would like to be able to create sub-forums on the front end (as Admins/Mods).

    themichaelglenn
    Participant

    @siparker @natesirrah Thank you both for your work on this plugin! Any news on where the current project stands? I’ve just used siparker’s github plugin and it seems to be work, but if there’s a better, improved version, I’d love to know about it and/or help test it.

    I’m working on migrating a site that I’ve had up for just over a year, from Joomla 3.4 to the current version of WordPress. I use Kunena forums, and by making some slight modifications to siparker’s plugin on github, I was able to set my bbPress URLs to match the structure Kunena uses, namely:

    forum/forumName/topicID-topicName

    (I don’t think they actually use forumName, topicName, etc., that was just the easiest way for me to write it out)

    so that when my forums are set up like this:

    Forum = Final Fantasy VII
    Topic = Cloud’s Limit Break

    I have, for example:

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

    I should tell you that the only experience I have with php is a couple of 4-hour courses on udemy (in other words, not that much…) Still, by very carefully changing or removing one line at a time, I was able to produce the desired result.

    One thing that didn’t quite work out, though, was forums within a top-level category. For example:

    Top Forum = Square Enix
    Child Forum = Final Fantasy VII
    etc.

    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.

    Everything I’m doing is on localhost, as I don’t want to change my site over to WordPress until I’ve got all the details worked out, and I’m brand new to web development so I’m not sure exactly how to share my code with you guys, or if I need to share it all or perhaps just a part of it? So if you can help me with that, I’ll be happy to share.

    Meanwhile to any bbPress devs following the thread, I want to say thank you for all that you do, and please consider making this permalink option part of the bbPress core!

    I have been wanting to move from Joomla to WordPress for months, as I tend to believe that WordPress is overall easier and better for me and my users, and one of the few things that’s prevented me from making the move was the lack of options in bbPress permalinks. I strongly agree that the URL for a topic should include the name of the forum that topic resides in. (Or at least, admins should be able to choose that option, if they want it.)

    #177690
    crayc
    Participant

    Ah yes I did go the shortcode route. So what other ways are there, I did not see another option. thanks

    #177686
    Robin W
    Moderator

    I still can’t seem to mod the caps of Participant role.

    ok, I’ll bite once more – can you post EXACTLY what you have as code to fix that, and tell me where you have put it.

    and set the forums I wish to be private, to PUBLIC (ironic and backwards that is)

    Private groups is my plugin, and yes agree gthat public seems wrong, but I can only work with what bbpress gives me, and use code to improve !

Viewing 25 results - 5,951 through 5,975 (of 32,519 total)
Skip to toolbar