I’m sorry for few days of silence. My love in the USA, and I’m in Russia without the visa.
@jeffacubed thank you for “спасибо”. I can publish the code. Also I can give you access to my private repo on Bitbucket.
wp_signup_location – it’s the filter which returns the sign up page location (url) and WordPress redirect to this addres. So this address not using in wp-signup.php because you already on the signup page. Your example of grep result shows that this filter using in wp-login.php (this page have the signup link).
My code
All of this files a part of my mu-plugins for this project.
Require necessary files — gist.github.com/korobochkin/06780b88118e35c3bfd1
wp-signup.php — gist.github.com/korobochkin/9e4f9cd6502c4252d902 I use selena_network_signup_main function from this file on page-signup.php template in child theme.
wp-activate.php — gist.github.com/korobochkin/765d0a5d4e028dc3001a I use selena_network_activation_page function from this file on page-activate.php template.
And finally gist.github.com/korobochkin/a161718855b7784bfb10 file which sends notifications after you create an account and disable default WordPress notifications (return false at the end of the function). If you return true at the end of this function then user get 2 emails with different activation links:
site.com/wp-activate.php?key=HASH
site.com/activate/?key=HASH
P. S. can’t post this reply with links (bbPress doesn’t allow post replies with links).
I’m sorry for few days of silence. My love in the USA, and I’m in Russia without the visa.
@jeffacubed thank you for “спасибо”. I can publish the code. Also I can give you access to my private repo on Bitbucket.
wp_signup_location – it’s the filter which returns the sign up page location (url) and WordPress redirect to this addres. So this address not using in wp-signup.php because you already on the signup page. Your example of grep result shows that this filter using in wp-login.php (this page have the signup link).
Require necessary files https://gist.github.com/korobochkin/06780b88118e35c3bfd1
wp-signup.php — https://gist.github.com/korobochkin/9e4f9cd6502c4252d902 I use selena_network_signup_main function from this file on page-signup.php template in child theme.
wp-activate.php — https://gist.github.com/korobochkin/765d0a5d4e028dc3001a I use selena_network_activation_page function from this file on page-activate.php template.
And finally https://gist.github.com/korobochkin/a161718855b7784bfb10 file which sends notifications after you create an account and disable default WordPress notifications (return false at the end of the function). If you return true and the end of this function then user get 2 emails with different activation links:
site.com/wp-activate.php?key=HASH
site.com/activate/?key=HASH
All the code can be viewed there.
This page is currently written as just a simple WordPress page with several shortcodes as listed below:
General Discussions
[bbp-single-forum id=3926]
Guild Discussions
[bbp-single-forum id=3924]
Group Forums
[bbp-single-forum id=10169]
When changing the Settings to have /forums as the forum root page, it changes all of the above listed shortcodes visually to look like it was just duplicated over and over from the current /forums-root page. It loses all of the current forum IDs and they all turn into a general forum-index.
This is why I can’t just swap it in the Setting menu for the forums, and the reason I want the current Forum breadcrumb to direct to /forums and not /forums-root.
If you would like, take a look at the way it looks now, and I’ll switch it after so you can see what it is doing.
I’m sorry but I don’t understand what you mean.
What shortcodes – where?
You will need to either provide examples or explain further.
Sorry, but I am trying to help you, but there are hundreds of ways to set up wordpress/bbpress so need clear issues to resolve eg it looks like this, it needs to look like this
If I change the page as you mentioned, all shortcodes for the http://forgebreaker.net/forums/ page are overwritten, and you end up with several copies of the forum-index shortcode instead.
The changelog says this:
Don’t always put tags around titles, as this affects the title bar, too. If you want bolded titles on topics with unread posts, use gtf_topic_title()
Would I just add this code to the css or php file?
Hi @Robkk where do I add this code?
Hi all,
I need help for programming a little feature for my forum.
I’m willing to pay some money, after a more detailed discussion of price.
But this should be somewhat “easy” for a programmer used to bbpress/wordpress, as most code already exists.
If interested:
Please, have a look at this page:
https://www.tradingview.com/widget
(They supply this for free by the way)
Look at the top widget/stock chart, and look at the code supplied on the same page underneath the chart.
Also notice how you can enter the stock-symbol of choice, in the top left corner of the chart, to search in Teamviewers own database, to load a new chart.
NOTE: This method (from the user interface) does apparently NOT change the “SYMBOL” in the code, as seen on the page above.
– For the “widget” to show another symbol by default, you’ll have to enter it and click “Apply” on the left side, to update the code with a new default SYMBOL.
Please try it out, to have a feeling how it works.
Now my questions:
Q1:
Is it possible to embed this script, in the text-area for bbpress, and run its output “live” when a user edits a new post?
It could be called and embedded into the text area, by clicking a “check-button” labeled “Graf” (‘Chart’ in Danish).
(And removed again unchecking this button – of course)
Q2:
Is it possible for the user, to enter directly on the user interface of the widget, a new symbol, and post it (correct chart) together with the topic?
It would maybe require that the Post-button would need to update the “SYMBOL”-line in the script code, with the symbol the user have chosen and fetched from Tradingviews database, while also posting it all…Like you would do with an WYSIWYG editor
I hope I made myself somewhat understandable 🙂
Thanks in advance !
Best regards,
Martin L. Hansen – Denmark.
Hi!
I want to put tinyMCE in bbPress, I copied this code -> https://codex.bbpress.org/enable-visual-editor/ and it works good but I want to disable html tab and leaving only the visual tab.
Is it possible without using css or javascript solutions?
Hi there, I am using insert_php plugin with bbpress. I have already added [insert_php] as a shortcode to whitelisted shortcode list under ‘bbPress2 shortcode whitelist’s settings. But, I am still getting [insert_php] as text in replies. Please help me understand if I am missing something here?
I believe that wordpress support forums use bbpress, how can I add this “Add New” button to my bbpress forum
they do , the bbpress standalone version
suprisingly this button is not in here.
wordpress.org use a customized version of bbPress just like this site ooes
you can try something like this
<?php if ( bbp_is_single_topic() ) : ?>
<?php if ( is_user_logged_in() ) : ?>
<a class="bbp-new-reply-button" href="#new-post">New Reply</a><li>
<?php endif; ?>
<?php endif; ?>
place the code in loop-replies.php above the <li class="bbp-header">
you can style the link like so with some CSS , place wherever you place custom CSS
.bbp-new-reply-button {
background:black;
color:#fff;
text-transform:uppercase;
text-decoration:none;
}
bbPress doesnt render shortcodes
you will need to use a plugin like this
https://wordpress.org/plugins/bbpress-do-short-codes/
Note: by default, only users with the ability to publish bbPress forums will have their short codes parsed. This can be changed by passing a different capability via the pw_bbp_parse_shortcodes_cap filter.
so by this note keymasters/moderators for sure can post shortcodes.
this plugin does this type of thing but you have to manually configure that part
https://wordpress.org/plugins/bbpress-go-to-first-unread-post/changelog/
you would have to copy the bbPress Recent Topics widget edit it/rename it and change where it renders the topic title to gtf_topic_title()
No that’s fine – do have a really large amount of topics/forums?
I’ll take another look at the code
Hope you haven’t forgotten anything else !
ok edit
$last_active = strtotime( get_post_meta( $topic_id, '_bbp_last_active_time', true ) );
if ($last_active < strtotime( '-10 days') )
bbp_close_topic( $topic_id );
to
$topic_date = strtotime( get_post( $topic_id, 'post_date', true ) );
$forum_id = bbp_get_topic_forum_id($topic_id);
if ($topic_date < strtotime( '-10 days') && $forum_id == 210 )
bbp_close_topic( $topic_id );
the $forum_id == 210 needs the forum id of the forum you want to restrict.
to find this, go into
Dashboard>forums>all Forums and hover of edit of the forum you want – eg hover over edit ‘announcements’ and look in the bottom right of the screen. you’ll see the edit url that will include post=210 or whatever number.
You’ll need to test that all the above works, and come back if you need further help
I have another question. I’m trying to add the log in and log out code into functions but I get the following error:
Parse error: syntax error, unexpected ‘Logout’ (T_STRING) in /home/carfan6/public_html/wp-content/themes/sparkle-child/functions.php on line 33
no problem
Alter the lines
$last_active = strtotime( get_post_meta( $topic_id, '_bbp_last_active_time', true ) );
if ($last_active < strtotime( '-10 days') )
to
$topic_date = strtotime( get_post( $topic_id, 'post_date', true ) );
if ($topic_date < strtotime( '-10 days') )
should do it
ok, I’ve added it to my shortcode plugin
bbp additional shortcodes
you will want :
[display-forum-index forum= ‘2932, 2921′ breadcrumb=’no’ search=’no’]
You can see how to set this in
Dashboard>settings>shortcodes
I 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.
Does anyone have the exact like of code?
Hi 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.
In 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?
http://www.fcy.me/forums/topic/20-acoustic-rock-lick-01/
hmmm….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
no 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.