Search Results for 'code'
-
AuthorSearch Results
-
January 8, 2015 at 12:44 pm #156642
pazzaglia
ParticipantI just installed this bit of code and it works GREAT!!
Now I know when I find random code around it’s expected to be added to functions.php as well.
THANK YOU SO MUCH & HAPPY NEW YEAR!
Ciao,
L
P.S. I love that the forums show-up as well. Except now I’ll have to change the name to “xyz Forum” so it’s clear what it is in the search results.
January 8, 2015 at 12:44 pm #156641In reply to: Increasing Avatar Size on Forum Index
supremor
ParticipantDoes anyone have the exact like of code?
January 8, 2015 at 10:49 am #156637In reply to: Auto close topic after some time / days
jsantana
ParticipantHi there, thanks for the code, I haven’t tested it but the installation went smoothly and now I have it active in the plugins section.
But this isn’t what I’m looking for specifically. What I would like is to have it close after X amount of days even if it has been updated. This code just do it but after it hasn’t been any replies, right?
Thanks for taking time in answering, really appreciate it.
January 8, 2015 at 7:18 am #156636Topic: bbpress video not showing
in forum Troubleshootingcoffeefcy
ParticipantIn bbpress, Video player not showing.
I tried both Jwplayer & flowplayer and wordpress core player.
But none of this show the player, just the code.
but in other page, it works well.
Would you help me?January 8, 2015 at 5:25 am #156633In reply to: Increase quantity of search results
Robin W
Moderatorhmmm….hadn’t fully reads your original post
ideally I’d like to get search results with pagination
That’s what you should have ! Results should show the ‘replies per page’ setting together with full pagination.
Are you sure there are more than 20 results to show?
I suspect that something else is disturbing this
If you haven’t amended bbpress code or added filters then :
It could be a theme or plugin issue
Plugins
Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.
Themes
If plugins don’t pinpoint the problem, as a test switch to a default theme such as twentytwelve, and see if this fixes.
Come back when you have done that
January 8, 2015 at 5:18 am #156632In reply to: Auto close topic after some time / days
Robin W
Moderatorno problem
copy this code into a new notepad/notepad++ page
<?php /* Plugin Name: BBPress Close Old Posts Description: Close BBPress 2.0+ posts that haven't been updated in X days. Author: Raygun Version: 0.1 Author URI: http://madebyraygun.com This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ register_activation_hook(__FILE__, 'bbpress_topic_scheduler'); add_action('bbpress_daily_event', 'bbpress_close_old_topics'); function bbpress_topic_scheduler() { wp_schedule_event(time(), 'daily', 'bbpress_daily_event'); } function bbpress_close_old_topics() { // Auto close old topics $topics_query = array( 'author' => 0, 'show_stickies' => false, 'parent_forum' => 'any', 'post_status' => 'publish', 'posts_per_page' => -1 ); if ( bbp_has_topics( $topics_query ) ) while( bbp_topics() ) { bbp_the_topic(); $topic_id = bbp_get_topic_id(); $last_active = strtotime( get_post_meta( $topic_id, '_bbp_last_active_time', true ) ); if ($last_active < strtotime( '-10 days') ) bbp_close_topic( $topic_id ); } } ?>Change the -10 days right near the bottom to whatever number you want
Save this file as ‘close_old_topics.php’
Compress/zip this file, so you have a zipped version.
then in worpress go to
Dashboard>plugins>add new and click ‘upload’ and then upload the zipped file you saved above, and then activate.
Come back if you have any issues, the code is not mine and I have not tested it, but others have used.
January 8, 2015 at 3:13 am #156624In reply to: Edit the bbPress login widget
Robkk
Moderatordo this instead since you want it for all of the bbPress login forms.
.bbp-login-form { max-width: 270px; }and you could put the CSS in many places
a custom css plugin
jetpacks css module
your child themes stylesheet
the bbpress.css stylesheet that should be copied to your child theme in a bbpress folderJanuary 8, 2015 at 1:09 am #156621In reply to: Edit the bbPress login widget
supremor
ParticipantWhere do I place the code?
January 8, 2015 at 1:05 am #156619In reply to: Edit the bbPress login widget
Robkk
Moderatoryou can see it comes back to normal on very small sizes close to 200 maybe settings a max width for the login form would do the job.
try something close to this , edit if you want.
.widget.bbp_widget_login .bbp-login-form { max-width: 270px; }January 8, 2015 at 12:10 am #156617In reply to: Better WYSIWYG text editor?
discdemo
Participanthmm, bummer. Thank you though for the code, Doug.
Perhaps it will come in handy if I don’t just use the wall.
I might need it.Thank you, again.
jzJanuary 8, 2015 at 12:00 am #156616Robkk
Moderatorif you have WordPress all set up and also downloaded and activated bbPress.
then follow this article and see if it helps.
https://codex.bbpress.org/getting-started-with-bbpress/
if you want more explained articles on how to set up your forums
there is a step by step 5 part guide on how to setup bbPress
in codex.bbpress.org/
still have issues then please reply back
January 7, 2015 at 11:11 pm #156614In reply to: Better WYSIWYG text editor?
Doug Smith
ParticipantYou can add this code to your theme’s functions.php file to enable the editor.
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' );The visual editor is almost essential for the non-technical audience I have on my forum. Unfortunately, it’s not perfect. For example, if someone copies and pastes a previous post to quote it they’ll end up with a bunch of html visible in their post.
January 7, 2015 at 7:45 pm #156612In reply to: User registration on multisite
dingzj
ParticipantSpending whole day to figure out the solution of this issue, congrats to @korobochkin for solving this problem.
Since I’s with WordPress 4.1 and seems it’s have mature multiple sites support, when greping keywords , only these popup, none in the wp-signup.php files.
grep wp_signup_location * -r wp-admin/includes/ms.php: $sign_up_url = apply_filters( 'wp_signup_location', network_site_url( 'wp-signup.php' ) ); wp-includes/canonical.php: $redirect_url = apply_filters( 'wp_signup_location', network_site_url( 'wp-signup.php' ) ); wp-login.php: wp_redirect( apply_filters( 'wp_signup_location', network_site_url( 'wp-signup.php' ) ) );Can you put your code for
wp-signup.phppage-activate.phpat https://gist.github.com/ and give a link here?January 7, 2015 at 5:28 pm #156607In reply to: User registration on multisite
jeffacubed
Participant@korobochkin – you’re 100% correct, in that there should be no difference between sub-domain & sub-folder setups for making this work as you described.
If you could share/paste the actual code for the req’d changed files – that would be wonderful!
If for whatever reason the actual code can’t be pasted here on the forums, you can always email the files (if you like) to me ( cubedit {at} jeffacubed {dot} com )
спасибо
-JJanuary 7, 2015 at 5:07 pm #156606In reply to: User registration on multisite
Nicolas Korobochkin
ParticipantI don’t have experience with subfolder installs but I think there is no difference between subdomain and subfolder installs for this case. I can publish my code but its looks like default wp-signup.php and wp-activate.php with small changes like few <div>, additional CSS classes and commented few lines of code.
At first glance this two files looks messy and hardcoded but you can Folding all functions and comments in code editor.
January 7, 2015 at 1:39 pm #156600In reply to: Auto close topic after some time / days
jsantana
Participanterm, yes, pretty much everything web relate, but not the language itself ‘PHP’. Also not an expert with wordpress. Just asking to get step by step as I’ve seen answers here with just code, without explaining where to insert it.
January 7, 2015 at 1:31 pm #156599In reply to: White screen "Blocked"
cooshtee
ParticipantI am encountering exactly the same issue as Divine_Alex
It’s working fine on my iMac but on my iPad I sporadically get the white screen saying blocked when you try and login or register via the shortcode pages.
My client gets the white screen on PC and Mac desktops sporadically too.
The inconsistency makes it very hard to debug.
I’ve tried turning off all plugins.
Does anyone have any ideas?
Site URL is: http://www.blesmaforum.org
Cheers
January 7, 2015 at 1:25 pm #156597In reply to: Auto close topic after some time / days
Robin W
Moderatorok, so how tech savvy are you do you know
1. how to create a notepad/notepad++ file and copy/paste code into it?
2. FTP this to your wordpress site?Come back and let me know
January 7, 2015 at 12:13 pm #156589In reply to: Hidden private forum
Robin W
ModeratorNo leave it at 2.5.2 – might have been an issue with you mamp.
The reference to php 5.4 being stricter I found seemed to indicate that there was an issue in certain circumstances, so unless it is a firm problem I don’t want to alter code.
I know which files I changed (only 2) and will keep this as a reserve in case.
Thanks for coming back ! much appreciated !
January 7, 2015 at 10:53 am #156588Topic: Auto close topic after some time / days
in forum Requests & Feedbackjsantana
ParticipantHello, I’m new to wordpress and bbPress and I’m trying to find an option to close topics after a some time, for example, after 2 days the topic was created.
How may I do this? Do I have to edit the code? If so, can someone explain step by step, as I have never worked with PHP before.
Thanks.
January 7, 2015 at 3:46 am #156577In reply to: User registration on multisite
jeffacubed
ParticipantI’d say @korobochkin – nailed the solution on this lingering problem with sub-site (only) user-registration, bbPress & multi-site!! Any chance you’d be able to share the exact code/steps you took to resolve this?
It sounds like hooking into the wp_signup_location filter opens the door 🙂
I’ve been trying to work through the steps/logic that Kolya has shared – but I’ve yet to make the entire piece work (though I know it will, eventually)
-J
January 6, 2015 at 5:01 pm #156574Topic: "Oh bother" message disappeared
in forum TroubleshootingAsitha
ParticipantHi there,
We have a forum using bbPress and have set a number of forums to “Private”, and it has been working for quite some time. Normally if a person who is not logged in visits the forums page, it would show the message from the feedback-no-forums.php file, however now it doesn’t display anything at all. Just a blank page.
Looking at the HTML code that’s loaded, nothing within the container is loaded either which is strange. However, if I set one of the forums to public, the forum shows.
Any suggestions?
January 6, 2015 at 3:46 pm #156573In reply to: Custom Forum Layout
TSW
ParticipantThanks Robin – close but I need to show individual forums, not topics.
This is roughly what I need:
Forum Topics Posts Freshness
21CL – Group A 2 4 2 weeks, 1 day ago
21CL – Group B1 3 3 2 weeks, 1 day agoetc
This is pretty much what the built in shortcode [bbp-forum-index] does … I just need to be able to pick the individual forums as they are listed on different student-classroom pages.
Any thoughts?
January 6, 2015 at 1:09 pm #156565In reply to: Increase quantity of search results
Robin W
ModeratorTry adding this to your functions file
function change_search() { $args['posts_per_page'] = 50 return $args; } add_filter('bbp_before_has_search_results_parse_args', 'change_search' );where 50 is the number you want displayed
I haven’t tested, if it doesn’t work come back and I’ll fix it
January 6, 2015 at 12:57 pm #156562In reply to: Custom Forum Layout
Robin W
Moderatorthis plugin might be what you need
-
AuthorSearch Results