Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 6,451 through 6,475 (of 32,519 total)
  • Author
    Search Results
  • #174669
    Kineta
    Participant

    I achieved this by using jquery/javascript to set those fields to be hidden, then copy over the value from the field that’s visible to the hidden fields.

    I’ll post my code if you’d like. It’s easy enough to do.

    #174668
    truelux
    Participant

    I would like to remove the LINK associated with the Admin username.

    I placed the following into my child-theme’s functions.php file:

    /* Remove link urls from forum author instances */
    add_filter( 'bbp_get_author_link', 'remove_author_links', 10, 2);
    add_filter( 'bbp_get_reply_author_link', 'remove_author_links', 10, 2);
    add_filter( 'bbp_get_topic_author_link', 'remove_author_links', 10, 2);
    function remove_author_links($author_link, $args) {
    $user_id = bbp_get_reply_author_id( $reply_id );
    			$user_info = get_userdata($user_id);
    			$bbpadmin = $user_info->user_login;	
    	if ($bbpadmin == "ADMINUSERNAME") {
    		$author_link = preg_replace(array('{<a[^>]*>}','{}'), array(" "), $author_link);
    		return $author_link;
    		} else {
    		return $author_link;
    		}
    }

    This works fine but I noticed the link still appears when viewing “last responded.” Removing the link from just Admin helps with security since the username won’t be out in the public.

    #174636

    Topic: Edit Filter

    in forum Troubleshooting
    jawittdesigns
    Participant

    When you go to edit a topic or reply what filter is used to render the content in the editor.

    The issue I’m having is I have markdown support for the forum instead of the normal code button.

    So I use three back ticks at the beginning and end for code blocks. It works fine until you go to edit. Something is stripping out 2 of the back ticks on the code block.

    I figure its a filter, but I can’t figure out which one.

    bbPres v2.5.9
    WordPress v4.5.1

    #174624
    David Tierney
    Participant

    Yes, if a functions file exists, you would copy and past it there, anywhere before the closing php tag if there is one at the end of the functions file. You should see bunches of code in your functions.php file so you do not want to break up any group of code, just like the group above needs to be together with itself as he wrote it.

    IF you do not have a functions.php file in your child theme, you can create one. Read up here to learn more. https://codex.wordpress.org/Functions_File_Explained

    #174616
    Stephen Edgar
    Keymaster

    Regarding option 1, is it even possible and does such a script exist?

    Yes, there one, maybe two scripts, but they are quite out of date.

    Regarding option 2, what are the required wp_postmeta keys I would need to generate?

    Have you looked at the internals of any of the ~25 importers included with bbPress?

    phpBB and SMF are the two most “feature complete” in that they import nearly 100% of the required wp_postmeta fields.

    A basic example version of an importer is included, Example.php in the `/includes/admin/converters/ folder, its fairly basic, when comparing it with either the phpBB or SMF importers it might make more sense. There is also some initial documentation on modifying this yourself https://codex.bbpress.org/getting-started/importing-data/import-forums/custom-import/

    If you upload to https://gist.github.com/ or somewhere, take a screenshot of it from phpMyAdmin I’ll happily help you get it up and running.

    Also, I suggest using bbPress 2.6-alpha, loads of importer improvements over bbPress 2.5.9, you can grab it from here https://bbpress.org/download/

    #174604
    wilsonca
    Participant

    I’m having the same problem except that it is erratic. Sometimes the login goes well and other times users are unable to login. In every case, however, the user is directed to the Home page instead of the Forum page. When things don’t go well, a user clicks on the Forum page where it shows that he is not logged in, even though he just logged in.

    I do not understand any of the above fixes. I am certainly a newer Newbie than the original poster. I already have half a dozen or so participants trying to use the forum, so I can’t afford to uninstall, reinstall, or otherwise upset the current status of the forum.

    I’m hoping someone here can explicitly tell me just how to correct this problem especially if it involves adding/replacing/editing code since I have no idea where to begin when it comes to this.

    Thank you.

    mvaneijgen
    Participant

    I have the link but I need to add the username in the url and I don’t see how I can get that in the .PO file

    /leden/USERNAME/forums/abonnement/

    Other topic is there maybe a way for really active people on the forum to unsubscribe from emails and just see the notification counter on the website,

    #174587
    Kineta
    Participant

    This is my code, fwiw. I don’t want any role but keymasters to add tags. Participant level is working as expected i.e *not* showing but the moderator level is still showing the tag field.

    add_filter( 'bbp_get_caps_for_role', 'my_bbp_role_caps', 10, 2 );
     
    function my_bbp_role_caps( $caps, $role ) {
       if ( $role == 'bbp_participant' ) {
          $caps['assign_topic_tags'] = false;
       }
       if ( $role == 'bbp_moderator' ) {
          $caps['assign_topic_tags'] = false;
       }
       return $caps;
    }
    #174584

    In reply to: Forum List

    Robin W
    Moderator

    not quite sure what you are after.
    can you not use the shortcodes

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

    #174554
    Soul
    Participant

    Thank you Robkk for your reply.
    This works fine.
    One question. As i can see it is only after author details. Is it possible to put it after the reply either? like on the screenshot.
    What will be the action code for this section?

    Thanks

    Best regards

    #174540
    Stephen Edgar
    Keymaster

    Having created a 2nd keymaster user this sounds like a plugin conflict, follwo the steps here to see if you can narrow down which plugin is causing the conflict

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

    #174539
    Stephen Edgar
    Keymaster

    For the bbp_setup_current_user issue see:

    bbp_setup_current_user was called incorrectly

    Most likely all the above replies which are *not* the same thing, they are all different errors are caused by the same thing though, a plugin or theme conflict.

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

    #174538
    Robkk
    Moderator

    Maybe try something like this I guess. Place this php code snippet into your child themes functions.php file or use a plugin like functionality.

    add_action( 'bbp_theme_after_reply_author_details', 'rkk_add_reply_link' );
    add_action( 'bbp_theme_after_topic_author_details', 'rkk_add_reply_link' );
    function rkk_add_reply_link() {
     if ( is_user_logged_in() ) {
    	echo bbp_get_reply_to_link();
     }
    }
    #174536
    Robkk
    Moderator

    @zimmermannc You can use this code php code snippet/plugin and it will put the forum form in bbPress user profiles for users that can moderate.

    https://gist.github.com/ntwb/9887310

    #174535
    Robkk
    Moderator

    You can use something like this.

    Add this php code snippet into your child themes functions.php file or add the function to a plugin like functionality.

    add_action( 'bbp_theme_after_topic_author_details', 'rkk_add_register_date' );
    add_action( 'bbp_theme_after_reply_author_details', 'rkk_add_register_date' );
    function rkk_add_register_date() {{ ?>
      <span class="bbp-user-register-time">
        <?php printf( __( 'Member since: %s',    'bbpress' ),
        date( get_option( 'date_format' ), strtotime( get_the_author_meta( 'user_registered' ) ) )
        ); ?>
      </span>
    <?php }}
    #174512
    Stephen Edgar
    Keymaster

    This seems to be after 24-36 hours of run time, so I am not sure if I am running across some sort of session expiration or what.

    Yes, that is exactly what you are coming up against, on the technical side, its WordPress dropping the MySQL session, the work around is to every few,4,6,8,12 hours even is to open a new browser tab and refresh a WordPress admin page and that should stop those ------

    Is it possible to re-run an import, picking off where it left off?

    It’s supposed to, there’s some improvements here coming in bbPress 2.6, I also strongly suggest using 2.6-alpha available from https://bbpress.org/download, there will be no more import changes before 2.6 ships and there are vast improvements to importing in 2.6.

    Give it a try and let me know it goes 🙂

    #174504
    zimmermann.c
    Participant

    I was not aware that shotcodes even existed for bbp.
    Further to your advice I seached and found the documentation of all the SC’s. This is a great step for me.
    Thank you for your help

    #174497
    Soul
    Participant

    Anyone who has find something? I did not find any info about it.

    Can any one help me on this? I will pay for the code.

    #174495
    giobby
    Participant

    I leave this reply for those who faced the same issue and also for the developers who may find where the problem is.

    From one side we have a wrong author getting associated to the wordpress posts (forum, topic and replies).

    One thing that can be done to fix this after having run the import is to match the date and time of the post, the ip address of the author and potentially the last 8 characters of the content (will not work if it’s a smiley or bb code).

    This would fix the issue even if I can’t guarantee it will work for all the dirty posts.

    The second thing, even more worrying, is the fact that certain authors are associated to the topics/replies with their old PHPBB user_id.
    It’s easy to spot them because those dirty posts won’t join with the wp_user table and therefore they are reported as anonymous users in the website.

    One way to fix that after the import is to update all those old PHPBB ids by replacing them with the corresponding wordpress users ids (just join on email address).

    nateonawalk
    Participant

    Hey all, an update —

    Sooo this project turned into something much larger than anticipated. What seemed like a quick PHP permutation turned into a massive 100 hours+ job that is still ongoing. We’ve effectively created a complete out-of-the-box pretty permalinks solution that even folks with pre-existing bbPress forums will be able to safely turn on and use. We’ve thrown out the previous fork and are re-writing everything with our own code from scratch.

    That said, the opportunity cost I’ve incurred is quite large and we’re still a couple weeks off from completing things. Every time we do a re-write, a bunch of new broken use-cases emerge. We’ve gotten offers from a couple plugin development companies to buy the plugin from us as well — so we’re trying to decide what best to do with the resources that we have.

    Just want everyone to be aware of progress!

    Thanks~

    #174485

    In reply to: Image upload advice

    mica123
    Participant

    @robkk many thanks as always! It took me a while to work out that I had to disable the code for enabling the Tinymce in my own functions.php before the plugin started to work as expected.

    #174476

    In reply to: Comments on Topics

    Robkk
    Moderator

    There is no special optionYou would have to edit the bbPress templates, and I guess replace the reply form with the comment form.

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

    And I guess you might need to do more work like remove any other mentions of replies in bbPress entirely like in topic/forum stats, notices/descriptions, user profile data, activate show lead topic, find a plugin to allow mods to move comments to other topics. Then you might need to find different plugins that you need if you want quoting, attachments, bbcode, and more for custom features.

    Then I guess if you want to ever leave bbPress with your custom comments integration, you will need to create a custom import for whatever you are importing to.

    Still do not recommend it, but if you really really want I suggest hiring a developer if you do not have the knowledge or time to do all of this by yourself.

    #174453
    Robkk
    Moderator

    @maketheest

    When you enable the tinymce editor in bbPress, for now you have to edit that snippet you posted and edit it for every buttons html tags that you will end up using. Whenever you may be quoting another user using a different plugin you may need to use the paste as a text php code snippet in the guide.

    https://codex.bbpress.org/enable-visual-editor/

    Read this WordPress guide about the character entities.

    https://codex.wordpress.org/Writing_Code_in_Your_Posts

    #174447
    mica123
    Participant

    Hello,

    I’ve been looking into image uploads. It seems that it is not easy for participants to upload photos etc. I take it that users are supposed to type in the path to the file in the Source field in the WYSIWYG editor – I doubt that users would know how to do that.
    I found this topic here in this forum.
    Could somebody perhaps advise me if the code that is suggested would be the right way to go or would the plugin be better?
    Many thanks.

    #174413
    rothaar
    Participant

    Hi Robkk,

    no, it wasn’t turned into von. It looks like this: http://screencast.com/t/FLR74UlGQaYp

    Are you planning to have a multilingual single site? You might be on to something here if you are trying to run a multilingual single site.

    Yes, that was the idea, but I keep running into so many issues with this that I’m now starting to consider separate installations.

    One of the issues is that a multilingual single site requires a translation for forum posts for them to show up at all. I would like users to be able to access my website in their language (menus, buttons etc) and write forum posts in their language without the need of a translation.

    However, if I post something in English it will not show unless I translate the post into German and vice versa. You can imagine that it would not be feasible to translate every forum post. If I deactivate the translation of replies, then part of the interface won’t be translated either.

    I’m not sure though if I can create one community if I separate the installs for the languages. E.g. I would still like users to be able to contact each other via private and public messages and post in the German and/or the English forum. Member lists should show members of both sites etc.

    I’ve not looked into this yet so I don’t know if this can be done.

    Just so you know, I thought the root issue could be the “by” not changing in your forums is because it might have outputted the text using code from a custom phpbb starter pack theme created by @lynq, here is an example of the custom forum freshness column from the starter pack.

    https://gist.github.com/ntwb/3133450

    I see what you mean. I think I’ll check with the author of my theme (Buddy) and see what he says. Thanks for the tip!

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