Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 12,301 through 12,325 (of 32,521 total)
  • Author
    Search Results
  • #144368
    Stephen Edgar
    Keymaster

    Finally Iโ€™ve written a small script to migrate kunena attachments to GD bbPress attachments


    @cybnet
    Awesome thanks for this, I added it to the (still sparse) Kunena docs here.

    I’ll take a closer look when I get the chance and see what ideas I can come up with. I was at a WordPress Meetup a couple of months ago that demoed a few different ways to move media from one install to another that once time permits I’d love to take a shot at including it in our importer.

    Now Iโ€™d like to write a script to convert kunena BBCode into bbPress HTML because there are some bbcodes not converted.

    This I can most definitely help out with now.

    The SMF and phpBB importers both have some good examples of converting BBCode to ‘native’ bbPress (WordPress) code. I am simply use regular expressions to convert them on the fly as each topic or reply is converted.

    eg. This Replaces [size=$1:XXXXXXXX] with <span style="font-size:$1%;">$3</span>

    $phpbb_uid = preg_replace( '/\[size=(.*?):(.*?)\]/', '<span style="font-size:$1%;">', $phpbb_uid );

    You can see the SMF regex here and the phpBB here. There are probably quite a few that we can repurpose and if not make up a list for me and I’ll work towards getting them added to the Kunena importers in a future release.

    #144366

    In reply to: increase font size

    batmanfan
    Participant

    Thanks Robin. You have been a great help.

    I read through and tried https://codex.bbpress.org/bbpress-styling-crib/

    What I did,
    1. installed Simple Custom CSS plugin – all ok
    2. insert the below code. and changed the font-size: 1.1em; to 1.6em

    #bbpress-forums div.odd,
    #bbpress-forums ul.odd {
    background-color: #fbfbfb;
    }
    
    #bbpress-forums div.even,
    #bbpress-forums ul.even {
    background-color: #fff;
    }
    

    IF post is sticky or super sticky, then

    
    .bbp-topics-front ul.super-sticky,
    .bbp-topics ul.super-sticky,
    .bbp-topics ul.sticky,
    .bbp-forum-content ul.sticky {
    background-color: #ffffe0 !important;
    font-size: 1.1em;
    }
    

    but the rest doesn’t seem to work…especially
    Number 5. Various texts

    
    bbpress-forums .bbp-topic-content p,
    bbpress-forums .bbp-reply-content p {
    font-size: 12px;
    

    I change the font-size: 20px

    nothing happens. ๐Ÿ™

    what did I do wrong? basically I wanted to increase font size for all forum section from 1 to 8. How please.

    Thank you in advance

    #144363

    In reply to: PM button in posts

    Stephen Edgar
    Keymaster

    I’m quite sure this is possible… Yes, done ๐Ÿ˜‰

    A quickly whipped up plugin https://gist.github.com/ntwb/9887310

    
    function ntwb_bbp_bp_pm() {
        if(function_exists('bp_send_private_message_link') && is_user_logged_in() ) {
        	?>
        	<a href="<?php bp_send_private_message_link() ?>" title="Private Message">Private Message</a>
        	<?php
        }
    }
    add_action( 'bbp_theme_after_reply_author_details', 'ntwb_bbp_bp_pm' );
    
    #144362
    Robin W
    Moderator

    Glad you found it.

    There are a whole set of things you can change listed here

    Layout and functionality – Examples you can use

    #144361

    In reply to: increase font size

    Robin W
    Moderator

    you’re ‘here’ didn’t work

    gave you checked

    bbPress Styling Crib

    Stephen Edgar
    Keymaster

    Is there anything else I need to do to ensure I get that performance increase?

    Be ready for bbPress v2.6 ๐Ÿ˜‰ We have a few performance improvements coming with this release.

    The downside of our planned improvements means there is a pretty high chance we will break sites thus we have lots of testing and lots of extra code to write to make sure we don’t break anything.

    #144357
    Stephen Edgar
    Keymaster

    Run the repair tool ‘Recalculate last activity in each topic and forum’ and that should fix your issue.

    https://codex.bbpress.org/repair-forums/

    #144351
    Magic-Komplex
    Participant

    Unfortunately there is no button to change this, I wanted the same thing for my forum. But it’s really not a huge thing you have to change within the code. See the detailed explanation how to achieve this here, it’s quite easy:

    http://www.thespiritualpath.de/wp-content/uploads/2014/03/error.jpg

    4. Adding code to our child themeโ€™s style.css

    #144350
    CliffhangerL
    Participant

    Hi,

    I’m new to BBpress and need some guidance. I have tried to search for the problem I have but I have not been able to understand if the posts I find really have to do with my problem.

    What I want to do is to make (see picture below) a list where Fictional literature, where posts are lined up below each other.
    Fictional Literature (0, 0),
    Fictional News Post (0, 0),
    Fictional Media (0, 0)
    etc…

    I found some answers saying I need to add a code in a PHP-file called loop. But that seems too extreme to fix something “simple” like this? The plugin seem very complete and I would guess theres just a box to click to make this change.. or I’m I asking for too much? ๐Ÿ™‚

    In my picture below is what I see when I go into my Forum.

    Want a list of the forums

    #144346

    Topic: Tags

    in forum Installation
    batmanfan
    Participant

    I’ve created a topic with ‘tags’ e.g. tags: codes, code.
    But when try searching for the tags: ‘code’ or ‘codes’ it’s not showing up! How to make it show up on ‘search’? also, is there a way to set up so all the tags appear on a page? e.g. Tags Page? Thanks.

    #144345
    shpitzyl
    Participant

    I’m struggling with this one for a couple of days. Your code solved my problem, Thanks.

    #144336

    In reply to: Freshness for Category

    Robin W
    Moderator

    Put the following code in your functions file

    function change_no_topics ($anchor) {
    if ($anchor=="No Topics") {
    $anchor=" " ;
    }
    Return $anchor ;
    }
    add_filter ('bbp_get_forum_freshness_link','change_no_topics') ;

    This will blank it.

    If you want it to say the same each time, just change the $anchor=” ” to whatever you want it to say.

    If you don’t know how to do any of this, come back

    #144329
    Stephen Edgar
    Keymaster

    This is weird, as you say there is only one copy of the forums in the backend yet two on the front :/

    I see http://elitegamingcomputers.com/forum/ & http://elitegamingcomputers.com/forum/page/2/

    Yet picking a forum via either page above eg http://elitegamingcomputers.com/forum/social/in-game-strategy/ is the same resulting URL from either page, the same for a topic from either forum page eg http://elitegamingcomputers.com/topic/dthpwns-pvp-keybinding-guides/

    If there were duplicates from an import you would see the duplicates in the back end and when viewing the forum or topic typically one of them would end with -2, for example you would have example.com/forum/my-topic and example.com/forum/my-topic-2 as each page. forum, topic must have a unique slug.

    What I do see that is weird though is your main forum page is:
    http://elitegamingcomputers.com/?post_type=page&p=4947 <- That is weird
    http://elitegamingcomputers.com/forum <- This is what I expect you should be using

    Do you have a custom page setup for your forums and by chance do have you used the bbPress shortcode [bbp-forum-list] twice?

    The topics section of your site looks and appears ‘mostly’ to work as expected:
    http://elitegamingcomputers.com/topics/
    The ‘By’ section in the below screenshot should not be there though.

    Looking at the source of your site I know see your using a Genesis theme, do you have the Genesis bbPress Extend plugin installed and activated? https://wordpress.org/plugins/bbpress-genesis-extend/ as you will need this.

    One more thing is that this could be an issue with your rewrite rules. To fix this try resetting your permalinks. In your WordPress Administration Screens navigate to Settings > Permalinks, select a different permalink structure and save. Then select your preferred permalink structure and save again.

    #144321
    kvr28
    Participant

    thank-you, you want to see a awesome forum, look here

    http://www.itinerantangler.com/blog/board/forums/

    zach was kind enough to share his css with me on this thread

    Fly-Fishing Site

    so I copied and pasted it into my themes custom css and tried it, some things worked well, some things didn’t with my theme, so it got me thinking, since I know pretty much nothing about css, I started looking at other bbpress forums and just started inspecting elements to see how they got the affect that I liked, I spent about two weeks doing this, here is the css I ended up with and I use that loop-forums on the other thread, not sure why it’s giving errors for you, I found another example of a loop-forums I found and tested on my staging server and it is pretty close to what you want I think, the link for that is on the other thread

    .single .entry-title { display: none; }
    
    .entry-title { display: none; }
    
    div.bbp-template-notice.info {
    border: #B6A9A6 1px solid;
    background-color: #f0ead6;
    }
    
    #bbpress-forums div.even,
    #bbpress-forums ul.even {
    	background-color: #fbfbfb;
    }
    #bbpress-forums div.odd,
    #bbpress-forums ul.odd {
    	background-color: #fff;
    }
    
    /* =Breadcrumb and Tags
    -------------------------------------------------------------- */
    div.bbp-breadcrumb {
    	float: none;
    	display:block;
    	border: 1px solid #e4e4e4;
    	padding:9px;
    	-moz-border-radius: 3px;
    	-webkit-border-radius: 3px;
    	border-radius: 3px;
    	-moz-background-clip: padding;
    	-webkit-background-clip: padding-box;
    	background-clip: padding-box;
    	background-color: #f5f5f5;
    }
    div.bbp-breadcrumb p{
    	margin:0 !important;
    }
    .bbp-breadcrumb a{
    	position:relative;
    }
    .bbp-breadcrumb a:before{
    	border-bottom: 20px solid rgba(0, 0, 0, 0);
        border-left: 18px solid #E1E1E1;
        border-top: 20px solid rgba(0, 0, 0, 0);
        content: " ";
        display: block;
        height: 0;
        left: 100%;
        margin-left: -7px;
        margin-top: -19px;
        position: absolute;
        top: 49%;
        width: 0;
        z-index: 1;
    }
    .bbp-breadcrumb a:after{
    	border-bottom: 20px solid rgba(0, 0, 0, 0);
        border-left: 18px solid #F5F5F5;
        border-top: 20px solid rgba(0, 0, 0, 0);
        content: " ";
        display: block;
        height: 0;
        left: 100%;
        margin-left: -8px;
        margin-top: -19px;
        position: absolute;
        top: 49%;
        width: 0;
        z-index: 1;
    }
    a.bbp-breadcrumb-home,
    a.bbp-breadcrumb-root,
    a.bbp-breadcrumb-forum,
    a.bbp-breadcrumb-search,
    span.bbp-breadcrumb-current  {
        display: inline-block;
        line-height: 20px;
        padding: 0 10px;
    	font-size: 1em;
    	color:#818181;
    }
    div.bbp-breadcrumb,
    div.bbp-topic-tags {
    	font-size: 12px;
    }
    #bbpress-forums div.bbp-breadcrumb p,
    #bbpress-forums div.bbp-topic-tags p {
    	margin-bottom: 10px
    }
    div.bbp-topic-tags {
    	float: right;
    }
    div.topic-author-displayname,
    div.reply-author-displayname {
    	
    	color: #EB4B00;
    	font-size: 16px;
    }
    	.user-id-1 div.topic-author-displayname,
    	.user-id-1 div.reply-author-displayname{ 
    		font-weight: bold;
    	}
    
    /* =Forms
    -------------------------------------------------------------- */
    #bbpress-forums fieldset.bbp-form legend {
    	padding: 5px;
    }
    #bbpress-forums fieldset.bbp-form label {
    	margin: 0;
    	display: inline-block; 
    }
    #bbp-edit-topic-tag.bbp-form fieldset.bbp-form label,
    #bbp-login fieldset label,
    #bbp-register fieldset label,
    #bbp-lost-pass fieldset label {
    	width: 100px;
    }
    #bbpress-forums fieldset.bbp-form p,
    #bbpress-forums fieldset.bbp-form textarea,
    #bbpress-forums fieldset.bbp-form select,
    #bbpress-forums fieldset.bbp-form input {
    	margin: 0 0 8px;
    }
    form#bbp-your-profile fieldset.submit {
    	border: none;
    }
    textarea#bbp_reply_content,
    textarea#bbp_topic_content,
    textarea#bbp_forum_content {
    	width: 98%;
    	box-sizing: border-box;
    	-webkit-box-sizing:border-box;
    	-moz-box-sizing: border-box;
    	-ms-box-sizing: border-box;
    }
    textarea#bbp_forum_content {
    	height: 210px;
    }
    #bbpress-forums fieldset.bbp-forum-form-attributes {
    	width: 200px;
    	float: right;
    	clear: none;
    	margin-left: 25px;
    }
    .bbp-topic-form,
    .bbp-reply-form,
    .bbp-topic-tag-form {
    	clear: left;
    }
    body.topic-edit .bbp-topic-form div.avatar img,
    body.reply-edit .bbp-reply-form div.avatar img,
    body.single-forum .bbp-topic-form div.avatar img,
    body.single-reply .bbp-reply-form div.avatar img {
    	margin-right: 0;
    	padding: 10px;
    	border: 1px solid #ddd;
    	line-height: 0;
    	background-color: #efefef;
    }
    body.page .bbp-reply-form code,
    body.page .bbp-topic-form code,
    body.single-topic .bbp-reply-form code,
    body.single-forum .bbp-topic-form code,
    body.topic-edit .bbp-topic-form code,
    body.reply-edit .bbp-reply-form code {
    	font-size: 10px;
    	background-color: #f0fff8;
    	border: 1px solid #CEEFE1;
    	display: block;
    	padding: 8px;
    	margin-top: 5px;
    	width: 369px;
    }
    	.form-allowed-tags code {
    		background: #bcd7f3 !important;
    		font-size: 11px !important;
    		border: none !important;
    		width: auto !important;
    		color:#333 !important; 
    		white-space: normal !important;
    	}
    #merge_tag,
    #delete_tag {
    	display: inline;
    }
    div.bbp-submit-wrapper {
    	margin-top: 15px;
    	float: left;
    	clear: both;
    }
    
    #bbpress-forums div.odd,#bbpress-forums ul.odd {
    background-color: #f3f3f3;
    }
    
    #access {
    background: #D9D9D9;
    padding-left: 0 !important;
    padding-right: 0 !important;
    }
    
    #bbpress-forums li.bbp-header {
    background: #D9D9D9;
    border-top: none !important;
    width: 99%;
    border-bottom: 1px solid #d3d3d3 !important;
    }
    
    #footer-area {
    background: #D9D9D9;
    }
    
    .bbp-footer {
    background: #D9D9D9;
    }
    
    #bbpress-forums li.bbp-header {
            font-size: 1.3em;
    }
    
    .bbp-topic-title {
       font-size: 1.1em;
    }
    
    .widget_display_topics .bbp-author-avatar { display: none ! important; }
    
    .bbp-topic-freshness-author  .bbp-author-avatar { display: none ! important; }
    
    blockquote:before {content: โ€˜\275dโ€™; color: #555; font-size: 15px; width: 15px; height: 15px; line-height: 15px; margin-left: -70px; margin-top: 10px; float:left; }
    
    #bbpress-forums div.bbp-reply-header {
    background-color: #afafaf;
    }
    
    .bbp-admin-links a {
    color: #00548c !important;
    }
    
    .bbp-admin-links a:hover {
    color: #d54e21 !important;
    }
    #144313
    kvr28
    Participant

    I’m not sure, I thought I had found that as a example on here somewhere, but I can’t seem to find it, it’s what I use on my forum and I’m not getting any errors, I just found this example and just tried it on my testing site and it works well, see if it gives you any errors

    https://code.google.com/p/ogre3d-fr/source/browse/wp-content/themes/ogre3d/bbpress/loop-forums.php?r=25

    also lynq made a pretty sweet template pack, maybe try that and see if you like the look

    I have created a bbPress starter theme with a phpBB look and feel

    #144303
    Robin W
    Moderator

    @kvr28 great looking modification. Just tried it and it fell over with a parse error :

    Parse error: syntax error, unexpected ‘=’ in….line 44

    which is

    bbp_has_forums(โ€˜post_parent=โ€™.bbp_get_forum_id());
    

    Any ideas?

    #144299
    Robin W
    Moderator

    Yes (at least it was in my case) – unless the old system used the same password system, then the encrypted password is alien to WP, so unless it just believes that all users are genuine, then it has to reject users.

    Password lost works as a good mechanism as it sends email to user, so confirms identity.

    I just created a page in my menu headed “old forum users” and put a message in there that they wuld need their password reset for security reasons, and to click lost password. I then used the [bbp-login] and [bbp-lost-pass] shortcodes to display that on screen under the message.

    #144293
    kvr28
    Participant

    copy loop-forums.php from plugins/bbpress/templates/default/bbpress into your theme directory, overwrite whats in the file with this code. bbpress will look for the file first in your theme before it looks in the bbpress directory, that way if bbpress updates, you won’t lose the file update. Should get the look you want

        <?php
         
        /**
         * Forums Loop
         *
         * @package bbPress
         * @subpackage Theme
         */
         
        ?>
         
        <?php do_action( 'bbp_template_before_forums_loop' ); ?>
         
        <?php while ( bbp_forums() ) : bbp_the_forum();
                       
                        /* We print the header only if we want to show a category or if it's the first item of a no-parent forum list */
                        if (bbp_is_forum_category() OR !$bbp_forums_noheader)
                                { ?>
         
                                <ul id="forums-list-<?php bbp_forum_id(); ?>" class="bbp-forums">
         
                                        <li class="bbp-header">
         
                                                <ul class="forum-titles">
                                                        <li class="bbp-forum-info"><?php if(bbp_is_forum_category()) { ?><a>"><?php bbp_forum_title(bbp_get_forum_parent_id()); ?></a><?php } else { _e( 'Forum', 'bbpress' ); } ?>
                                                        <li class="bbp-forum-topic-count"><?php _e( 'Topics', 'bbpress' ); ?>
                                                        <li class="bbp-forum-reply-count"><?php bbp_show_lead_topic() ? _e( 'Replies', 'bbpress' ) : _e( 'Posts', 'bbpress' ); ?>
                                                        <li class="bbp-forum-freshness"><?php _e( 'Freshness', 'bbpress' ); ?>
                                                
         
                                        <!-- .bbp-header -->
        <?php           } ?>
         
                                <li class="bbp-body">
               
        <?php           /* If the forum is a category, we're gonna make another loop to show its subforums and sub-subforums as if those were forums */
                                if(bbp_is_forum_category())
                                        {
         
                                        $temp_query = clone bbpress()->forum_query;
                                        bbp_has_forums('post_parent='.bbp_get_forum_id());
                                        while ( bbp_forums() ) : bbp_the_forum();
                                        bbp_get_template_part( 'loop', 'single-forum' );
                                        endwhile;
                                        bbpress()->forum_query = clone $temp_query;
         
                                        }
                                                else /* Otherwise, we print the forums the normal way */
                                        {      
         
                                        bbp_get_template_part( 'loop', 'single-forum' );
                                        $bbp_forums_noheader = 1; /* This prevents the header part to be printed again on next post in the loop */
         
                                        } ?>
         
                                <!-- .bbp-body -->
         
        <?php           /* Prints the footer only if :
                                        - it's a category
                                        - or if it's the last forum of a no-parent forum list
                                        - or if the next forum in the loop is a category */
         
                                if(     bbp_is_forum_category()
                                OR      (bbpress()->forum_query->current_post+1) == bbpress()->forum_query->post_count
                                OR      bbp_is_forum_category(bbpress()->forum_query->posts[ bbpress()->forum_query->current_post + 1 ]->ID))
                                { ?>
         
                                <li class="bbp-footer">
         
                                        <div class="tr">
                                                <p class="td colspan4">&nbsp;</p>
                                        </div><!-- .tr -->
         
                                <!-- .bbp-footer -->
         
                        <!-- .forums-directory -->
         
        <?php   unset($bbp_forums_noheader); /* Needed if we have 2+ no-parent forums with at least 1 category between them */
                        }  ?>
         
        <?php endwhile; ?>
         
         
        <?php do_action( 'bbp_template_after_forums_loop' ); ?>
    
    remymedranda
    Participant

    Hello,

    I am trying to make my Forum category index page at http://kylekushman.com/forum/

    have the same table separation and look as the topics list page…

    http://kylekushman.com/forum/forum/cannabis-cultivation/advanced-growing/

    Can anyone tell me what code I need to modify, add, or delete from the stylesheet to make this happen?

    #144279
    adressler
    Participant

    That sounds like the way to do it. I’m rather new to WordPress but I have a decent knowledge of PHP / MySQL. If it’s not too much of a pain, I’d really appreciate looking at some code to use as a starting point.

    #144276
    Robin W
    Moderator

    No problem – I spent several weeks getting my head around importing from a flat file database, in similar circumstances !

    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.

    The problem otherwise is that posts link to user-id’s not names, so yes when they register they’ll get a new ID, and the old posts won’t show as theirs. Additionally logon names need to be unique so they can’t register with any existing username !

    OK so what would I do?

    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.

    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)

    #144272
    adressler
    Participant

    Thanks for the reply Robin,

    Ideally, it would be really nice not to have to manually register the 600 or so active members, but it’s doable if that is the only logical route.

    Long story short, the old site was built by a senior Lotus Notes dev, and he wrote so much custom code to get the site to do what it did. Whats worse is this guy passed away a couple years ago, and there is no commenting in the db. There is likely no way I can export all of the data, I consider myself lucky to have exported what I have now, which is just barely enough to get things converted to WP. This should be okay though, I can generate unique UserIDs and FKs with PHP and MySQL before importing into BBPress.

    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. 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). 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. 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.

    I guess I will try a few approaches and see which works best, and for anybody else doing something similar I will post my results. Thanks Robin for the ideas.

    Aaron

    #144268
    kvr28
    Participant

    check threads where you posted videos, if you used the embed codes, it will just show up blank, I noticed on some threads the original post was wrong, I’m getting some errors in my log whenever someone makes a post, I’m trying to work through that now

    you can see my forum here

    Forums

    you can keep the same tiered set up you you have now, just go under forums for bbpress, create a forum say cannabis cultivation and set it as a category under types in forum attributes, then take your soils, outdoor grows etc and set category as a parent, enter your orders for the forums to have the correct order displayed,

    that’s the biggest things I can think of right now

    #144267

    In reply to: Shotcodes not working

    yoshimitsu1234
    Participant

    I am using latest versions of all softwares and Plugins. Theme is wpzoom Gazeti.
    Example of error is http://www.desimedicos.com/forum
    Getting this 404 errors on all pages with any kind of bbpress shortcode irrespective of whether i am logged in or out.

    #144263

    In reply to: Block User

    Robin W
    Moderator

    It could with some coding, but this message probably applies to many situations eg not logged in

    Try this in your function file

    //This function changes oldtext to newtext
    function rchange_translate_text( $translated_text ) {
    	if ( $translated_text == 'oldtext' ) {
    	$translated_text = 'newtext'];
    	}
    	return $translated_text;
    }
    add_filter( 'gettext', 'rchange_translate_text', 20 );
    

    where old text is the old text, and new text the new.

    If you have more than one of these functions (seem to think I have given you this solution for another part), then just make sure the function name is unique eg this ones called rchange… so next time maybe call it schange… and change it in first and last lines to match.

Viewing 25 results - 12,301 through 12,325 (of 32,521 total)
Skip to toolbar