Search Results for 'code'
-
AuthorSearch Results
-
April 22, 2014 at 4:07 pm #145355
In reply to: SMF Import to bbPress
landshark
ParticipantI’m having some issues converting an SMF forum to BBPress. The SMF forum has about 7,500 members, 7000+ topics and 45,000+ replies.
It seems the links to images are not being imported, my guess it is a problem with the [img] bbcode? But not sure.
I understand that I won’t be able to get attached images imported but i would think that linked images would not be a problem.Also some of the posts are being truncated. I might get the first sentence but the rest is dropped. But not on all of them.
I tired slowing the import down to 50 items at a time with a 2 second pause but still same results.
I’m on a dedicated server. Latest bbpress version, and SMF version is 2.0.4
Any help will be greatly appreciated.
April 22, 2014 at 3:23 pm #145354Topic: problem with forum page – [wesf_account_page]
in forum Troubleshootingthaisneves
ParticipantIn forum page appears this shortcode – [wesf_account_page] and anymore.
What is it? Why appears only this? what is missing?
April 22, 2014 at 2:30 pm #145353Topic: bbpress custom user role ?
in forum Troubleshootingbuzoo
ParticipantHi i want to extend “participant” user role so that they can delete there own replies and images they have attached(For attaching i am using a plugin called GD bbpress attachment).I got some hint from this link but being novice i got more confused were to put the code.
Can any one tell me if there is particular plugin to do the work so that i can extend “participants” capabilities ? or help me out to configure the file according to the link as it doesn’t mention were to put them
ThanksApril 22, 2014 at 1:18 pm #145351In reply to: Sibe Bar Missing with Striking MultiFlex Theme
Robin W
ModeratorHave you tried
In essence you need a .php from your theme that has a sidebar, and rename this bbpress.php within the root of your theme.
April 22, 2014 at 11:41 am #145346Topic: Sibe Bar Missing with Striking MultiFlex Theme
in forum TroubleshootingMatt
ParticipantHello,
My sidebar is missing with my newly installed Striking MultiFlex theme. I’ve tried many of the solutions from this board, but none have worked.
These did not work:
http://codex.bbpress.org/theme-compatibility/http://bpsocialnetwork.wordpress.com/2013/06/02/twenty-eleven-theme-compatibility/
I think Step 3 is missing a ‘)’, but I don’t know where to put it.Any ideas on how to make my sidebars appear on all of my bbpress pages? My site is in maintenance mode, so I can’t post a link.
Thanks,
MattApril 22, 2014 at 9:54 am #145345In reply to: Very simple question — changing font size
msteelman
ParticipantOk, here is a very simple answer to a very simple question.
Inside of your website admin area under appearance is a place to put custom CSS called Edit CSS.
At the bottom of whatever else is in there add the following code:
#bbpress-forums .bbp-topic-content p, #bbpress-forums .bbp-reply-content p {font-size: 16px;}
That will make the font 16 pt. if you want it some other size then change the number.
April 21, 2014 at 9:29 pm #145316In reply to: Adding Login To Bottom of Forums and Topics
tharsheblows
ParticipantOh good! That should work, actually. If I had done that and it didn’t work for me, it would have been because I only added it to one function and not the other, so maybe check that… 🙂
Here is the full code with “Register here” linked to /register-now –
//this adds the login form with a register here link underneath on a single topic so someone can leave a reply. It uses the same logic as form-reply function mjj_new_reply_login(){ if( !bbp_current_user_can_access_create_reply_form() && !bbp_is_topic_closed() && !bbp_is_forum_closed( bbp_get_topic_forum_id() ) ){ bbp_get_template_part('form', 'user-login'); echo '<a href="/register-now">Register here</a>'; } } add_action('bbp_template_after_single_topic', 'mjj_new_reply_login'); //this adds the login form with a register here link underneath on a single forum so someone can start a topic. It uses the same logic as form-topic function mjj_new_topic_login(){ if( !bbp_current_user_can_access_create_topic_form() && !bbp_is_forum_closed() ){ bbp_get_template_part('form', 'user-login'); echo '<a href="/register-now">Register here</a>'; } } add_action('bbp_template_after_single_forum', 'mjj_new_topic_login');April 21, 2014 at 10:23 am #145291In reply to: Theme problem
tharsheblows
ParticipantYeah, it might have been a dns propagation issue, I didn’t think of that. It didn’t work, then you disabled bbpress and then it worked a couple of hours later (I did check a few times) then wasn’t working the next morning.
Do you have bbpress-functions.php in your WP theme folder? You could try editing that to give the correct path.
OR what you could do is just ignore the 404 and add them in separately. So workaround rather than fix. I’m guessing all your css and js files in your template directory are not getting included. But they’re there – I can see them.
This isn’t pretty and will stop working if you change themes or hosts, it’s like fixing trousers with duct tape, but it might work – you can and should keep trying to fix things in the meantime.
It goes into functions.php but don’t add using the admin area editor as if something goes wrong and you don’t have another way of editing files, you’re in deep trouble. I say that because I’m not really convinced it’s completely right, there’s no conditional logic for the js files so you need to be prepared to fix it if needs be (or ask, that’s fine, too!).
add_action('wp_enqueue_scripts', 'mjj_readd_scripts'); function mjj_readd_scripts(){ wp_register_style( 'ifuture-styles', '/ifuture/plugins/bbpress/templates/default/css/bbpress.css' ); wp_register_script( 'ifuture-editor', '/ifuture/plugins/bbpress/templates/default/js/editor.js' ); wp_register_script( 'ifuture-reply', '/ifuture/plugins/bbpress/templates/default/js/reply.js' ); wp_register_script( 'ifuture-topic', '/ifuture/plugins/bbpress/templates/default/js/topic.js' ); wp_register_script( 'ifuture-user', '/ifuture/plugins/bbpress/templates/default/js/user.js' ); wp_enqueue_script( 'ifuture-editor' ); wp_enqueue_script( 'ifuture-reply' ); wp_enqueue_script( 'ifuture-topic' ); wp_enqueue_script( 'ifuture-user' ); wp_enqueue_style( 'ifuture-styles' ); }April 21, 2014 at 10:16 am #145290In reply to: Forums index in the same layout as other bb software
Bob1nz
ParticipantCheck out the files i have in my pastebin http://pastebin.com/u/Bob1nz
these were what I used with buddyboss a wee while ago using @kaliceos codeJust make the four files and drop them into \buddybosschildtheme\bbpress\
April 21, 2014 at 9:41 am #145287In reply to: can't change background color
tharsheblows
ParticipantYou’re looking for a:hover – that’s the style for a link when someone is hovering over it. So I think if you add the following it will all work as you’d like and be the same colour as your other links. This changes the default link hover colour. There might be something somewhere tucked away that overwrites it in certain circumstances but this should work on the forum index page at least.
a:hover{ color: #31485a; }April 21, 2014 at 9:17 am #145283In reply to: Adding Login To Bottom of Forums and Topics
tharsheblows
ParticipantEditing the template files is fine – that’s one of the big draws of open source to me.
If you add this to your current theme’s functions.php file, you should get login forms for non-logged in users in the appropriate places. NB: never ever edit your functions.php file through the WordPress admin area – you need to have ftp access or your access to your hosting control panel (ie independent of WordPress) so you can undo whatever you’ve just done in case it all goes wrong.
I can try to explain where the functions.php file is but I do tend to make people more confused sometimes so won’t unless you ask!
//this adds the login form on a single topic so someone can leave a reply. It uses the same logic as form-reply function mjj_new_reply_login(){ if( !bbp_current_user_can_access_create_reply_form() && !bbp_is_topic_closed() && !bbp_is_forum_closed( bbp_get_topic_forum_id() ) ){ bbp_get_template_part('form', 'user-login'); } } add_action('bbp_template_after_single_topic', 'mjj_new_reply_login'); //this adds the login form on a single forum so someone can start a topic. It uses the same logic as form-topic function mjj_new_topic_login(){ if( !bbp_current_user_can_access_create_topic_form() && !bbp_is_forum_closed() ){ bbp_get_template_part('form', 'user-login'); } } add_action('bbp_template_after_single_forum', 'mjj_new_topic_login');April 21, 2014 at 4:24 am #145277In reply to: Forums index in the same layout as other bb software
palmdoc
ParticipantHi I’m really keen on this layout rather than the default Forum index layout in bbPress.
I have created the loop-forums.php with the code and placed it in the bbpress folder of my child theme (I am using Buddyboss)
However having done that, my Forum index page still remains unchanged
The page just has
[bbp-forum-index]Advice much appreciated
April 21, 2014 at 3:45 am #145276In reply to: can't change background color
keytastic
ParticipantNo dice. Or I’m doing something wrong.
I decided on a much lighter color scheme for the website, and now it looks OK. If I could change one thing now, it would be for active links to behave the same way. For some reason certain links show an underline when you hover over them, and others turn white when you hover over them. It’s not a big deal if I can’t fix this, but it is kind of annoying.
#bbpress-forums li.bbp-header, #bbpress-forums li.bbp-footer { background: #89a2f4; } #bbpress-forums { margin-bottom: 10px; border: 1px solid #666; padding: 12px; background-color: #89a2f4; color: #31485a; } #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 { color: #31485a; } #bbpress-forums a.bbp-author-name { font-size: 12px; color: #31485a; }April 21, 2014 at 12:29 am #145275In reply to: Adding Login To Bottom of Forums and Topics
yoyoma1974
Participantok, but there don’t seem to be any plugins that specifically add the login to the bottom of the topics/forum pages, unless I missed it but I did a lot of searching. Maybe there’s another plugin that would allow me to add the Login shortcode to the bottom area of the Topics/Forums templates?
April 20, 2014 at 5:46 pm #145268In reply to: Adding Login To Bottom of Forums and Topics
yoyoma1974
ParticipantI searched for a plugin but couldn’t find anything like that, bummer. hmmm, not sure if were using a custom bbpress template. I don’t think so. If we’re not using a custom template would we need to create one? Then I imagine copy and past the login code at the bottom of that file?
April 20, 2014 at 2:59 pm #145266Topic: Favorite and subscription, undefined
in forum Troubleshootingjerryskate
ParticipantHi! Im having a problem with undefined call for Subscribe and favorites on threadreplys. Seems to be a known issue, but i can’t figure out how to fix it. Im using the BBpress starter theme from epicwebs, and i found this thread describing the problem: https://bbpress.org/forums/topic/help-me-to-solve-clicking-favorite-and-subscribe-problem/
I have fiddled around with the changes to functions-php he is linking to github, but can’t get it right. If i delete everything in the bbpress.functions it works, but everything looks shit, of course. If i change the while file to the new functions.php as a whole, it works but all styling is crazy off.
Was wondering anyone knows what part of the code controls this so maybe i can change just that part?
Regards,
JerryApril 19, 2014 at 5:00 pm #145232In reply to: Moderator Unable To Post To Forum: iPhone iPad
Matoca
ParticipantI was using a specific bbPress tinyMCE plugin, but I disabled that over a week ago when you mentioned that there may be some issues with it. Was it successful? I don’t know, you can read my moderator’s varied results above. When I had originally added the plugin it was specifically so moderators could edit photo size in the forum and not have to go into the dashboard to do that. I still ask my moderators to always be logged in when they are posting. If it is as simple as asking my moderator with the iphone issues to not log in when she needs to post replies or start topics, that is what we will do.
The latest upgrade WP 3.9 has ver 4.0 tinyMCS in it. See:
So, rather than confuse my troubleshooting, I have no tinyMCE plugins installed. Whatever tinyMCE capabilities 3.9 has is what I now have.
When I am logged in, on the text tab there are the standards plus insert/edit link, url img, code and close tags, the same as we are seeing on this forum.
On the visual tab, logged in, in addition to the standards there is undo, redo, add link, remove link and insert/edit image. Perfect, exactly what I wanted for the moderators.
When I am not logged in there are only the standard fields for name, email and website and add message. There are no text or visual tabs. I have the Nextgen gallery plugin for Upload Photos so that solves the issue of users wanting to post photos. They go directly into a specific gallery and I get an email telling me that something has been uploaded and needs approving.
I have Post Formatting in the forum tools settings unchecked for “Add toolbar & buttons to text areas to help with HTML formatting.” So that is probably why they are not allowed to have visual or text tabs. I do not require registration for posting. If I have trouble with someone I can put their IP on a blacklist. Akismet works well.
But it’s only been a couple of days since I upgraded to 3.9. The developer of the theme I am using has notified me that he is also reworking his theme so that may change things as well.
Once my moderator gets back in touch with me I will post here. Perhaps this WP upgrade has solved the problems with iPhone and iPad?
my best, matocaApril 19, 2014 at 4:38 pm #145230In reply to: Removing Dividers When Viewing a Category
tharsheblows
ParticipantI’m not quite clear on your code, so can’t help with the last piece.
As I mentioned, I did it differently and specific to the forum I was working on which has categories with forums but no sub-forums and one single forum without a category. I don’t think this will help you unless you decide to try something different but this is what I did – in loop-forums.php replace the while loop with :
<?php while ( bbp_forums() ) : bbp_the_forum(); ?> <?php if( !bbp_is_forum_category() ) { bbp_get_template_part( 'loop', 'single-forum' ); } else { bbp_get_template_part( 'loop', 'single-categories' ); } ?> <?php endwhile; ?>and then I made a loop-single-categories.php https://bbpress.trac.wordpress.org/attachment/ticket/1958/loop-single-categories.php
April 19, 2014 at 4:13 pm #145229In reply to: Removing Dividers When Viewing a Category
DeanGrey
ParticipantWhat the image shows is already using Bob1nz’s provided code. Bob1nz’s seems to not correct the issue like Lynq’s does. I am aware that Lynq has made some code available on github but I don’t know what to modify to get those to go away. I have worked my way to getting everything else the way I want it, this is just the last piece.
April 19, 2014 at 3:44 pm #145225In reply to: How do I add timestamp to posts within a topic?
tharsheblows
ParticipantYep – use get_post_time() – https://codex.wordpress.org/Template_Tags/get_post_time
function mjj_post_reply_date(){ printf('<div class="mjj-post-date">'); $reply_id = bbp_get_reply_id( $reply_id ); printf( get_post_time( get_option( 'date_format' ), false, $reply_id, true ) ); printf('</div>'); } add_action ('bbp_theme_before_reply_content', 'mjj_post_reply_date') ;April 19, 2014 at 3:33 pm #145223In reply to: How do I add timestamp to posts within a topic?
Majijiboo
ParticipantThanks. It works. Is there a way to only show the date and not the hour/minute? Maybe using code similar to the below could help?
function short_freshness_time( $output) { $output = preg_replace( '/, .*[^ago]/', ' ', $output ); return $output; }April 19, 2014 at 3:29 pm #145222In reply to: Moderator Unable To Post To Forum: iPhone iPad
tharsheblows
Participant@Matoca it sounds like you’re still using tinyMCE? Do you have something like this in your functions file –
function bbp_enable_visual_editor( $args = array() ) { $args['tinymce'] = true; return $args; } add_filter( 'bbp_after_get_the_content_parse_args', 'bbp_enable_visual_editor' );(from https://codex.bbpress.org/enable-visual-editor/ )
I might be confused (if we had signatures and I used signatures on forums mine would be “I might be confused”) but I wouldn’t think you’d have a text / visual tab on the non-tinyMCE editor, would you?
If it were me, I’d also try disabling “Post Formatting” in Settings -> Forums in the admin area. I have no clue whatsoever if that would work though, it’s just something I’d try.
I’m really interested to see what works! My guess is that something will end up working but we’ll never quite know what did it.
April 19, 2014 at 3:07 pm #145220In reply to: How do I add timestamp to posts within a topic?
tharsheblows
ParticipantYou can use bbp_reply_post_date for it – it will give you “August 4, 2012 at 2:37 pm”. I mean, it would give you that for posts on Aug 4, 2012 at 2.37pm and similar things for other dates.
But you want to style it a bit, so something like:
function mjj_post_reply_date(){ printf('<div class="mjj-post-date">'); bbp_reply_post_date(); printf('</div>'); } add_action ('bbp_theme_before_reply_content', 'mjj_post_reply_date') ;April 19, 2014 at 2:22 pm #145216In reply to: Register / Login or Username
tharsheblows
ParticipantOh good – I have this in a header – it’s about the same but $user_identity is the display name rather than the login. This explains the different global variables from get_currentuserinfo() – https://codex.wordpress.org/Function_Reference/get_currentuserinfo . Just in case you want the full reference – I hadn’t really looked at it before and noticed we used different variables and wondered why and thought you might be interested too. 🙂
<?php if ( is_user_logged_in() ) { ?> <span class="break-me"> Welcome, <?php global $user_identity; get_currentuserinfo(); printf('%s', $user_identity); ?>! </span> <span class="break-me"> <a href="<?php echo wp_logout_url( get_permalink() ); ?>" title="Logout">Log out?</a> • <a href="<?php echo bbp_get_user_profile_url(get_current_user_id()); ?>" name="Your profile and posts">Your profile</a> </span> <?php } ?>April 19, 2014 at 8:04 am #145209In reply to: Register / Login or Username
Sascha.H
ParticipantWell this is now my solution. Seems ok
<?php if ( ! is_user_logged_in() ) { wp_nav_menu( array( 'theme_location' => 'Register or Login' ) ); } else { global $current_user; get_currentuserinfo(); $current_user->user_login; echo "Logged in as: ";?> <a href="<?php echo get_edit_user_link(); ?>"> <?php echo $current_user->user_login; ?> </a> <?php } ?> -
AuthorSearch Results