Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 12,251 through 12,275 (of 32,504 total)
  • Author
    Search Results
  • #144513
    Stephen Edgar
    Keymaster

    Nice, sad I missed this thread up until now 😉

    Starting from @adressler 2nd post here are my thoughts:

    @adressler wrote…
    My crazy idea that I had was to import these “old” authors as, effectively, name placeholders. Bogus/null values for user_pass and user_email, a php-generated user_login (something like “judygarland-old”, “abcdef12345-old” or similar), user_id (unique Auto Increment #), display_name (“Judy Garland”), and maybe user_nicename.

    I’m with you here and I’ll come back to how to do the above shortly.

    @adressler wrote…
    These would only be used to show the Authors first + last name next to all of the old topics and replies I just imported from Lotus (they will not be logging in). When users re-register, they would create a completely new WP user (I’m using s2member to handle subscription info).

    Still with you, I think this is a good plan.

    @adressler wrote…
    I realize that “new” users will not be able to see their “old” user’s topic / reply counts, and total user counts will not be completely accurate, but that’s okay and manageable.

    Still a good plan, we can fix the above ‘after’ they registered their new account.

    @adressler wrote…
    At least they could create their new user accounts themselves, and I wouldn’t be responsible for making s2member link up properly with these old users.

    Correct, let the users do that themselves.

    @robin-w wrote…
    The real issue here is whether you can get email addresses. If you can, then if you import users as per my previous, they can use “password lost” to re-do their passwords, and then it’ll all be fine.

    As per my first comment of what I will come back to shortly, we don’t need actually need an email address for this.

    @robin-w wrote…
    Additionally logon names need to be unique so they can’t register with any existing username !

    I’m going to have to check that my solution doesn’t break because of this, it is ready to be committed and ready for bbPress v2.6 😉

    @robin-w wrote…
    I’d do as previous and create a user table to import, but call each user ‘old_xxx’ – you can do this before import, effectively your placeholder.

    Again, I shall return and no need for the old_ prefix on the username.

    @robin-w wrote…
    As each user registers, you can run some code around the posts to remap them. You’ll get a registration notice, so if you cut some code, then you can just run this each time someone registers. Basically you would just enter there old username and their new one. The code would look up the old ID, the new ID, and then run through posts to remap to the new user. If you’d like help with that, just let me know and I’ll try and cut a quick loop code that you can run straight on the website (pw protected of course)

    90% of this is actually built into bbPress and again I just need to test this against my solution, as I type this I am thinking maybe a custom one will be needed but shouldn’t be too hard to write a tool for it to integrate with my proposed solution as no doubt others would probably also require this. 😉

    @adressler wrote…
    I was able to export users from Lotus into a new users table. The table structure is:

    That table looks fine, it shouldn’t matter what the old user_login name is as we will primarily use the user Display Name and/or User Nicename.

    @adressler wrote…
    I linked up my custom converter and was able to import users successfully into BBPress without the need to include a bogus email or password. In the WP database, all of these “old” users have an auto-generated password, and no email address. Now, at least all of these old user display_names are showing next to the posts they authored (instead of all “anonymous”).

    Cool, though my plan is to purposely make them Anonymous 😉

    With a couple of tweaks as we get closer to what I propose I think we can adapt your importer to use the code I have already written.

    @adressler wrote…
    Is it still possible to write a loop to link these old user accounts to the newly registered users even though there’s no email addresses? I’m okay with the forum working the way it is now, but if there’s a way to link newly registered accounts with the old ones, I’d sure like to try. I’m guessing the only way to do it is to match by the old user display_name, which, from what I can tell, is unique to the users db; no two people have the same name. It would just depend on people remembering the name they used to registered on the old site (some people are registered as “John and Jane Doe”). And if someone signs up who coincidentally has the same name as an old user, there could be some confusion.

    As per what I wrote above, part of this is already built into bbPress and a little bit of testing in what we need to do to handle this properly then tweak the code we should be good.

    @adressler wrote…
    I just had a thought, what about a checkbox during registration like “Attempt to link my old DynamiteOnline account”, and when checked it would try to link up the names?

    Maybe…

    @robin-w wrote…
    If auto the system won’t let you have two usernames the same, so you’d need to change your existing usernames to say have a character in front eg x_john smith (sql loop through user database would do that). Then brief your users to register with their existing username eg just john smith.

    We don’t need to worry about this because each user would be Anonymous 😉

    @robin-w wrote…
    The real solution if you don’t have tons of users is to go for a manual registration process, you can of course let then use the same username, as you can then generate a user with a php programme straight into the database.

    Let the users register whatever name they want as long as it is not already in use they will do the registration and sign up.

    Automating this would be a pain for the high chance of abuse that could occur.

    As there isn’t old email addresses for the old users verifying who’s who really should be a manual verification process in my opinion.

    Nothing pretty or easy !

    It took me ~7 months to come up with my solution with a few tips and advice from others who first floated the idea but I think it is relatively pretty now. 🙂

    But a solution is there somewhere !

    Yes it is 😉

    I’ll go dig out now and have a quick read and post it shortly 🙂

    Nino
    Participant

    Hello to all 🙂

    I have a question is it possible to modify by code or by plugin the Widget (bbPress) Recent Topics that way:

    For logged in users links are on.
    For all not logged in the links are off. They only see the text.

    Does anyone has a hint for me?

    Thanks and greetings

    Nino

    Piani
    Participant

    After looking into child theme and options to make a complete theme for BBPress 2.5 I want to share this. (Unfortunatly the web is flooded with usless 1.0 tips)

    If you are not that into setting up a complete BBPpress child theme and hacking CSS, this is one simple way of doing a easy change and customisation of BBPress if u want some personalized look and you already have a child-theme style.css but your main-theme style is messing with BBPress looks.

    Add this snippet into your normal child-theme style.css and change the colors and font size as you like.

    
    /* BBPress font fix */
    
    #bbpress-forums li.bbp-header,
    #bbpress-forums li.bbp-footer {
    background: #D6E0FF;
    }
    
    #bbpress-forums div.bbp-forum-title h3,
    #bbpress-forums div.bbp-topic-title h3,
    #bbpress-forums div.bbp-reply-title h3 ,
    #bbpress-forums a.bbp-forum-title,
    #bbpress-forums a.bbp-topic-permalink {
    	font-size: 16px;
    	color: #0066FF;
    }
    
    #bbpress-forums a.bbp-author-name {
    	font-size: 12px;
    	color: 	#75A3FF;
    }
    

    Thats all. All other style is already looking nice I think. I use this blue look in my Techism child-theme and it looks great. Running BBPress 2.5.3.

    Robin W
    Moderator

    Ok, sorry yes I get it now !

    Try

    function hide_before ($args = array() ) {
    $args['before'] = '';
    return $args;
    }
    add_filter ('bbp_before_get_forum_subscribe_link_parse_args','hide_before') ;
    

    Let me know if it works – it is blank by default, so not sure why your’s has a | in it.

    Majijiboo
    Participant

    The theme is Divi which is from Elegant Themes and the plugin is BBpress Notify. I used the below function to change it from Subscribe to “Click to receive…”. Thanks.

    
    function change_translate_text4( $translated_text ) {
        if ( $translated_text == 'Subscribe' ) {
        $translated_text = 'Click to receive an email notification when a member responds below';
        }
        return $translated_text;
    }
    add_filter( 'gettext', 'change_translate_text4', 20 );
    
    #144475
    smoker450
    Participant

    Hi there, I was reading this ticket (https://bbpress.trac.wordpress.org/ticket/2504)
    It appears as though this issue has been addressed, and they say that the forum should be visible when using shortcodes, but it is not working for me.

    I am using [bbp-forum-index] on a page, and that page is not visible on mobile, but the other pages of the forum are that are not using shortcodes.
    Any help would be appreciated.

    here is the page using shortcodes, (http://motocrossnw.net/forum/) you can just drag the corner of your browser and make the window small to replicate the issue.

    #144470
    shpitzyl
    Participant

    The script in the link is working, you probably haven’t closed it with php tags.

    Put this in bp-custom.php in the plugins folders

    <?php
    function bp_exclude_profile_tabs() {
    global $bp;
    
    $bp->bp_nav['forums'] = false;
    }
    add_action( 'bp_setup_nav', 'bp_exclude_profile_tabs', 999 );
    ?>
    

    If you prefer to do it with css, you need to copy bbpress.css from:
    plugins/bbpress/templates/default/css

    And put it in:
    themes/[your child theme folder]/css

    (if you don’t have a css folder in your child theme, create one)
    Then put the css rule mentioned above somewhere in the file.

    #144462

    In reply to: Display index + topics

    Piani
    Participant

    Tnx for the tips. I will play around with those shortcodes 🙂

    #144460

    In reply to: Display index + topics

    Stephen Edgar
    Keymaster

    In that case create a page and use the single forum shortcode multiple times.

    <h3>Index 1</h3>
    [bbp-single-forum id=1]
    <h3>Index 2</h3>
    [bbp-single-forum id=2]
    <h3>Index 3</h3>
    [bbp-single-forum id=3]

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

    #144452
    Robin W
    Moderator

    This is doable with some code, but obviously no-one has thought it critical enough to code it – sorry !

    #144444
    adressler
    Participant

    Hi Robin,
    I was able to export users from Lotus into a new users table. The table structure is:

    users {
       user_id INT(11) PRIMARY KEY AUTO INCREMENT
       display_name VARCHAR(250)
       user_nicename VARCHAR(50)
       user_login VARCHAR(60)
    }

    Data sample:

    
    +-------------------------------------------------------------------------------+
    |  user_id  |   display_name   |   user_nicename   |  user_login                |
    +-----------+------------------+-------------------+----------------------------+
    |   555     |     Jane Doe     |     jane-doe      |  old_123456789abcde12345   |
    +-----------+------------------+-------------------+----------------------------+
    

    You will notice I was not able to export any email addresses, or passwords from Lotus. I linked up my custom converter and was able to import users successfully into BBPress without the need to include a bogus email or password. In the WP database, all of these “old” users have an auto-generated password, and no email address. Now, at least all of these old user display_names are showing next to the posts they authored (instead of all “anonymous”).

    Is it still possible to write a loop to link these old user accounts to the newly registered users even though there’s no email addresses? I’m okay with the forum working the way it is now, but if there’s a way to link newly registered accounts with the old ones, I’d sure like to try. I’m guessing the only way to do it is to match by the old user display_name, which, from what I can tell, is unique to the users db; no two people have the same name. It would just depend on people remembering the name they used to registered on the old site (some people are registered as “John and Jane Doe”). And if someone signs up who coincidentally has the same name as an old user, there could be some confusion.

    I just had a thought, what about a checkbox during registration like “Attempt to link my old DynamiteOnline account”, and when checked it would try to link up the names?

    You’re right, nothing is “simple”.. lol. I really appreciate your ideas here, and thanks so much for your time.

    Aaron

    #144436
    Robin W
    Moderator

    This warning is contained in three templates all in
    wp-content/plugins/bbpress/tempates/default/bbpress/

    form-forum.php
    form-reply.php
    form-topic.php

    You can create a folder in the root of your theme called ‘bbpress’ and copy these three themes to it, and then alter this text to read whatever you like, or remove it.

    Or you could add the following code to your functions file

    //This function changes the text wherever it is quoted
    function change_translate_text( $translated_text ) {
    	if ( $translated_text == 'Your account has the ability to post unrestricted HTML' ) {
    	$translated_text = 'new text';
    	}
    	return $translated_text;
    }
    add_filter( 'gettext', 'change_translate_text', 20 );
    

    Just make ‘new text’ whatever you want.

    or you could probably get you function to do something, but I don’t offhand know what you’d need to do.

    #144429

    In reply to: Display index + topics

    Stephen Edgar
    Keymaster

    It ‘is’ possible… The problem is once you have 10, 20, 50, 100 topics…

    How do users ‘easily’ navigate or find your ‘Index 2’ forum.

    Index 1
    Topic 1.1
    Topic 1.2
    ...
    Topic 1.20
    ...
    Topic 1.30
    ...
    Topic 1.50
    ...
    Topic 1.100
    
    Index 2

    So it ‘is’ possible with custom templates but becomes a horrible experience for users trying to navigate your site.

    #144427
    shpitzyl
    Participant

    Look at this blog post:
    http://themekraft.com/blog/customize-profile-and-group-menus-in-buddypress/

    I haven’t checked it, so if it doesn’t work, you can always use css.

    put this line in bbpress.css in your child theme:
    #forums-personal-li {display:none;}

    #144420
    Lave
    Participant

    Hi, I’m using WordPress 3.8.1 with bbPress.
    Looking for a plugin that will allow me to reply to posts by email.
    I found this post and use this plugin but it causes an error

    Reply to Posts via Email


    https://github.com/rmccue/bbPress-Reply-by-Email.

    Error:

    
    Warning: require_once(/home/power90/public_html/wp-content/plugins/bbsub/vendor/postmark-inbound/lib/Postmark/Autoloader.php): failed to open stream: No such file or directory in /home/power90/public_html/wp-content/plugins/bbsub/library/bbSubscriptions/Handler/Postmark.php on line 9 Fatal error: require_once(): Failed opening required '/home/power90/public_html/wp-content/plugins/bbsub/vendor/postmark-inbound/lib/Postmark/Autoloader.php' (include_path='.') in /home/power90/public_html/wp-content/plugins/bbsub/library/bbSubscriptions/Handler/Postmark.php on line 9 
    
    #144414

    In reply to: Custom freshness links

    Stephen Edgar
    Keymaster

    You probably just need to target the CSS to only there forum titles:

    #bbpress-forums ul.forum-titles {
    	background: none;
    	margin: 0;
    	list-style: none;
    }
    #144413

    In reply to: Tags

    Stephen Edgar
    Keymaster

    This all depends where and how you are customizing your site, that particular piece of code is if you are for example making yourself a custom sidebar.php template for your site and you wanted to add it there.

    #144411

    In reply to: Tags

    batmanfan
    Participant

    Thanks Stephen. that’s great. Now, I’m still a bit newbie to this coding thing. Would you kindly guide me where (which field) to add this code to?

    <?php wp_tag_cloud( array( ‘smallest’ => 12, ‘largest’ => 16, ‘number’ => 16, ‘taxonomy’ => bbp_get_topic_tag_tax_id() ) ); ?>

    Thank you so much.

    #144410

    In reply to: Tags

    Stephen Edgar
    Keymaster

    In the theme here on bbpress.org they are the ‘default’ sizes, it is just a sidebar with the shortcode [bbp-topic-tags].

    If you want to add custom sizes to a custom template part then something like this is a goo d start:

    <?php wp_tag_cloud( array( 'smallest' => 12, 'largest' => 16, 'number' => 16, 'taxonomy' => bbp_get_topic_tag_tax_id() ) ); ?>

    #144407

    In reply to: PM button in posts

    Stephen Edgar
    Keymaster

    Should this be in an own file (named how?) and added to my childtheme’s subolder bbpress, or should I place the code somewhere in an existing file?

    Any of these methods will work 😉

    That said I’d download the gist from https://gist.github.com/ntwb/9887310 and extract the file and upload it as a plugin for your site.

    It needs a bit more work in that it shouldn’t be displayed for the current user or anonymous users.

    When I get a chance I’ll update that gist with those updates.

    #144400
    Robin W
    Moderator

    Ok, on your first :

    This is to do with your theme and it’s page templates, not bbPress directly.

    what you will need to do is create a bbpress.php file and into that put the page layout

    see

    Step by step guide to setting up a bbPress forum – Part 1

    for creating a bbpress page to use

    Then see

    http://brookswebdesign.net/how-to-create-a-wordpress-template-with-left-sidebar/

    for creating a left hand sidebar.

    On your second, this is either

    related to your theme and how it is displaying content. Switch to a default theme such as twentytwelve for a moment and see it is it then displaying – in default all with not be indented.

    or

    maybe because you are using threading on dashboard>settings>forums>reply threading

    Let me know which, and I’ll take a lokk to see how to get all to ident

    #144398
    Robin W
    Moderator

    see

    Layout and functionality – Examples you can use

    From memory I think $args[‘sep’] = “>” would be what you are looking for

    so for instance

    function mycustom_breadcrumb_options() {
           $args['sep']    = '>>';
         
        return $args;
    }
     
    add_filter('bbp_before_get_breadcrumb_parse_args', 'mycustom_breadcrumb_options'
    

    would give a double chevron.

    If that doesn’t work, come back and I’ll look it up.

    #144397
    blastblast
    Participant

    Hello all,

    I would like to embed a Youtube video in a normal forum post response. However, only the link show you.

    For example, when you paste a Youtube link on Facebook, a player appears allowing the viewers to be able to watch the video on the page simply by pressing play.

    Is there some shortcode I should use? Is there a way I can do this without changing the code?

    Thank you

    #144392
    Majijiboo
    Participant

    Hello,

    I used CSS to remove certain parts of my breadcrumb and now need to remove certain separators (ex: “>”) between the words. Unfortunately all the separators have the same class, so is there a way to code bbpress so some separators are shown and others are not? Please see image below for example. Thanks.

    Link to image

Viewing 25 results - 12,251 through 12,275 (of 32,504 total)
Skip to toolbar