Search Results for 'code'
-
AuthorSearch Results
-
March 31, 2014 at 6:04 am #144368
In reply to: Kunena converter for bbPress 2.4
Stephen Edgar
KeymasterFinally 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.
March 31, 2014 at 5:19 am #144366In reply to: increase font size
batmanfan
ParticipantThanks 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 textsbbpress-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
March 31, 2014 at 3:57 am #144363In reply to: PM button in posts
Stephen Edgar
KeymasterI’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' );March 31, 2014 at 3:48 am #144362In reply to: List forums the simple way?!
Robin W
ModeratorGlad you found it.
There are a whole set of things you can change listed here
March 31, 2014 at 3:44 am #144361In reply to: increase font size
Robin W
ModeratorMarch 31, 2014 at 3:02 am #144358Stephen Edgar
KeymasterIs 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.
March 31, 2014 at 2:51 am #144357In reply to: Removed Spam But Topic Remains Current
Stephen Edgar
KeymasterRun the repair tool ‘Recalculate last activity in each topic and forum’ and that should fix your issue.
March 30, 2014 at 7:17 pm #144351In reply to: List forums the simple way?!
Magic-Komplex
ParticipantUnfortunately 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
March 30, 2014 at 7:09 pm #144350Topic: List forums the simple way?!
in forum TroubleshootingCliffhangerL
ParticipantHi,
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.
March 30, 2014 at 5:03 pm #144346Topic: Tags
in forum Installationbatmanfan
ParticipantI’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.March 30, 2014 at 3:27 pm #144345In reply to: Forums index in the same layout as other bb software
shpitzyl
ParticipantI’m struggling with this one for a couple of days. Your code solved my problem, Thanks.
March 30, 2014 at 8:59 am #144336In reply to: Freshness for Category
Robin W
ModeratorPut 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
March 30, 2014 at 2:54 am #144329In reply to: Two pages showing the same forums
Stephen Edgar
KeymasterThis 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 usingDo 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.
March 29, 2014 at 4:09 pm #144321In reply to: Importing from Mingle Forum finds nothing
kvr28
Participantthank-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
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; }March 29, 2014 at 1:52 pm #144313In reply to: Make Forum Category Index page look like Topics page
kvr28
ParticipantI’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
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
March 29, 2014 at 4:59 am #144303In reply to: Make Forum Category Index page look like Topics page
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?
March 29, 2014 at 4:07 am #144299In reply to: Importing Users from Kunena1
Robin W
ModeratorYes (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.
March 28, 2014 at 5:20 pm #144293In reply to: Make Forum Category Index page look like Topics page
kvr28
Participantcopy 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"> </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' ); ?>March 28, 2014 at 4:27 pm #144291Topic: Make Forum Category Index page look like Topics page
in forum Installationremymedranda
ParticipantHello,
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?
March 28, 2014 at 1:48 pm #144279In reply to: Import old users without an email / password
adressler
ParticipantThat 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.
March 28, 2014 at 1:27 pm #144276In reply to: Import old users without an email / password
Robin W
ModeratorNo 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)
March 28, 2014 at 12:50 pm #144272In reply to: Import old users without an email / password
adressler
ParticipantThanks 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_passanduser_email, a php-generateduser_login(something like “judygarland-old”, “abcdef12345-old” or similar),user_id(unique Auto Increment #),display_name(“Judy Garland”), and maybeuser_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
March 28, 2014 at 11:16 am #144268In reply to: Importing from Mingle Forum finds nothing
kvr28
Participantcheck 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
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
March 28, 2014 at 10:35 am #144267In reply to: Shotcodes not working
yoshimitsu1234
ParticipantI 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.March 28, 2014 at 9:46 am #144263In reply to: Block User
Robin W
ModeratorIt 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.
-
AuthorSearch Results